Bug #8140

Incorrect warning: `+' after local variable is interpreted as binary operator

Added by Glyn Normington over 2 years ago.

Assignee:Yukihiro Matsumoto
ruby -v:ruby 1.9.3p374 (2013-01-15 revision 38858) [x86_64-darwin12.2.1] Backport:


The statement:

puts '' +''

generates an invalid warning when executed with "ruby -w" which (a) implies a syntactical ambiguity where there is none, and (b) refers to a "local variable" of which there are none.

Note that:

puts ''+''


puts '' + ''

produce no warnings.

parserbug.rb Magnifier - Simple test to reproduce (293 Bytes) Glyn Normington, 03/22/2013 12:19 AM

Also available in: Atom PDF