1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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))
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yui-knk 2017-12-11 23:38:00 +00:00
parent 1f4ac8860b
commit f9d8003c94

View file

@ -2505,7 +2505,7 @@ call_args : command
| 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);