aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authoryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-22 12:32:41 +0000
committeryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-22 12:32:41 +0000
commit102d249615678520a83f3f1e61307d9952aa1bf4 (patch)
treed4478060cb55b9bc188de3a7b2e68ef18a553183 /parse.y
parent13729025858d53b5fcfdfa7bb06d4dcfbdd2bf71 (diff)
downloadruby-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.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 4a12b19dad..13f20b0c85 100644
--- a/parse.y
+++ b/parse.y
@@ -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;