summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authoryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-04 07:16:31 +0000
committeryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-04 07:16:31 +0000
commit2208c6b442b9ddea2d16f260a0201a33fdab14ce (patch)
tree538687ecf0aeedd32cf5e215cb083785be0591c8 /parse.y
parentb7de978e450779103dfe62084ce87757c5acae7d (diff)
downloadbundler-2208c6b442b9ddea2d16f260a0201a33fdab14ce.tar.gz
parse.y: Fix a location of NODE_ARRAY in NODE_ARGSCAT
* parse.y: Fix the first location to be equal to the location of the first element of NODE_ARRAY. e.g. The locations of the NODE_ARRAY is fixed: ``` m(*a, :b, :c) ``` * Before ``` NODE_ARRAY (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 12) ``` * After ``` NODE_ARRAY (line: 1, first_lineno: 1, first_column: 6, last_lineno: 1, last_column: 12) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 0f1c96e075..0ef57b6d4a 100644
--- a/parse.y
+++ b/parse.y
@@ -10060,7 +10060,7 @@ arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2, const YYL
node1->nd_head = arg_append(node1->nd_head, node2, location);
return node1;
case NODE_ARGSPUSH:
- node1->nd_body = list_append(new_list(node1->nd_body, location), node2, location);
+ node1->nd_body = list_append(new_list(node1->nd_body, &node1->nd_body->nd_loc), node2, location);
nd_set_type(node1, NODE_ARGSCAT);
return node1;
}