diff options
Diffstat (limited to 'class.c')
-rw-r--r-- | class.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -331,7 +331,6 @@ rb_mod_init_copy(VALUE clone, VALUE orig) rb_free_const_table(RCLASS_CONST_TBL(clone)); RCLASS_CONST_TBL(clone) = 0; } - RCLASS_M_TBL(clone) = 0; if (RCLASS_IV_TBL(orig)) { st_data_t id; @@ -354,6 +353,7 @@ rb_mod_init_copy(VALUE clone, VALUE orig) struct clone_method_arg arg; arg.old_klass = orig; arg.new_klass = clone; + rb_id_table_free(RCLASS_M_TBL(clone)); RCLASS_M_TBL_INIT(clone); rb_id_table_foreach(RCLASS_M_TBL(orig), clone_method_i, &arg); } |