summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-25 15:49:17 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-25 15:49:17 +0000
commitd8c930dd06254f155e06872b64a6529cdb0232ab (patch)
tree68183327e769b646c7ea175a2193b4b38d350ad4 /parse.y
parent89080e02549b607d737f81e5868ff3396d537d97 (diff)
* parse.y (primary): not operand might be empty. [ruby-dev:35227]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y8
1 files changed, 8 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 2d82b7b61c..bfc8cd9823 100644
--- a/parse.y
+++ b/parse.y
@@ -2621,6 +2621,14 @@ primary : literal
$$ = dispatch2(unary, ripper_intern("not"), $3);
%*/
}
+ | keyword_not '(' rparen
+ {
+ /*%%%*/
+ $$ = NEW_LIT(Qtrue);
+ /*%
+ $$ = dispatch2(unary, ripper_intern("not"), Qnil);
+ %*/
+ }
| operation brace_block
{
/*%%%*/