A version cloning all of ThreadContext. Same results in test_eval in C Ruby source...one additional success, but still other failures. Seems to have something to do with how we scope/frame lambdas.
- Charlie On 1/22/06, Charles O Nutter <[EMAIL PROTECTED]> wrote: > A few fixes. I added a couple tests to Rubicon for this (TestBinding > was empty before) and found some impl issues. > > - Charlie > > On 1/22/06, Charles O Nutter <[EMAIL PROTECTED]> wrote: > > Here's a quick patch to add RubyBinding and make RubyKernel.eval > > (actually RubyObject.eval) work correctly with it. It's pretty basic, > > as you'd expect...just replaces the frame stack and class stack in the > > current ThreadContext with the ones from when binding was called. I > > couldn't find any specific Binding tests in Ruby, so I'll hunt around > > more or commit one later. > > > > def x > > str = "hello" > > end > > > > x_binding = x > > eval "puts str", x_binding => hello > > > > - Charlie > > > > > > > > >
binding2.patch
Description: Binary data
