End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Zlib::GzipReader#gets
gets(*args)
ext/zlib/zlib.c
View on GitHub ↗
static VALUE
rb_gzreader_gets(int argc, VALUE *argv, VALUE obj)
{
VALUE dst;
dst = gzreader_gets(argc, argv, obj);
if (!NIL_P(dst)) {
rb_lastline_set(dst);
}
return dst;
}
See Zlib::GzipReader documentation for a description. However, note that this method can return nil even if eof? returns false, unlike the behavior of File#gets.