From: Florian Gross Date: 2004-10-05T06:10:05+09:00 Subject: Re: Kernel#eval taking a block trans. (T. Onoma) wrote: >>> eval(tb, a) { |a| cool = a.call(cool) } >>> >>>It might also be nice if this could be done without "stepping on toes" >>>(i.e. overwriting binding's locals). >> >>You can use this workaround: >> >>eval("cool = yield.call(cool)", tb) { a } > LocalJumpError: no block given > from (irb):5:in `get_binding' > from (irb):5:in `get_binding' > from (irb):9 > > Is this a 1.9 thing? Yikes, sorry. It only works when no explicit binding is given. :( So the only way seems using Object._id2ref and interpolation for now. Regards, Florian Gross