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 | 933fabd1b9a48591dc589527c5f99b64598dd2e9 (patch) | |
tree | 52d9a8555085a925eba87ae39d7f6fd168f3f74d | |
parent | 79aba225b2ea4a54f3c52e0b4bb66083164343c7 (diff) | |
download | ruby-933fabd1b9a48591dc589527c5f99b64598dd2e9.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
-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; |