Bug #20741
closed
RubyVM::InstructionSequence.compile emits a wrong warning (prism?)
Added by mame (Yusuke Endoh) about 1 month ago.
Updated about 1 month ago.
Description
$ ./local/bin/ruby -we 'p RubyVM::InstructionSequence.compile("42").eval'
<compiled>:1: warning: possibly useless use of a literal in void context
42
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
- Status changed from Open to Closed
Also available in: Atom
PDF
Like0
Like0Like0Like0