On 2 Ϧ, 10:01, Peter Zotov <whitequ... / whitequark.org> wrote:
> On Thu, 2 Jun 2011 13:00:29 +0900, Ilias Lazaridis wrote:
>
> > On 1 Ϧ, 18:07, Christopher Dicely <cmdic... / gmail.com> 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