
Issue #20918 has been updated by tenderlovemaking (Aaron Patterson). mame (Yusuke Endoh) wrote in #note-6:
@tenderlovemaking Thank you for fixing the issue, but it still shows line 2 in the code snippet.
``` $ ruby -e "foo(" -e: -e:1: syntax error found (SyntaxError)
1 | foo( | ^ unexpected end-of-input; expected a `)` to close the arguments 2 |
I don't think ` 2 |` should be printed.
Strange. Thank you, I'll try to figure it out! ---------------------------------------- Bug #20918: Prism error indicates line number of `-e` that does not exist https://bugs.ruby-lang.org/issues/20918#change-110986 * Author: mame (Yusuke Endoh) * Status: Assigned * Assignee: prism * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ``` $ ruby -e 'foo(' -e: -e:2: syntax error found (SyntaxError) 1 | foo(
2 | | ^ unexpected end-of-input; expected a `)` to close the arguments
It says `-e:2`, but there is no line 2 in `-e 'foo('`.
`eval("foo(")` reports line 1, so I guess this issue is only for `-e`.
--
https://bugs.ruby-lang.org/