method

initialize_copy

ruby latest stable - Class: Class

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_9_3_125) is shown here.

initialize_copy(p1)
public

No documentation available.

VALUE
rb_class_init_copy(VALUE clone, VALUE orig)
{
    if (orig == rb_cBasicObject) {
	rb_raise(rb_eTypeError, "can't copy the root class");
    }
    if (RCLASS_SUPER(clone) != 0 || clone == rb_cBasicObject) {
	rb_raise(rb_eTypeError, "already initialized class");
    }
    if (FL_TEST(orig, FL_SINGLETON)) {
	rb_raise(rb_eTypeError, "can't copy singleton class");
    }
    return rb_mod_init_copy(clone, orig);
}