1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
matz 2008-06-25 15:49:17 +00:00
parent 89080e0254
commit d8c930dd06
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Thu Jun 26 00:48:31 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* parse.y (primary): not operand might be empty. [ruby-dev:35227]
Wed Jun 25 21:54:34 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* parse.y (primary): make functional-style not operator to act

View file

@ -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
{
/*%%%*/