summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authoryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 23:48:50 +0000
committeryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 23:48:50 +0000
commit47f1d84215893e32fb536c084cd03542f91bd884 (patch)
tree363ce06b6b2af621fa321d25a144dbc3069b0186 /parse.y
parentd5874f0fffa1e12920ae267ad81acf651475cd64 (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
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 2eb1a0e1f8..5d63ff2ee7 100644
--- a/parse.y
+++ b/parse.y
@@ -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));