diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2017-10-14 11:29:14 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2017-10-14 11:29:14 +0900 |
commit | b74d1840c3b6d4988403cd3f0aade831e8e84730 (patch) | |
tree | 1cd5232fd0b589223d6c2482333cfb9e92f1d64c /class.c | |
parent | a75a9999ee603b3d5322f46a6c40dc9c22023bb9 (diff) | |
download | ruby-work.tar.gz |
wipwork
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); } |