mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
389c80cec1
commit
db54a07c75
1 changed files with 2 additions and 2 deletions
4
parse.y
4
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;
|
||||
|
|
Loading…
Reference in a new issue