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

9k has different scoping behavior than MRI #3010

Closed
zachpendleton opened this issue Jun 1, 2015 · 3 comments
Closed

9k has different scoping behavior than MRI #3010

zachpendleton opened this issue Jun 1, 2015 · 3 comments

Comments

@zachpendleton
Copy link

Issue w/ test available here: https://gist.github.com/zachpendleton/e7f1352f4bd079daf288

If attr_accessor is called inside a protected or private method, the instance variables inherit the protected or private scope in 9k, but in MRI they inherit the scope of the call site.

@lephyrius
Copy link

👍 I think I got the same problem here.
#2886
But I couldn't create a nice testcase like u.

@headius
Copy link
Member

headius commented Jun 2, 2015

Ah I see. Yes, method bodies should always default to public visibility, I believe.

@headius
Copy link
Member

headius commented Jun 2, 2015

I see the issue... InterpretedIRMethod is always using that method's visibility when preparing the frame. It should just be left as the default public visibility. Fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants