summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-09 03:18:55 +0000
committeryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-09 03:18:55 +0000
commit933fabd1b9a48591dc589527c5f99b64598dd2e9 (patch)
tree52d9a8555085a925eba87ae39d7f6fd168f3f74d
parent79aba225b2ea4a54f3c52e0b4bb66083164343c7 (diff)
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.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 1c3fe00893..3aee868783 100644
--- a/parse.y
+++ b/parse.y
@@ -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;