close()
public
Closes the GzipFile object. This method calls close method of the associated IO object. Returns the associated IO object.
Show source
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;
}