Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
break within a block throws LocalJumpError in JRuby but succeeds in MRI Ruby #4369
I expect the above code to print
MRI Ruby 2.3.0
JRuby behavior in 220.127.116.11, 18.104.22.168 and 1.7.19 is to throw a LocalJumpError:
I'm surprised this works on MRI. I was under the impression that break can never escape a lambda body.
Confirmed on master:
Note that it works fine if you change the
This may be an IR thing or just a Proc thing.
The commit that was possibly regressed was between 1.7.19 and 1.7.20.