-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Prepending a module to a module extended by a class gives NPE when calling super
#4678
Milestone
Comments
super
Workaround is to postpone the Possible duplicate of #4531. |
This no longer NPEs but still fails:
|
Slightly simpler example: module X
def foo
puts "super"
end
end
class B
class << self
include X
end
end
module C
def foo
super
end
end
X.prepend C
B.foo |
doudou/flexmock#16 is another case of this; FlexMock prepends a proxy module onto the target class, which in that case is a class's class. |
Fixed in PR #6777 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jruby 9.1.12.0 (2.3.3) 2017-06-15 33c6439 Java HotSpot(TM) 64-Bit Server VM 25.112-b16 on 1.8.0_112-b16 +jit [darwin-x86_64]
Darwin Gratass.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
Given the following code:
JRuby 9.1.12.0 gives the following stack trace:
With MRI 2.4.1 it prints "super".
The text was updated successfully, but these errors were encountered: