[ruby-core:119194] [Ruby master Bug#20741] RubyVM::InstructionSequence.compile emits a wrong warning (prism?)

Issue #20741 has been reported by mame (Yusuke Endoh). ---------------------------------------- Bug #20741: RubyVM::InstructionSequence.compile emits a wrong warning (prism?) https://bugs.ruby-lang.org/issues/20741 * Author: mame (Yusuke Endoh) * Status: Open * Assignee: kddnewton (Kevin Newton) * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ``` $ ./local/bin/ruby -we 'p RubyVM::InstructionSequence.compile("42").eval' <compiled>:1: warning: possibly useless use of a literal in void context 42 ``` -- https://bugs.ruby-lang.org/

Issue #20741 has been updated by byroot (Jean Boussier).
prism?
Yes: ``` $ ./miniruby --parser=parse.y -we 'p RubyVM::InstructionSequence.compile("42").eval' 42 $ ./miniruby --parser=prism -we 'p RubyVM::InstructionSequence.compile("42").eval' <compiled>:1: warning: possibly useless use of a literal in void context 42 ``` ---------------------------------------- Bug #20741: RubyVM::InstructionSequence.compile emits a wrong warning (prism?) https://bugs.ruby-lang.org/issues/20741#change-109779 * Author: mame (Yusuke Endoh) * Status: Open * Assignee: kddnewton (Kevin Newton) * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ``` $ ./local/bin/ruby -we 'p RubyVM::InstructionSequence.compile("42").eval' <compiled>:1: warning: possibly useless use of a literal in void context 42 ``` -- https://bugs.ruby-lang.org/

Issue #20741 has been updated by kddnewton (Kevin Newton). I have submitted a PR that will fix this https://github.com/ruby/ruby/pull/11632. ---------------------------------------- Bug #20741: RubyVM::InstructionSequence.compile emits a wrong warning (prism?) https://bugs.ruby-lang.org/issues/20741#change-109800 * Author: mame (Yusuke Endoh) * Status: Open * Assignee: kddnewton (Kevin Newton) * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ``` $ ./local/bin/ruby -we 'p RubyVM::InstructionSequence.compile("42").eval' <compiled>:1: warning: possibly useless use of a literal in void context 42 ``` -- https://bugs.ruby-lang.org/
participants (3)
-
byroot (Jean Boussier)
-
kddnewton (Kevin Newton)
-
mame (Yusuke Endoh)