Method: Enumerator::Chain#initialize_copy
- Defined in:
- enumerator.c
#initialize_copy(orig) ⇒ Object
:nodoc:
3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 |
# File 'enumerator.c', line 3205
static VALUE
enum_chain_init_copy(VALUE obj, VALUE orig)
{
struct enum_chain *ptr0, *ptr1;
if (!OBJ_INIT_COPY(obj, orig)) return obj;
ptr0 = enum_chain_ptr(orig);
TypedData_Get_Struct(obj, struct enum_chain, &enum_chain_data_type, ptr1);
if (!ptr1) rb_raise(rb_eArgError, "unallocated chain");
ptr1->enums = ptr0->enums;
ptr1->pos = ptr0->pos;
return obj;
}
|