aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/zlib/zlib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 2546daade5..47e53dceeb 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -3016,6 +3016,8 @@ gzreader_gets(int argc, VALUE *argv, VALUE obj)
if (NIL_P(rs)) {
dst = gzfile_read_all(gz);
if (RSTRING_LEN(dst) != 0) gz->lineno++;
+ else
+ return Qnil;
return dst;
}