summaryrefslogtreecommitdiffstats
path: root/ext/stringio/stringio.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-28 11:34:11 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-28 11:34:11 +0000
commit5981f5593a0fd1ff29378fae855901e5cb9dc36b (patch)
treebac7ae12c1eb6bc08fa8b0e34a034738bde3341e /ext/stringio/stringio.c
parent6ef59c54b6d114acc4980bddf97a16d8db1213b4 (diff)
downloadruby-5981f5593a0fd1ff29378fae855901e5cb9dc36b.tar.gz
ruby-5981f5593a0fd1ff29378fae855901e5cb9dc36b.tar.xz
ruby-5981f5593a0fd1ff29378fae855901e5cb9dc36b.zip
* 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@5332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/stringio/stringio.c')
-rw-r--r--ext/stringio/stringio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 8d3275b2b..46217c7bc 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -908,7 +908,7 @@ strio_sysread(argc, argv, self)
VALUE self;
{
VALUE val = strio_read(argc, argv, self);
- if (NIL_P(val)) {
+ if (NIL_P(val) || RSTRING(val)->len == 0) {
rb_eof_error();
}
return val;