diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-12-30 12:17:41 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-12-30 12:17:41 +0000 |
commit | 71da1d91b013249d0573600d940f52af95304818 (patch) | |
tree | b0838ae9c46f6253091d7531978ee697b9947b14 /parse.y | |
parent | fb0b931709d92ccfe3ac1bfe2f883cf36eda9e20 (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.y | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |