summaryrefslogtreecommitdiff
path: root/test/prism/errors/endless_method_command_call_parameters.txt
AgeCommit message (Collapse)Author
2025-11-06[ruby/prism] Reject `def f a, (b) = 1`Earlopain
Fixes [#Bug 21660], followup to https://github.com/ruby/prism/pull/3674 https://github.com/ruby/prism/commit/fb445a49e5 Co-Authored-By: tomoya ishida <tomoyapenguin@gmail.com>
2025-10-08[ruby/prism] For these special cases, there exists no optional argument ↵Earlopain
type. Since a endless method is started with `=`, there was ambiguity here. We have to simply reject these in all cases. This adds a new error for the following reason: * `def foo arg = nil` is interpreted as a normal method call with optional `arg` without matching `end` * `def foo *arg = nil; end` is interpreted as a endless method call that has body `nil` with extraneous `end` `def foo *arg = nil` is somewhere inbetween and I don't know how to otherwise indicate the error. Now the second case above also shows the newly added error message. Fixes [Bug #21623] https://github.com/ruby/prism/commit/e1910d4492