Project

General

Profile

Actions

Bug #6674

closed

1.9 parser regression: not ()

Added by zenspider (Ryan Davis) over 11 years ago. Updated over 11 years ago.

Status:
Closed
Target version:
-
ruby -v:
1.9 & 2.0
Backport:
[ruby-core:45976]

Description

4482 % ruby18 -v
ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0]
4483 % ruby19 -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
4484 % ruby18 -cwe '! (a); not (a); ! (); not ()'
Syntax OK
4485 % ruby19 -cwe '! (a)'
Syntax OK
4486 % ruby19 -cwe 'not (a)'
-e:1: warning: (...) interpreted as grouped expression
Syntax OK
4487 % ruby19 -cwe '! ()'
Syntax OK
4488 % ruby19 -cwe 'not ()'
-e:1: syntax error, unexpected ')'
4489 % ruby20 -v
ruby 2.0.0dev (2012-05-05 trunk 35541) [x86_64-darwin11.3.0]
4490 % ruby20 -cwe '! (a)'
Syntax OK
4491 % ruby20 -cwe 'not (a)'
-e:1: warning: (...) interpreted as grouped expression
Syntax OK
4492 % ruby20 -cwe '! ()'
Syntax OK
4493 % ruby20 -cwe 'not ()'
-e:1: warning: (...) interpreted as grouped expression
-e:1: syntax error, unexpected ')'
4494 %


Files

not.diff (628 Bytes) not.diff shugo (Shugo Maeda), 07/04/2012 05:29 PM

Related issues 2 (0 open2 closed)

Related to Ruby master - Bug #19281: SyntaxError if first argument of command call has semicolon inside parenthesisClosedActions
Is duplicate of Ruby master - Bug #5214: "not (true)" should not warn "(...) interpreted as grouped expression" Closednobu (Nobuyoshi Nakada)08/23/2011Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0