Ryan Davis wrote:
> On Apr 28, 2009, at 05:26 , 7stud -- wrote:
> 
>> John Barnette wrote:
>>>
>>> It's because Ruby automatically creates local variables upon
>>> assignment. Given a class with a method "foo":
>>>
>>
>> Can attr_accessor ever apply to variables that don't begin with @?
> 
> no, otherwise it'd be named something else.

Well, then what's all this talk about "the parser sees this, and the 
parser does that".  The op never tries to access an instance variable in 
the classs, so the fact that a call to attr_accessor is in the class is 
irrelevant.  End of story.
-- 
Posted via http://www.ruby-forum.com/.