diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-25 12:55:47 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-25 12:55:47 +0000 |
commit | 89080e02549b607d737f81e5868ff3396d537d97 (patch) | |
tree | e9cbd5f6be78b6e61f62fab1489742081ca8e008 /parse.y | |
parent | d02ef8342cb24af29aff64ff7985594845989bdb (diff) | |
download | ruby-89080e02549b607d737f81e5868ff3396d537d97.tar.gz |
* parse.y (primary): make functional-style not operator to act
like function. see <http://d.hatena.ne.jp/ku-ma-me/20080624/p1>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -2613,6 +2613,14 @@ primary : literal $$ = dispatch1(defined, $5); %*/ } + | keyword_not '(' expr rparen + { + /*%%%*/ + $$ = call_uni_op(cond($3), '!'); + /*% + $$ = dispatch2(unary, ripper_intern("not"), $3); + %*/ + } | operation brace_block { /*%%%*/ |