We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When a class has prepended a module, the superclass is reported as itself.
module M; end class C prepend M end C.superclass # => C (in JRuby 9.0.0.0) # => Object (in MRI 2.2.3)
I had a look here: https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/RubyClass.java#L1119
It looks as though we are walking up the inheritance chain and returning the first non-module we find.
The text was updated successfully, but these errors were encountered:
Specify superclass in respect to prepend
superclass
prepend
71320a2
This is mainly for jruby/jruby#3276, but also seemed somewhat unspecified for CRuby - or at least based on my searching through rubyspec.
9836945
2008589
No branches or pull requests
When a class has prepended a module, the superclass is reported as itself.
I had a look here: https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/RubyClass.java#L1119
It looks as though we are walking up the inheritance chain and returning the first non-module we find.
The text was updated successfully, but these errors were encountered: