mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/stringio/stringio.c (strio_sysread): StringIO.new.sysread didn't
raise EOFError. * ext/zlib/zlib.c (gzreader_gets): don't increment lineno when gzfile_read_all returns "". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2d491003aa
commit
9d312f635b
3 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Sun Dec 28 20:19:11 2003 Tanaka Akira <akr@m17n.org>
|
||||||
|
|
||||||
|
* ext/stringio/stringio.c (strio_sysread): StringIO.new.sysread didn't
|
||||||
|
raise EOFError.
|
||||||
|
|
||||||
|
* ext/zlib/zlib.c (gzreader_gets): don't increment lineno when
|
||||||
|
gzfile_read_all returns "".
|
||||||
|
|
||||||
Sun Dec 28 15:25:08 2003 Dave Thomas <dave@pragprog.com>
|
Sun Dec 28 15:25:08 2003 Dave Thomas <dave@pragprog.com>
|
||||||
|
|
||||||
* class.c,object.c,parse.y,sprintf.c,variable.c: Document classes
|
* class.c,object.c,parse.y,sprintf.c,variable.c: Document classes
|
||||||
|
|
|
@ -908,7 +908,7 @@ strio_sysread(argc, argv, self)
|
||||||
VALUE self;
|
VALUE self;
|
||||||
{
|
{
|
||||||
VALUE val = strio_read(argc, argv, self);
|
VALUE val = strio_read(argc, argv, self);
|
||||||
if (NIL_P(val)) {
|
if (NIL_P(val) || RSTRING(val)->len == 0) {
|
||||||
rb_eof_error();
|
rb_eof_error();
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
|
|
|
@ -2486,7 +2486,7 @@ gzreader_gets(argc, argv, obj)
|
||||||
|
|
||||||
if (NIL_P(rs)) {
|
if (NIL_P(rs)) {
|
||||||
dst = gzfile_read_all(gz);
|
dst = gzfile_read_all(gz);
|
||||||
if (!NIL_P(dst)) gz->lineno++;
|
if (RSTRING(dst)->len != 0) gz->lineno++;
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue