mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* class.c (rb_mod_init_copy): when class is dup'ed, a metaclass of the
class should be attached to the dup'ed class, not the original class. [ruby-core:30843] [Bug #3461] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fff5de3bd4
commit
9b94dabe77
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
Mon Jun 28 02:43:35 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* class.c (rb_mod_init_copy): when class is dup'ed, a metaclass of the
|
||||
class should be attached to the dup'ed class, not the original
|
||||
class. [ruby-core:30843] [Bug #3461]
|
||||
|
||||
Sun Jun 27 23:31:17 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* include/ruby/io.h, io.c: reverted r21709.
|
||||
|
|
1
class.c
1
class.c
|
@ -146,6 +146,7 @@ rb_mod_init_copy(VALUE clone, VALUE orig)
|
|||
rb_obj_init_copy(clone, orig);
|
||||
if (!FL_TEST(CLASS_OF(clone), FL_SINGLETON)) {
|
||||
RBASIC(clone)->klass = rb_singleton_class_clone(orig);
|
||||
rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);
|
||||
}
|
||||
RCLASS_SUPER(clone) = RCLASS_SUPER(orig);
|
||||
if (RCLASS_IV_TBL(orig)) {
|
||||
|
|
Loading…
Reference in a new issue