wrap(...)
public
See Zlib::GzipReader#wrap and Zlib::GzipWriter#wrap.
Show source
/*
* See Zlib::GzipReader#wrap and Zlib::GzipWriter#wrap.
*/
static VALUE
rb_gzfile_s_wrap(argc, argv, klass)
int argc;
VALUE *argv;
VALUE klass;
{
VALUE obj = rb_class_new_instance(argc, argv, klass);
if (rb_block_given_p()) {
return rb_ensure(rb_yield, obj, gzfile_ensure_close, obj);
}
else {
return obj;
}
}