We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
require "optparse" opt = OptionParser.new opt.def_option(/^[^-]/) {} begin opt.parse(["-t"]) rescue OptionParser::InvalidOption p $!.args end
The text was updated successfully, but these errors were encountered:
make test-all
I'm not sure what the issue here is. Both Ruby and prism outputs ["-t"] for me.
["-t"]
Sorry, something went wrong.
@peterzhu2118 really? Ruby outputs ["-t"] for me and prism outputs ["-t", "-t"]
["-t", "-t"]
This works for me on ruby/ruby@731367d0ab.
I found a minimum repro:
calls = [] begin begin rescue RuntimeError calls << 1 else calls << 2 raise RuntimeError end rescue RuntimeError end calls
It should output [2] but outputs [2, 1].
[2]
[2, 1]
[PRISM] Fix else with rescue
eabf9b4
Fixes ruby/prism#2307.
cb98b01
peterzhu2118
Successfully merging a pull request may close this issue.
The text was updated successfully, but these errors were encountered: