diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-09 03:03:34 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-09 03:03:34 +0000 |
commit | 15c3e4e92cd88c4875f3a6fe19ae2d4c13cbd423 (patch) | |
tree | c98aec6588ec9be2a7f21838f4ea68165533206b /parse.y | |
parent | 230f54130ef2b58b70c9128675d01c2b9cf67516 (diff) | |
download | ruby-15c3e4e92cd88c4875f3a6fe19ae2d4c13cbd423.tar.gz |
parse.y: Fix locations of NODE_SCOPE in NODE_CLASS
* parse.y: Fix to only include a range of bodystmt.
e.g. The locations of the NODE_SCOPE is fixed:
```
class A
def a; end
end
```
* Before
```
NODE_SCOPE (line: 3, code_range: (1,0)-(3,3))
```
* After
```
NODE_SCOPE (line: 3, code_range: (1,7)-(3,3))
```
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2973,7 +2973,7 @@ primary : literal { /*%%%*/ $$ = NEW_CLASS($2, $5, $3); - $$->nd_body->nd_loc = @$; + $$->nd_body->nd_loc = @5; set_line_body($5, $<num>4); nd_set_line($$, $<num>4); $$->nd_loc = @$; |