diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-09 03:18:55 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-09 03:18:55 +0000 |
commit | 013d0e56a84b1d2989c961e9fb56d2c42f981aa7 (patch) | |
tree | 52d9a8555085a925eba87ae39d7f6fd168f3f74d /parse.y | |
parent | 15c3e4e92cd88c4875f3a6fe19ae2d4c13cbd423 (diff) | |
download | ruby-013d0e56a84b1d2989c961e9fb56d2c42f981aa7.tar.gz |
parse.y: Fix locations of NODE_ARRAY in NODE_OPCALL(nd_args)
* parse.y: Fix to only include a range of arg1.
e.g. The locations of the NODE_ARRAY is fixed:
```
1 + 2
```
* Before
```
NODE_ARRAY (line: 1, code_range: (1,0)-(1,5))
```
* After
```
NODE_ARRAY (line: 1, code_range: (1,4)-(1,5))
```
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -9223,7 +9223,7 @@ call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1, NODE *expr; value_expr(recv); value_expr(arg1); - expr = NEW_OPCALL(recv, id, new_list(arg1, location)); + expr = NEW_OPCALL(recv, id, new_list(arg1, &arg1->nd_loc)); nd_set_line(expr, op_loc->first_loc.lineno); expr->nd_loc = *location; return expr; |