From: Jim Freeze Date: 2006-02-27T02:58:43+09:00 Subject: Re: Scope of constants in instance_eval --Apple-Mail-22--539250720 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On Feb 26, 2006, at 11:23 AM, Phrogz wrote: > class Foo > BAR = 1 > def initialize( &block ) > instance_eval &block > end > def bork > puts "bork: self is #{self}" > puts "bork: BAR is #{BAR}!" Hmm, that could be a bug in ruby because p BAR works. > end > end > > Foo.new{ > bork > puts "block: self is #{self}" > puts "block: BAR is #{BAR}!" > } Jim Freeze --Apple-Mail-22--539250720--