From: Paul Brannan Date: 2007-12-27T06:49:00+09:00 Subject: Re: Some Ruby 1.9 loose ends to tie up On Thu, Dec 27, 2007 at 05:49:19AM +0900, Charles Oliver Nutter wrote: > If it turned out to be a use case that broke some code someone was > concerned about, the fix in JRuby would be to also look for "send" calls > to "binding" and friends. Another option would be for JIT mode...if such > calls are actually calling binding and friends, we would track that and > compile them differently later. So far, neither change has been necessary. Or, if it were truly a keyword and not a method, it wouldn't be possible to call #binding on an object (nor to alias it). > >Which variables would need to be placed on the heap in this case? > > Only variables that need to be accessible across call boundaries would > have to be on the heap. So in this case, b could be on the stack (or in > a register) while o would go on the heap. The code as it would be outside irb: o = Object.new b = o.send(:binding) p eval("o", b) I think this is a bad example, since I'm making a call to eval. Don't both o and b need to be accessible across call boundaries? (or are you doing some sort of analysis on the string passed to eval?) Paul