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

ruby-changes:49009

From: yui-knk <ko1@a...>
Date: Tue, 12 Dec 2017 09:12:48 +0900 (JST)
Subject: [ruby-changes:49009] yui-knk:r61128 (trunk): parse.y: Fix locations of NODE_ARRAY of opt_call_args

yui-knk	2017-12-12 09:12:43 +0900 (Tue, 12 Dec 2017)

  New Revision: 61128

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

  Log:
    parse.y: Fix locations of NODE_ARRAY of opt_call_args
    
    * parse.y: Fix to only include a range of assocs
      (exclude ',' form range).
    
      e.g. The locations of the NODE_ARRAY is fixed:
    
      ```
      m1(str: "bar",)
      ```
    
      * Before
    
      ```
      NODE_ARRAY (line: 1, code_range: (1,3)-(1,14))
      ```
    
      * After
    
      ```
      NODE_ARRAY (line: 1, code_range: (1,3)-(1,13))
      ```

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 61127)
+++ parse.y	(revision 61128)
@@ -2478,7 +2478,7 @@ opt_call_args	: none https://github.com/ruby/ruby/blob/trunk/parse.y#L2478
 		| assocs ','
 		    {
 		    /*%%%*/
-			$$ = $1 ? new_list(new_hash($1, &@1), &@$) : 0;
+			$$ = $1 ? new_list(new_hash($1, &@1), &@1) : 0;
 		    /*%
 			$$ = arg_add_assocs(arg_new(), $1);
 		    %*/

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

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