We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
headius
Learn more about funding links in repositories.
Report abuse
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
Under MRI - tested 1.9.3, 2.0.0, 2.1.0, and 2.2.0-preview:
c1 = Class.new {private; def foo; end} c2 = Class.new(c1) {public; :foo} c1.class_eval {undef foo} c2.foo => NoMethodError
Under JRuby:
c1 = Class.new {private def foo; end} c2 = Class.new(c1) {public :foo} c1.class_eval {undef foo} c2.foo => nil
This notably breaks a test in the new stdlib, to the effect of
c1 = Class.new {private def foo; end} c2 = Class.new(c1) {public :foo} c3 = Class.new(c2) {def foo; end} c1.class_eval {undef foo} m = c3.instance_method(:foo).super_method # Expects nil, gets c2's copy of #foo.
The text was updated successfully, but these errors were encountered:
This is fixed in JRuby 9k at least
[27] pry(main)> c1 = Class.new {private def foo; end} => #<Class:0x70f59913> [28] pry(main)> c2 = Class.new(c1) {public :foo} => #<Class:0x77258e59> [29] pry(main)> c1.class_eval {undef foo} => nil [30] pry(main)> c2.foo NoMethodError: undefined method `foo' for #<Class:0x77258e59> from org/jruby/RubyBasicObject.java:1595:in `method_missing' [31] pry(main)> JRUBY_VERSION => "9.0.0.0" [32] pry(main)>
Sorry, something went wrong.
No branches or pull requests
Under MRI - tested 1.9.3, 2.0.0, 2.1.0, and 2.2.0-preview:
Under JRuby:
This notably breaks a test in the new stdlib, to the effect of
The text was updated successfully, but these errors were encountered: