ruby/test/prism/errors/unterminated_method_parameters.txt
Aaron Patterson 6877c38866 [ruby/prism] Fix error messages for unterminated ( and {
If we hit an EOF token, and the character before the EOF is a newline,
we should make EOF token start at the previous newline.  That way any
errors reported will occur on that line.

For example "foo(\n" should report an error on line 1 even though the
EOF technically occurs on line 2.

[Bug #20918]
https://bugs.ruby-lang.org/issues/20918

60bc43de8e
2024-12-05 18:42:01 +00:00

3 lines
75 B
Text

foo(
^ unexpected end-of-input; expected a `)` to close the arguments