Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instance_eval tramples over block's binding's ivars #2060

mvz opened this Issue Oct 20, 2014 · 1 comment


None yet
2 participants
Copy link

mvz commented Oct 20, 2014

On JRuby, the code below prints 1, 2, 2. On MRI and Rubinius, it prints 1, 2, 1.

class C
  def block_param &blk
    @foo = 2
    p instance_eval &blk

@foo = 1
c =
c.block_param { @foo }

Tested with 1.7.13 and 1.7.16.

@mvz mvz referenced this issue Oct 20, 2014


Binding bug #1758


This comment has been minimized.

Copy link

headius commented Oct 20, 2014

See likely explanation and untested patch here: #1758 (comment)

@headius headius added this to the JRuby 1.7.17 milestone Oct 20, 2014

@headius headius added the core label Oct 20, 2014

@headius headius self-assigned this Dec 2, 2014

@headius headius added ffi in progress and removed ffi labels Dec 2, 2014

headius added a commit that referenced this issue Dec 2, 2014

@headius headius closed this Dec 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.