mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
class.c: fix duplication of prepended module
* class.c (include_class_new): fix duplication of prepended module. since m_tbl of prepended module is always zero, copy from its copy iclass of original. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bc08bdc013
commit
b283d01987
3 changed files with 16 additions and 1 deletions
2
class.c
2
class.c
|
@ -636,7 +636,7 @@ include_class_new(VALUE module, VALUE super)
|
|||
}
|
||||
RCLASS_IV_TBL(klass) = RCLASS_IV_TBL(module);
|
||||
RCLASS_CONST_TBL(klass) = RCLASS_CONST_TBL(module);
|
||||
RCLASS_M_TBL(klass) = RCLASS_M_TBL(module);
|
||||
RCLASS_M_TBL(klass) = RCLASS_M_TBL(RCLASS_ORIGIN(module));
|
||||
RCLASS_SUPER(klass) = super;
|
||||
if (RB_TYPE_P(module, T_ICLASS)) {
|
||||
RBASIC(klass)->klass = RBASIC(module)->klass;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue