reopen(...)
public
Reinitializes strio with the given other_StrIO or string and mode (see
StringIO#new).
Show source
/*
* call-seq:
* strio.reopen(other_StrIO) -> strio
* strio.reopen(string, mode) -> strio
*
* Reinitializes *strio* with the given <i>other_StrIO</i> or _string_
* and _mode_ (see StringIO
*/
static VALUE
strio_reopen(argc, argv, self)
int argc;
VALUE *argv;
VALUE self;
{
if (!OBJ_TAINTED(self)) rb_secure(4);
if (argc == 1 && TYPE(*argv) != T_STRING) {
return strio_copy(self, *argv);
}
strio_init(argc, argv, StringIO(self));
return self;
}