зеркало из https://github.com/github/ruby.git
Fix locations of NODE_UNDEF in undef with multiple args
* parse.y: Fix the beginning position of trailing NODE_UNDEF. e.g. The location of the NODE_UNDEF for `b` is fixed: ``` undef a, b ``` * Before ``` NODE_UNDEF (line: 1, location: (1,6)-(1,10)) ``` * After ``` NODE_UNDEF (line: 1, location: (1,9)-(1,10)) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
9a4d120736
Коммит
dd78257919
2
parse.y
2
parse.y
|
@ -1784,7 +1784,7 @@ undef_list : fitem
|
|||
| undef_list ',' {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);} fitem
|
||||
{
|
||||
/*%%%*/
|
||||
NODE *undef = NEW_UNDEF($4, &@$);
|
||||
NODE *undef = NEW_UNDEF($4, &@4);
|
||||
$$ = block_append(p, $1, undef);
|
||||
/*% %*/
|
||||
/*% ripper: rb_ary_push($1, get_value($4)) %*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче