diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-26 17:27:21 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-26 17:27:21 +0000 |
commit | 2285a8d813814e936484d302dacf1ff39e40e33c (patch) | |
tree | 903b908f019dce423c6d691003f200176046895a /object.c | |
parent | 6ca3ad34a044f48fa25d250076f5e8c9c8810b38 (diff) | |
download | ruby-2285a8d813814e936484d302dacf1ff39e40e33c.tar.gz |
* class.c, gc.c, object.c, variable.c, vm_insnhelper.c,
include/ruby/ruby.h: separate RCLASS_CONST_TBL from RCLASS_IV_TBL.
RCLASS_IV_TBL has contained not only instance variable table but
also constant table. Now the two table are separated to
RCLASS_CONST_TBL and RCLASS_IV_TBL. This is a preparation for
private constant (see [ruby-dev:39685][ruby-core:32698]).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -221,6 +221,10 @@ init_copy(VALUE dest, VALUE obj) st_free_table(RCLASS_IV_TBL(dest)); RCLASS_IV_TBL(dest) = 0; } + if (RCLASS_CONST_TBL(dest)) { + st_free_table(RCLASS_CONST_TBL(dest)); + RCLASS_CONST_TBL(dest) = 0; + } if (RCLASS_IV_TBL(obj)) { RCLASS_IV_TBL(dest) = st_copy(RCLASS_IV_TBL(obj)); } |