diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-22 12:32:41 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-22 12:32:41 +0000 |
commit | 102d249615678520a83f3f1e61307d9952aa1bf4 (patch) | |
tree | d4478060cb55b9bc188de3a7b2e68ef18a553183 /parse.y | |
parent | 13729025858d53b5fcfdfa7bb06d4dcfbdd2bf71 (diff) | |
download | ruby-102d249615678520a83f3f1e61307d9952aa1bf4.tar.gz |
parse.y: Fix the locations of NODE_BLOCK_PASS
* parse.y (arg_blk_pass): Update the first location of
NODE_BLOCK_PASS if nd_head is assigned.
e.g. The locations of NODE_BLOCK_PASS is fixed:
```
a(1, &:to_s)
```
* Before
```
NODE_BLOCK_PASS (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 11)
```
* After
```
NODE_BLOCK_PASS (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 11)
```
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -10698,6 +10698,8 @@ arg_blk_pass(NODE *node1, NODE *node2) { if (node2) { node2->nd_head = node1; + nd_set_lineno(node2, nd_lineno(node1)); + nd_set_column(node2, nd_column(node1)); return node2; } return node1; |