Actions
Bug #20751
closedRegression in Prism related to use of return in default argument values
Bug #20751:
Regression in Prism related to use of return in default argument values
Description
All versions of parse.y dating at least back to Ruby 1.8.7, and Prism in both Ruby 3.3.5 and 3.4.0preview1, correctly parses this code:
The master branch, unless --parser=parse.y is used, now considers this a SyntaxError:
Updated by jeremyevans0 (Jeremy Evans) almost 2 years ago
- Subject changed from Regression in Prism related to use of super in default argument values to Regression in Prism related to use of return in default argument values
Updated by kddnewton (Kevin Newton) almost 2 years ago
I believe this was fixed this morning. Could you double-check that this is still an issue?
Updated by jeremyevans0 (Jeremy Evans) almost 2 years ago
- Status changed from Open to Closed
kddnewton (Kevin Newton) wrote in #note-2:
I believe this was fixed this morning. Could you double-check that this is still an issue?
Looks like it is fixed in ruby/prism, but not ruby/ruby, since https://github.com/ruby/prism/commit/e98ea155960eb98649f3990da19635e63f52ba28 is not yet merged to ruby/ruby. I'll close this as I assume it will be merged to ruby/ruby soon.
Actions