From: "U.Nakamura" Date: 2008-06-25T22:33:26+09:00 Subject: [ruby-dev:35227] [Bug:trunk] Re: [ruby-cvs:24798] Ruby:r17573 (trunk): * parse.y (primary): make functional-style not operator to act こんにちは、なかむら(う)です。 In message "[ruby-cvs:24798] Ruby:r17573 (trunk): * parse.y (primary): make functional-style not operator to act" on Jun.25,2008 21:55:48, wrote: > matz 2008-06-25 21:55:47 +0900 (Wed, 25 Jun 2008) > > New Revision: 17573 (snip) > Log: > * parse.y (primary): make functional-style not operator to act > like function. see . 遠藤さんに教えてもらったのですが、この変更で not() がパースエラーになるようになっています(従来はtrueを返す)。 修正してみました。 Index: parse.y =================================================================== --- parse.y (revision 17573) +++ parse.y (working copy) @@ -2621,6 +2621,14 @@ primary : literal $$ = dispatch2(unary, ripper_intern("not"), $3); %*/ } + | keyword_not '(' rparen + { + /*%%%*/ + $$ = call_uni_op(cond(NEW_NIL()), '!'); + /*% + $$ = dispatch2(unary, ripper_intern("not"), Qnil); + %*/ + } | operation brace_block { /*%%%*/ それでは。 -- U.Nakamura