From: Christoph Date: 2002-08-17T23:38:31+09:00 Subject: Re: Thought question: Where does "new" come from? "ts" wrote ... > I hope that you know that you are not forced to use the evil eval :-) Yeah, but some people seems to have made a pact with the devil;-) > > C> anon.class_eval <<-ENd > > anon.class_eval do |klass| In this case you actually need the evil eval - at least if want to get the silly output I intended to;-). Lets say (in 1.7 ) --- anon = Class.new { const_set :Const, "Anons Const" } Const = "Outer Const" class A; end anon.class_eval { def A.I_am_picking_up_the_Outer_Const p Const end } anon.class_eval %{ def A.I_am_picking_up_Anons_Const p Const end } A.I_am_picking_up_the_Outer_Const # => "Outer Const" A.I_am_picking_up_Anons_Const # => "Anons Const" --- /Christoph