1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
eban 2002-12-30 12:17:41 +00:00
parent fb0b931709
commit 71da1d91b0
2 changed files with 7 additions and 2 deletions

View file

@ -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

View file

@ -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;