diff options
| author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-12 23:48:50 +0000 |
|---|---|---|
| committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-12 23:48:50 +0000 |
| commit | 47f1d84215893e32fb536c084cd03542f91bd884 (patch) | |
| tree | 363ce06b6b2af621fa321d25a144dbc3069b0186 | |
| parent | d5874f0fffa1e12920ae267ad81acf651475cd64 (diff) | |
parse.y: Fix the locations of an empty script
* parse.y: Fix the locations of NODE_BEGIN in
an empty script.
```
ruby --dump=p -e ''
```
* Before
```
NODE_BEGIN (line: 1, code_range: (1,1)-(1,1))
```
* After
```
NODE_BEGIN (line: 1, code_range: (1,0)-(1,0))
```
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1205,7 +1205,7 @@ top_compstmt : top_stmts opt_terms top_stmts : none { /*%%%*/ - $$ = new_begin(0, &@$); + $$ = new_begin(0, &@0); /*% $$ = dispatch2(stmts_add, dispatch0(stmts_new), dispatch0(void_stmt)); |
