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

In non-interpreter mode, access protection on a protected method seems to be bypassed? #2201

Closed
subbuss opened this issue Nov 15, 2014 · 2 comments

Comments

@subbuss
Copy link
Contributor

@subbuss subbuss commented Nov 15, 2014

[subbu@earth lib] jruby /tmp/boo.rb
[nil, 10]
[subbu@earth lib] jruby -X-C /tmp/boo.rb
["NoMethodError", 10]
[subbu@earth lib] cat /tmp/boo.rb
class C
def update(v); self.v = v; end

protected
attr_accessor :v
end

a = []
begin
a << C.new.v
rescue => e
a << e.class.name
end

begin
a << C.new.update(10)
rescue => e
a << e.class.name
end

p a

@subbuss subbuss added this to the JRuby 9.0.0.0 milestone Nov 15, 2014
@subbuss
Copy link
Contributor Author

@subbuss subbuss commented Nov 17, 2014

This might be related to #2205

@subbuss
Copy link
Contributor Author

@subbuss subbuss commented Jan 15, 2015

This seems fixed. Identical output with -X+C, -X-C and default jruby run

@subbuss subbuss closed this as completed Jan 15, 2015
@headius headius removed this from the JRuby 9.0.0.0 milestone Jan 16, 2015
@headius headius added this to the JRuby 9.0.0.0-pre1 milestone Jan 16, 2015
@headius headius added this to the JRuby 9.0.0.0-pre1 milestone Jan 16, 2015
@headius headius removed this from the JRuby 9.0.0.0 milestone Jan 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants