summaryrefslogtreecommitdiff
path: root/ext/zlib
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
commit9d312f635b6b850efaee09dcfc48a0af41f4f1a6 (patch)
treebac7ae12c1eb6bc08fa8b0e34a034738bde3341e /ext/zlib
parent2d491003aaab3e49a02f6126af9d03d429eed284 (diff)
* 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
Diffstat (limited to 'ext/zlib')
-rw-r--r--ext/zlib/zlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 80b45ad0c9..e22d988406 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -2486,7 +2486,7 @@ gzreader_gets(argc, argv, obj)
if (NIL_P(rs)) {
dst = gzfile_read_all(gz);
- if (!NIL_P(dst)) gz->lineno++;
+ if (RSTRING(dst)->len != 0) gz->lineno++;
return dst;
}