From: dblack@... Date: 2006-10-17T19:41:12+09:00 Subject: Re: metaprogramming surprise? Hi -- On Tue, 17 Oct 2006, Artur Merke wrote: > so what's wrong with my understanding, that > > class D > @@e=5 > class << self > attr_reader :e # <- why this does not refer to @@e > end > end attr_reader :e is equivalent to: def e @e end The class variable @@e is not involved at all. David -- David A. Black | dblack@wobblini.net Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3] DABlog (DAB's Weblog) [2] | Co-director, Ruby Central, Inc. [4] [1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com [2] http://dablog.rubypal.com | [4] http://www.rubycentral.org