On Mar 30, 2005, at 9:44 AM, Robert Klemme wrote:

> I'm a bit stunned, too.  Maybe this is a hint:
>
> ?> Accessor.class_variables
> => []
>>> Module.class_variables
> => ["@@one", "@@two"]
>
> Although:
>>> Accessor.class.ancestors
> => [Class, Module, Object, Kernel]


Right, because I put the code in Module.  It makes sense, when you let 
it sink in.


> So, since Accessor is an instance of Class, both should be accessible 
> IMO. Weired...
>
> For me it's one more reason to never use class variables.  They are 
> simply too awkward.
>
> Kind regards
>
>    robert
>
>
> PS: But I'm curios, too, why this does not work.

Just switching to class_eval(), to make sure the code is executed in 
the right context fixes the issue.

James