ruby/test/prism/errors/command_calls_34.txt
Earlopain 71067aa54c [ruby/prism] Reject argument command call taking a block with more trailing arguments
https://bugs.ruby-lang.org/issues/21168#note-5

The added code samples align with `parse.y`, except for `foo(bar baz do end)` which `parse.y` currently rejects but shouldn't.

https://github.com/ruby/prism/commit/3a4e102d80
2025-09-19 16:55:01 +00:00

25 lines
942 B
Plaintext

foo(bar 1 do end, 2)
^ invalid comma
^ unexpected integer; expected a `)` to close the arguments
^ unexpected integer, expecting end-of-input
^ unexpected ')', expecting end-of-input
^ unexpected ')', ignoring it
foo(bar 1 do end,)
^ invalid comma
foo(1, bar 2 do end)
^ unexpected integer; expected a `)` to close the arguments
^ unexpected integer, expecting end-of-input
^~ unexpected 'do', expecting end-of-input
^~ unexpected 'do', ignoring it
^~~ unexpected 'end', ignoring it
^ unexpected ')', ignoring it
foo(1, bar 2)
^ unexpected integer; expected a `)` to close the arguments
^ unexpected integer, expecting end-of-input
^ unexpected ')', expecting end-of-input
^ unexpected ')', ignoring it