Depends on the call.
In the case of attr_*, it's because you're naming the attribute, not
the methods or the variable. The convention (and the code behind
attr_*) will do the expansion.
In instance_variable_get(...), you are explicitly looking for a
variable, and naturally supply the variable name.
In both cases, the symbol is just a name. What we are naming depends
on the context.

jf

On 12/28/05, James Edward Gray II <james / grayproductions.net> wrote:
> On Dec 28, 2005, at 2:35 PM, Steve Litt wrote:
>
> > One thing -- why not some_call(:@my_variable)?
>
> This is a fair question I've asked myself once or twice.  Ruby seems
> to change it's mind on this sometimes too:
>
>  >> class MyClass
>  >>   def initialize( var )
>  >>     @var = var
>  >>   end
>  >>   attr_reader :var  # I guess we're talking about the method here
> (no @)
>  >>   def fetch( name )
>  >>     instance_variable_get("@#{name}") # but we need the @ now
>  >>   end
>  >> end
> => nil
>  >> ex = MyClass.new(123)
> => #<MyClass:0x32565c @var=123>
>  >> ex.var
> => 123
>  >> ex.fetch(:var)
> => 123
>
> James Edward Gray II
>
>