summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authoryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-11 00:06:11 +0000
committeryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-11 00:06:11 +0000
commit14b6dc4c802cc12c7ef4efb1c923b3a0b58655eb (patch)
tree12597ef513a7d8fa554862e619e41565d18f8b37 /parse.y
parente038b794fe673583b413d81a8933bdc0aead85fe (diff)
parse.y: Fix locations of NODE_SCOPE in NODE_MODULE
* parse.y: Fix to only include a range of bodystmt. e.g. The locations of the NODE_SCOPE is fixed: ``` module M def m end end ``` * Before ``` NODE_SCOPE (line: 4, code_range: (1,0)-(4,3)) ``` * After ``` NODE_SCOPE (line: 4, code_range: (1,8)-(4,3)) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61102 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 8b486150b4..b7033b45fd 100644
--- a/parse.y
+++ b/parse.y
@@ -3030,7 +3030,7 @@ primary : literal
{
/*%%%*/
$$ = NEW_MODULE($2, $4);
- $$->nd_body->nd_loc = @$;
+ $$->nd_body->nd_loc = @4;
set_line_body($4, $<num>3);
nd_set_line($$, $<num>3);
$$->nd_loc = @$;