-
-
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
NullPointerException when using refinement including multiple modules and calling super #4237
Comments
@jeremyevans Hey, I have been looking at this and determined it's more of a problem with how we handle super inside a module than refinements specifically. For the moment I do not have a fix. Can you show me where you're using this pattern? |
Here are the Sequel specs that fail with NullPointerException on JRuby if the guards are removed from the top of the file: https://github.com/jeremyevans/sequel/blob/master/spec/extensions/core_refinements_spec.rb#L29 There are some other refinement related failures on JRuby that I added guards for at the same time, but may be a different refinement issue. All 4 specs in this block still fail on JRuby 9.2.5.0 if the guard is removed: https://github.com/jeremyevans/sequel/blob/master/spec/extensions/s_spec.rb#L32 Here's the related commit to add the guards: |
I probably should have added links to the refinements themselves: https://github.com/jeremyevans/sequel/blob/master/lib/sequel/extensions/core_refinements.rb |
@jeremyevans Ok thank you. This will likely be fixed separate from the refinement work, since it's a symptom of the larger problem described in #5585, but we will prioritize it higher since it does get used in real-world code. |
This is still not fixed on master, but it's not a bug in refinements. Calls of the form Running it without JIT works fine:
This will be fixed before 9.2.7 since behavior differs between interpreter and JIT. |
Oh FWIW it doesn't NPE now.
|
Environment
Provide at least:
jruby 9.1.5.0 (2.3.1) 2016-09-07 036ce39 OpenJDK 64-Bit Server VM 25.72-b15 on 1.8.0_72-b15 +jit [OpenBSD-x86_64]
OpenBSD foo 6.0 GENERIC.MP#0 amd64
Also tested with 9.1.1.0 on Windows, same issue.
Expected Behavior
On ruby, prints
[:a, [1, 1]]
Actual Behavior
On jruby:
The text was updated successfully, but these errors were encountered: