diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-25 12:31:35 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-25 12:31:35 +0000 |
commit | dd7825791998cec788896b1afb4e87f46dc56440 (patch) | |
tree | 5405dc36a9db7536090b7744cc7cb2fcf315babe /parse.y | |
parent | 9a4d1207367234939e9b15eec841250a606807c2 (diff) | |
download | ruby-dd7825791998cec788896b1afb4e87f46dc56440.tar.gz |
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
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)) %*/ |