summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authoryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 01:13:56 +0000
committeryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 01:13:56 +0000
commitf1c33950998bf2d38d9416aa4f5dfe7f9f869f86 (patch)
tree5c1f0ccbac3e2c1c93d94a7b400c42111f580a97 /parse.y
parenta1061f557ba50ecffc7c835f88826f6340b1e471 (diff)
parse.y: Fix locations of NODE_ARRAY of mlhs_head
* parse.y: Fix to only include a range of mlhs_item (exclude ',' form range). e.g. The locations of the NODE_ARRAY is fixed: ``` (a,) = 1,2 ``` * Before ``` NODE_ARRAY (line: 1, code_range: (1,1)-(1,3)) ``` * After ``` NODE_ARRAY (line: 1, code_range: (1,1)-(1,2)) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61133 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 435f4dab30..44fa2fd6d6 100644
--- a/parse.y
+++ b/parse.y
@@ -1877,7 +1877,7 @@ mlhs_item : mlhs_node
mlhs_head : mlhs_item ','
{
/*%%%*/
- $$ = new_list($1, &@$);
+ $$ = new_list($1, &@1);
/*%
$$ = mlhs_add(mlhs_new(), $1);
%*/