* io.c (rb_io_getline): rs modification check should not interfere in the loop.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2004-10-20 03:42:53 +00:00
parent e447cd5add
commit 3054488377

2
io.c
View File

@ -1428,7 +1428,7 @@ rb_io_getline(rs, fptr)
while ((c = appendline(fptr, newline, &str)) != EOF &&
(c != newline || RSTRING(str)->len < rslen ||
(rspara || rscheck(rsptr,rslen,rs)) ||
(rspara || rscheck(rsptr,rslen,rs), 0) ||
memcmp(RSTRING(str)->ptr+RSTRING(str)->len-rslen,rsptr,rslen)));
if (rspara) {