-
Notifications
You must be signed in to change notification settings - Fork 185
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
binding
does not capture block
#3285
Comments
There is currently a bug in TruffleRuby ([truffleruby#3285][]) wherein `Kernel#binding` does not capture a given anonymous block, which breaks `yield` calls evaluated using that binding. This bug is preventing us from extending our rendering API. Furthermore, this bug was caught by a test unit for said API extension, but our views themselves aren't tested by CI. So if such a `yield` call were added to a view, CI would still pass but the `sdoc` command would be broken when using TruffleRuby. Also, Rails itself does not officially support TruffleRuby. Considering all of the above, this commit removes TruffleRuby from CI. [truffleruby#3285]: oracle/truffleruby#3285
Thank you for the report. def render
eval('yield', binding)
end
p render { "x" } If we look at the stacktrace with
So the eval is treated like a block inside render. |
FWIW, somewhat related:
(although that's not the exact warning on CRuby master) |
@eregon Continuing from rails/sdoc#314 (comment)...
Here is a reproduction stripped down from rails/sdoc#314:
The original test failure (before I added the workaround) was due to
ERB#result
raisingLocalJumpError: no block given (yield)
. The tests all pass on CRuby >= 2.7.The text was updated successfully, but these errors were encountered: