Project

General

Profile

Actions

Bug #8140

closed

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

Added by glyn (Glyn Normington) about 11 years ago. Updated almost 5 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3p374 (2013-01-15 revision 38858) [x86_64-darwin12.2.1]
[ruby-core:53609]

Description

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 ''+''

and:

puts '' + ''

produce no warnings.


Files

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

Also available in: Atom PDF

Like0
Like0Like0