-
-
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
Thread::Backtrace::Location#label for blocks does not include number of levels #5165
Comments
This has dragged on for a while but it might be really simple...just count the number of block scopes to the nearest method scope and that's the number. @ivoanjo If your offer still stands, I'd love to see the specs. You can submit to JRuby's spec/ruby dir too. |
Ok so some complications here...
And of course the MRI-based backtrace formatter would need to be made aware of this level. Neither of these are that hard, but they would introduce some possibly-risky changes for 9.2.8. |
Yeap, just sent them! I've opened a PR to ruby spec, but if you have any ideas of specs that would make sense in the context of JRuby's spec/ruby, let me know 🙏 |
JIT will require extra info in the mangled name and we will be putting out 9.2.9.0 soon...punting |
I ran into this again because there are specs for rescue and ensure that would pass if we fixed this:
These are new failures for JRuby 10 due to CRuby folks reverting some logic that inserted extra frames for ensure/rescue blocks. Would be nice to fix this for 10. |
Hello again!
I'm using
Thread#backtrace_locations
and noticed several differences between MRI and JRuby.I'll report them separately because they may have different fixes, but feel free to mark any as duplicate if it makes sense to do so.
Environment
jruby 9.1.17.0 (2.3.3) 2018-04-20 d8b1ff9 Java HotSpot(TM) 64-Bit Server VM 25.171-b11 on 1.8.0_171-b11 +jit [linux-x86_64]
Linux u186024434db159d25c92 4.13.0-39-generic #44~16.04.1-Ubuntu SMP Thu Apr 5 16:43:10 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 16.04.4 LTS
Expected Behavior
When looking at a
Thread::Backtrace::Location
, for a nested block, MRI returns as part of the#label
the nesting level.Testcase:
Output on MRI:
Actual Behavior
JRuby does not include the nesting level in the output:
If it would be helpful I can also submit a testcase to RubySpec.
The text was updated successfully, but these errors were encountered: