Earlopain b8f8d646a6 [ruby/prism] For these special cases, there exists no optional argument 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
2025-10-08 13:04:57 +00:00
..
2025-09-13 14:00:04 +00:00
2025-09-12 19:07:20 +00:00
2025-09-13 14:00:04 +00:00