From: "Christoph R." Date: 2003-09-17T23:33:51+09:00 Subject: Re: Class variables, module inclusion and instance_eval Christoph R. wrote: ..... > This has to do with Ruby's scoping rules - here is an example I changed > ``append_feature'' to the more modern ``included'' I maybe the following example is instructive too --- module Nod end class A def Nod.included(aModule) # scope of @@bar is class A .. end aModule.module_eval do @@bar = aModule.name end end end class B include Nod end class A puts @@bar end # However class B begin @@bar rescue => mes puts mes end end --- results in --- B uninitialized class variable @@bar in B --- /Christoph