From: Luc Heinrich Date: 2008-01-29T19:41:51+09:00 Subject: Re: can you do this ? ruby aptitute On 29 janv. 08, at 10:47, Pokkai Dokkai wrote: > how to pass @aa(in C2) value to @bb(in C1) ? > @aa is a dynamic value I first tried with various uses of Binding but couldn't get it to work. This super-ugly hack works though; # in source1.rb class C2; end class C1 def met ObjectSpace.each_object(C2) { |o| @bb = o.instance_variable_get (:@aa) } puts @bb end end -- Luc Heinrich