Project

General

Profile

Actions

Bug #201

closed

Re: [ruby-cvs:24798] Ruby:r17573 (trunk): * parse.y (primary): make functional-style not operator to act

Added by usa (Usaku NAKAMURA) over 16 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
Backport:
[ruby-dev:35227]

Description

=begin
こんにちは、なかむら(う)です。

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 http://d.hatena.ne.jp/ku-ma-me/20080624/p1.

遠藤さんに教えてもらったのですが、この変更で
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
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0