method
initialize_copy
v1_9_3_125 -
Show latest stable
-
0 notes -
Class: Class
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378 (-38)
- 1_9_2_180 (0)
- 1_9_3_125 (0)
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
initialize_copy(p1)
public
Hide source
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); }