aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-18 08:21:46 +0000
committeryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-18 08:21:46 +0000
commitdb54a07c7537b485a2f47385ca304639f5e5ba76 (patch)
tree2f3d336e96a9d0421df04a897e34b08382e64f05
parent389c80cec1009037fa56f012cc24f0797f5ab5b0 (diff)
downloadruby-db54a07c7537b485a2f47385ca304639f5e5ba76.tar.gz
parse.y: Fix the locations of NODE_DVAR and NODE_LVAR
* parse.y: Fix the locations of NODE_DVAR and NODE_LVAR when it's a multiple assignment method parameter. e.g. The locations of NODE_DVAR is fixed: ``` a {|(b, c)| d} ``` * Before ``` NODE_DVAR (line: 1, first_lineno: 1, first_column: 4, last_lineno: 1, last_column: 10) ``` * After ``` NODE_DVAR (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 9) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index ba6d4c472c..767a0a1dbe 100644
--- a/parse.y
+++ b/parse.y
@@ -4640,10 +4640,10 @@ f_arg_item : f_arg_asgn
arg_var(tid);
/*%%%*/
if (dyna_in_block()) {
- $2->nd_value = new_dvar(tid, &@$);
+ $2->nd_value = new_dvar(tid, &@2);
}
else {
- $2->nd_value = new_lvar(tid, &@$);
+ $2->nd_value = new_lvar(tid, &@2);
}
$$ = NEW_ARGS_AUX(tid, 1);
$$->nd_next = $2;