[前][次][番号順一覧][スレッド一覧]

ruby-changes:39535

From: nobu <ko1@a...>
Date: Mon, 17 Aug 2015 20:56:50 +0900 (JST)
Subject: [ruby-changes:39535] nobu:r51616 (trunk): parse.y: revert arg in r47649

nobu	2015-08-17 20:56:31 +0900 (Mon, 17 Aug 2015)

  New Revision: 51616

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51616

  Log:
    parse.y: revert arg in r47649
    
    * parse.y (arg): revert a part of r47649.

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 51615)
+++ parse.y	(revision 51616)
@@ -2360,24 +2360,14 @@ arg		: lhs '=' arg https://github.com/ruby/ruby/blob/trunk/parse.y#L2360
 			$$ = dispatch1(defined, $4);
 		    %*/
 		    }
-		| arg '?'
-		    {
-			$<val>$ = cond_stack;
-			cond_stack = 0;
-			COND_PUSH(1);
-		    }
-		  arg opt_nl ':'
-		    {
-			cond_stack = $<val>3;
-		    }
-		  arg
+		| arg '?' arg opt_nl ':' arg
 		    {
 		    /*%%%*/
 			value_expr($1);
-			$$ = new_if($1, $4, $8);
+			$$ = new_if($1, $3, $6);
 			fixpos($$, $1);
 		    /*%
-			$$ = dispatch3(ifop, $1, $4, $8);
+			$$ = dispatch3(ifop, $1, $3, $6);
 		    %*/
 		    }
 		| primary

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]