From: Ilias Lazaridis Date: 2011-06-02T19:25:29+09:00 Subject: Re: CORE - Alternative Variable Substitution On 2 Ιούν, 10:01, Peter Zotov wrote: >  On Thu, 2 Jun 2011 13:00:29 +0900, Ilias Lazaridis wrote: > > > On 1 Ιούν, 18:07, Christopher Dicely wrote: > >> Also, as you are probably aware (though newbies reading may not be), > >> Ruby already provides a shortcut interpolation of the kind you ask > >> for, but only for instance variables, not locals (e.g., instead of > >> "@foo is #{@foo}" you can use "@foo is #@foo".) > > > I understand, for local variables only: > > > print "#@name has 5 credits" > >  @name is not a local variable, but an instance variable. Of course, my fault, correction: for instance variables only: print "#@name has 5 credits" . -- http://lazaridis.com