summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authoryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-09 03:52:59 +0000
committeryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-09 03:52:59 +0000
commit7a79d88161009dcdadc12d61c66037e7ef0864a0 (patch)
tree8a94fcbab62ca05feb131d0452339438f758fa5b /parse.y
parentdceb897e5ab55468767c308af7680108cb0e482c (diff)
parse.y: Fix locations of NODE_SCOPE in NODE_SCLASS
* parse.y: Fix to only include a range of bodystmt. e.g. The locations of the NODE_SCOPE is fixed: ``` class << [] def m; end end ``` * Before ``` NODE_SCOPE (line: 3, code_range: (1,0)-(3,3)) ``` * After ``` NODE_SCOPE (line: 3, code_range: (2,2)-(3,3)) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61092 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 3aee868783..cd3440e3ce 100644
--- a/parse.y
+++ b/parse.y
@@ -2996,7 +2996,7 @@ primary : literal
{
/*%%%*/
$$ = NEW_SCLASS($3, $6);
- $$->nd_body->nd_loc = @$;
+ $$->nd_body->nd_loc = @6;
set_line_body($6, nd_line($3));
fixpos($$, $3);
$$->nd_loc = @$;