-
-
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
IRReturnJump unhandled #3713
Comments
Possibly related as well: I got the same exception when running rdebug and setting up a break
|
When trying to generate any documentation with 9.0.4.0: I get:
|
This should not be leaking out of the system (internal exception) and it sounds like rdoc probably hits it pretty easily. I ran yard tests against 9.1.0.0 so I am curious @cshupp1 if you see this same error for yardoc? |
Yes, I initially saw it in yardoc. The second code section is yardoc btw. Via rake doc:app I think it is bombing on this file: |
@cshupp1 but could you verify this is broken with 9.1.2.0 since I know I did green test run with yard for 9.1.0.0? You said 9.0.4.0 and I am wondering if some/all of this has been corrected in a later release. |
I will pull 9.1.2.0 now. |
Still broken...
|
I didn't blow away and reinstall my bundle or anything. I can't imagine that would be needed... |
@cshupp1 thanks for confirming. Locally, I can run yarddoc on jruby project home (with lots of various issues with syntax) but so far no IRReturnJump. I am wondering if it only happens when it is roaming over some specific ruby syntax? Using @chrisseaton command-line on Truffle no longer seems to be an issue for me. I will poke a little bit. |
If it helps, you can grab our source. https://github.com/VA-CTT/rails_prisme The read me has instructions on the sub-module. I suspect the issue is there. |
@cshupp1 ok hopefully I see the issue. I tried running rdoc on empty Rails app and did not hit any issues... |
|
You did it!! |
err saved that comment a bit early. Looks like rails_prisme itself contains something which triggers it. So not to remove stuff until I get which file it is...or hmm I bet rdoc has a debug mode... |
Ok minimized this to an eval with BEGIN containing a return: def foo
eval("BEGIN {return true}")
end
foo |
Wow. That shutdown my entire rails console.
|
ok reduced this a little more. BEGIN is not important: def foo
eval "return 1"
end
p foo So the explicit return will be seen by method foo as a return value. |
Which file of ours gave you this clue? On Thu, Jun 2, 2016, 5:28 PM Thomas E Enebo notifications@github.com
|
@cshupp1 what is odd is it is in to_html.rb in rdoc: def parseable? text
eval("BEGIN {return true}\n#{text}")
rescue SyntaxError
false
end I am testing the fix now. Basically, if we see an eval we have to add some extra handling just in case the eval throws a non-local return. Luckily, in IR, this is just setting a flag IRFlags.CAN_RECEIVE_NONLOCAL_RETURNS. Once we set that on a scope it will just put that exception plumbing in... |
Thanks! On Thu, Jun 2, 2016, 6:02 PM Thomas E Enebo notifications@github.com
|
In JRuby 9.1.6.0 and 9.1.7.0, explicitly returning values will result in For example
I understand that wrapping returns in a function definition will work:
I also understand that wrapping returns in a block definition will return the expected MRI error:
Why does an explicit return outside of a block or function definition cause IRB to crash? |
@dqdinh can you open a new issue for this (we are not handling some case of eval properly wrt eval). The error thrown is the same but the actual cause must be different since this issue is resolved. |
(Not using Truffle, it's just that it showed up on our CI system when building our documentation)
Might be related to #3673 - not sure.
The text was updated successfully, but these errors were encountered: