From: Devin Mullins Date: 2006-12-31T06:02:57+09:00 Subject: Re: Little Things Duh... ignore this part. :P Devin Mullins wrote: > Trans wrote: >> * Close the closures. > Interesting. Of course, the method author has the choice of calling > instance_eval. And, well, > > def do!(&blk) > obj = Object.new > obj.define_method(:my_little_pony, &blk) > obj.method(:my_little_pony) #.to_proc, if you prefer > end > > a = 1 > dosomething &do! {|x| > p a > }