We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
headius
Learn more about funding links in repositories.
Report abuse
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
example.rb
puts "1" END { puts "3" } puts "2"
1 2 3
1 3 2
Found in mkmf: https://github.com/jruby/jruby/blob/master/lib/ruby/stdlib/mkmf.rb#L2721
mkmf
There appear to be some more tests for this in jt test mri ruby/test_beginendblock.rb
jt test mri ruby/test_beginendblock.rb
This should also work when requiring, e.g.: one.rb:
one.rb
puts "1" require "two" puts "2"
two.rb:
two.rb
END { puts "3" }
Should result in:
The text was updated successfully, but these errors were encountered:
The begin keyword also appears to have an issue:
puts "2" BEGIN { puts "1" } puts "3"
Expected
Actual
2 3
Sorry, something went wrong.
I can't reproduce the BEGIN case - can you verify? I get
BEGIN
@chrisseaton the BEGIN case looks good to me now
Fixed by 1c18c37. Also see #4257.
chrisseaton
No branches or pull requests
Example (
example.rb
file)Expected Behavior
Actual Behavior
Found in
mkmf
: https://github.com/jruby/jruby/blob/master/lib/ruby/stdlib/mkmf.rb#L2721There appear to be some more tests for this in
jt test mri ruby/test_beginendblock.rb
This should also work when requiring, e.g.:
one.rb
:two.rb
:Should result in:
The text was updated successfully, but these errors were encountered: