method
initialize_copy
v1_8_7_72 -
Show latest stable
- Class:
StringIO
initialize_copy(p1)public
No documentation available.
/* :nodoc: */
static VALUE
strio_copy(copy, orig)
VALUE copy, orig;
{
struct StringIO *ptr;
orig = rb_convert_type(orig, T_DATA, "StringIO", "to_strio");
if (copy == orig) return copy;
ptr = StringIO(orig);
if (check_strio(copy)) {
strio_free(DATA_PTR(copy));
}
DATA_PTR(copy) = ptr;
OBJ_INFECT(copy, orig);
++ptr->count;
return copy;
}