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 | |
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | parse.y | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Mon Dec 30 21:10:59 2002 WATANABE Hirofumi <eban@ruby-lang.org> + + * parse.y (yylex): use strncmp instead of strcmp. + accept "__END__\r\n". ([ruby-dev:19241]) + Mon Dec 30 19:10:30 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net> * ext/extmk.rb: split --make argument contains options, assume @@ -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; |