-
-
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
END doesn't capture the environment #4257
Comments
See 1c18c37 |
@chrisseaton yeah don't take that musing seriously. You are also correct END does not make it's own variable scope (you can tell too if you invoke local_variables in script and in END. I want to mention one other not well known thing: END { p 1 }
END { p 2 } This will print 2 then 1 since end blocks are executed last to first. |
Closing due to inactivity. |
This is clearly still not fixed. Re-opening. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PostExeParseNode#getScope()
is null when it comes out of the parser. It should be the top level scope I think.There's some musings here about the limitations of the implementation of
END
that might relevant.jruby/core/src/main/java/org/jruby/ir/IRBuilder.java
Line 3299 in bc7c127
I don't think dropping support for
END
is a good idea though - it's used at least inmkmf
andprofile
.The text was updated successfully, but these errors were encountered: