summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authoryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-04 23:59:02 +0000
committeryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-04 23:59:02 +0000
commitfaf43e37ad6de554812ee5c7fe94a1d32ae0a146 (patch)
treeda0b1b3fc5a8d9397a2347d0c9a30f9b998c763d /parse.y
parent5a8a2706d33849cf42cd56714f519108a4ededfc (diff)
parse.y: Fix locations of NODE_*ASGN and NODE_ERRINFO
* parse.y: Fix to only include a range of exc_var. e.g. The locations of the NODE_DASGN_CURR and NODE_ERRINFO are fixed: ``` begin 1 rescue => e 2 end ``` * Before ``` NODE_DASGN_CURR (line: 3, first_lineno: 3, first_column: 0, last_lineno: 5, last_column: 3) NODE_ERRINFO (line: 5, first_lineno: 3, first_column: 0, last_lineno: 5, last_column: 3) ``` * After ``` NODE_DASGN_CURR (line: 3, first_lineno: 3, first_column: 7, last_lineno: 3, last_column: 11) NODE_ERRINFO (line: 5, first_lineno: 3, first_column: 7, last_lineno: 3, last_column: 11) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 03b9ed992e..bfea57617b 100644
--- a/parse.y
+++ b/parse.y
@@ -3832,7 +3832,7 @@ opt_rescue : keyword_rescue exc_list exc_var then
{
/*%%%*/
if ($3) {
- $3 = node_assign($3, new_errinfo(&@$), &@$);
+ $3 = node_assign($3, new_errinfo(&@3), &@3);
$5 = block_append($3, $5, &@$);
}
$$ = new_resbody($2, $5, $6, &@$);