summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authoryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-03 23:12:01 +0000
committeryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-03 23:12:01 +0000
commit64d1a9e3ac27891653e08d3741bd0da2565ecfe2 (patch)
treeaf68596376ddc53ddb8325718428d90791951931 /parse.y
parent389bda457a67409757a64ef62e53e5fc2c77dc02 (diff)
parse.y: Fix a location of NODE_ZARRAY
* parse.y: Fix to only include a range of opt_call_args. e.g. The locations of the NODE_ZARRAY is fixed: ``` a[] ||= 1 ``` * Before ``` NODE_ZARRAY (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 9) ``` * After ``` NODE_ZARRAY (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 3) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 95b7f21d0a..0f1c96e075 100644
--- a/parse.y
+++ b/parse.y
@@ -1511,7 +1511,7 @@ command_asgn : lhs '=' command_rhs
NODE *args;
value_expr($6);
- $3 = make_array($3, &@$);
+ $3 = make_array($3, &@3);
args = arg_concat($3, $6, &@$);
if ($5 == tOROP) {
$5 = 0;
@@ -2161,7 +2161,7 @@ arg : lhs '=' arg_rhs
NODE *args;
value_expr($6);
- $3 = make_array($3, &@$);
+ $3 = make_array($3, &@3);
if (nd_type($3) == NODE_BLOCK_PASS) {
args = NEW_ARGSCAT($3, $6);
args->nd_loc = @$;