mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00

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
3 lines
75 B
Text
3 lines
75 B
Text
foo(
|
|
^ unexpected end-of-input; expected a `)` to close the arguments
|
|
|