From: "David A. Black" Date: 2003-12-10T07:34:38+09:00 Subject: Re: Adjusting the Scope of Blocks Hi -- On Wed, 10 Dec 2003, ts wrote: > >>>>> "D" == David A Black writes: > > D> Uh oh. I sense the beginning of the end :-) What don't I (appear to) > D> like about it? > > svg% cat b.rb > #!/usr/bin/ruby > > class A > def self.n > puts "A::n" > end > end > > def n > puts "Object#n" > end > > A.class_eval { n } > svg% > > svg% b.rb > A::n > svg% I think what bothers me about the other case, where a method grabs a block and instance_eval's it, is the sense that the block might have "wanted" to refer to a different n (or whatever). When it's all visible as above, there's no such danger, and therefore, to me, no "magic" aspect. David -- David A. Black dblack@wobblini.net