summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-30 12:17:41 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-30 12:17:41 +0000
commit71da1d91b013249d0573600d940f52af95304818 (patch)
treeb0838ae9c46f6253091d7531978ee697b9947b14 /parse.y
parentfb0b931709d92ccfe3ac1bfe2f883cf36eda9e20 (diff)
* parse.y (yylex): use strncmp instead of strcmp.
accept "__END__\r\n". ([ruby-dev:19241]) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 8e76254..f98d658 100644
--- a/parse.y
+++ b/parse.y
@@ -4321,8 +4321,8 @@ yylex()
}
}
tokfix();
- if (strcmp(tok(), "__END__") == 0 &&
- lex_p - lex_pbeg == 7 &&
+ if (strncmp(tok(), "__END__", 7) == 0 &&
+ (lex_p - lex_pbeg == 7 || lex_p - lex_pbeg == 8) &&
(lex_pend == lex_p || *lex_p == '\n' || *lex_p == '\r')) {
ruby__end__seen = 1;
lex_lastline = 0;