Actions
Bug #5214
closed"not (true)" should not warn "(...) interpreted as grouped expression"
Description
If you have a space between "not" and "(" ruby will warn.
Since it is normal to use "not" with a grouped expression ruby should not warn
The workaround is to remove the space or change to "!" instead of "not"
Updated by ko1 (Koichi Sasada) about 13 years ago
- Assignee set to nobu (Nobuyoshi Nakada)
Updated by shyouhei (Shyouhei Urabe) about 13 years ago
- Status changed from Open to Assigned
Updated by shugo (Shugo Maeda) over 12 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r36434.
Eric, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
-
parse.y (primary): allow an empty grouped expression as the
operand of the not operator (e.g., not ()).
[ruby-core:45976] [Bug #6674] -
parse.y (parser_yylex): show no warning for a grouped expression
as the operand of the not operator (e.g., not (a)) or as an
argument of a method call without parentheses (e.g., foo (a)).
[ruby-core:39050] [Bug #5214]
Actions
Like0
Like0Like0Like0