From: James Edward Gray II Date: 2006-12-04T22:54:40+09:00 Subject: Re: Getting the source code of a block On Dec 4, 2006, at 5:20 AM, Peter Szinek wrote: > Is the following thing possible somehow? > > def foo(&bar) > do_something_with(bar) > end > > baz = foo { puts 'hello'; i +=1; fluff(ork) } > > now, baz should contain the string > > "puts 'hello'; i +=1; fluff(ork)" This was a Ruby Quiz a while back: http://www.rubyquiz.com/quiz38.html James Edward Gray II