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

ruby-changes:49007

From: yui-knk <ko1@a...>
Date: Tue, 12 Dec 2017 08:38:05 +0900 (JST)
Subject: [ruby-changes:49007] yui-knk:r61126 (trunk): parse.y: Fix locations of NODE_ARRAY in NODE_BLOCK_PASS

yui-knk	2017-12-12 08:38:00 +0900 (Tue, 12 Dec 2017)

  New Revision: 61126

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

  Log:
    parse.y: Fix locations of NODE_ARRAY in NODE_BLOCK_PASS
    
    * parse.y: Fix to only include a range of assocs.
    
      e.g. The locations of the NODE_ARRAY is fixed:
    
      ```
      m1(str: "bar", &blk)
      ```
    
      * Before
    
      ```
      NODE_ARRAY (line: 1, code_range: (1,3)-(1,19))
      ```
    
      * After
    
      ```
      NODE_ARRAY (line: 1, code_range: (1,3)-(1,13))
      ```

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 61125)
+++ parse.y	(revision 61126)
@@ -2505,7 +2505,7 @@ call_args	: command https://github.com/ruby/ruby/blob/trunk/parse.y#L2505
 		| assocs opt_block_arg
 		    {
 		    /*%%%*/
-			$$ = $1 ? new_list(new_hash($1, &@1), &@$) : 0;
+			$$ = $1 ? new_list(new_hash($1, &@1), &@1) : 0;
 			$$ = arg_blk_pass($$, $2);
 		    /*%
 			$$ = arg_add_assocs(arg_new(), $1);

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

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