diff options
-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; |