-
-
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
LocalJumpError: yield called out of block in JRuby 9.0.0.0.pre2 #3009
Comments
Looking into this. |
If it's any help, I've played around with the aws-sdk v2. as per: https://ruby.awsblog.com/post/Tx1K43Z7KXHM5D5/Uploading-Files-to-Amazon-S3 |
See https://github.com/LTe/grape-rabl that would/is still failing in this way. |
@dblock It is possible 1.7 and 9k have the same problem (localjumperror has been due to lots of issues) but could you open your grape-rabl issue as a new one? Even if they are the same underlying problem the impls are so different wrt to non-local flow control and they will end up as completely different fixes (plus this also works a little nicer with github issues...yeah bonus!). |
Reproduction: def members
Enumerator.new do |y|
[1, 2, 3, 4].map do |n|
y.yield([n, n], n)
end
end
end
def index_members_by_location_name
members.each.with_object({}) do |(name, shape), hash|
p [name, shape, hash]
end
end
index_members_by_location_name |
Ahh I see the problem here. The code in aws-sdk does I call this an unusual form because generally if you have an Enumerable object, you'd just call |
I tried to find a workaround for Rabl, but failed. You can see nesquena/rabl#544 for details. |
I think I have the fix, after a bit of fiddling around. |
@headius I would love an explanation of what's going on in Rabl with this and possibly a work-around so that works with all existing versions. |
* Implemented Enumerator#peek_values * Implemented Enumerator#next_values * Implemented Enumerator#feed method * Set feedValue to nil for Enumerator#next_values method as well * Reduce getRuntime/context.runtime calls for better performance * Fix the bug with size with each_slice without block * Return Enumerator self calling #each with no block. Fixes #3009. + back-port-fix: make sure feedValue is always initialized
We got this bug report in Tilt (https://gith/ub.com/rtomayko/tilt/issues/235#issuecomment-107020136) by @TobiG77. I think this is a bug in JRuby?
The text was updated successfully, but these errors were encountered: