Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Zlib::GzipFile#close
() -> void
close
ext/zlib/zlib.c
View on GitHub ↗
static VALUE
rb_gzfile_close(VALUE obj)
{
struct gzfile *gz;
VALUE io;
TypedData_Get_Struct(obj, struct gzfile, &gzfile_data_type, gz);
if (!ZSTREAM_IS_READY(&gz->z)) {
return Qnil;
}
io = gz->io;
gzfile_close(gz, 1);
return io;
}