aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-11 05:34:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-11 05:34:24 +0000
commit72c96011ea9251e1f2bf9e4fc1edfd1a9e9f1a56 (patch)
tree0602c9495d354ea5e574845980cd914fbb2de096 /parse.y
parent3bd4910cadc9cc1ffe45181d097cd91c392dc7ae (diff)
downloadruby-72c96011ea9251e1f2bf9e4fc1edfd1a9e9f1a56.tar.gz
parse.y: token info with BOM
* parse.y (parser_prepare): set token_info_enabled flag first, before returning at BOM. [ruby-dev:50288] [Bug #13998] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60160 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 678e7575c3..94b268bfb9 100644
--- a/parse.y
+++ b/parse.y
@@ -7148,6 +7148,7 @@ static void
parser_prepare(struct parser_params *parser)
{
int c = nextc();
+ parser->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
switch (c) {
case '#':
if (peek('!')) parser->has_shebang = 1;
@@ -7167,7 +7168,6 @@ parser_prepare(struct parser_params *parser)
}
pushback(c);
parser->enc = rb_enc_get(lex_lastline);
- parser->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
}
#ifndef RIPPER