From: "mame (Yusuke Endoh) via ruby-core" <ruby-core@...> Date: 2024-09-15T00:46:07+00:00 Subject: [ruby-core:119192] [Ruby master Bug#20736] prism emits wrong warnings in syntax-error code Issue #20736 has been updated by mame (Yusuke Endoh). I wonder if error recovery is needed in the interpreter's parser. It might be a benefit to be able to output almost all syntax errors in one run. However, I am not sure about the benefit, given the such confusing warnings. Well, let's stop the test warnings and try it for a while. If other problems arise, we should stop error recovery in the interpreter. ---------------------------------------- Bug #20736: prism emits wrong warnings in syntax-error code https://bugs.ruby-lang.org/issues/20736#change-109777 * Author: mame (Yusuke Endoh) * Status: Feedback * Assignee: kddnewton (Kevin Newton) * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ``` $ ./local/bin/ruby -w --parser=parse.y -e 'begin eval("0a"); rescue SyntaxError; end' $ ./local/bin/ruby -w --parser=prism -e 'begin eval("0a"); rescue SyntaxError; end' (eval at -e:1):1: warning: possibly useless use of a literal in void context ``` ``` $ ./local/bin/ruby -w --parser=parse.y -e 'begin eval("+a.0"); rescue SyntaxError; end' $ ./local/bin/ruby -w --parser=prism -e 'begin eval("+a.0"); rescue SyntaxError; end' (eval at -e:1):1: warning: possibly useless use of +@ in void context ``` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/