ruby-changes:16466
From: mame <ko1@a...>
Date: Mon, 28 Jun 2010 02:47:45 +0900 (JST)
Subject: [ruby-changes:16466] Ruby:r28453 (trunk): * class.c (rb_mod_init_copy): when class is dup'ed, a metaclass of the
mame 2010-06-28 02:47:21 +0900 (Mon, 28 Jun 2010) New Revision: 28453 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28453 Log: * 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] Modified files: trunk/ChangeLog trunk/class.c Index: ChangeLog =================================================================== --- ChangeLog (revision 28452) +++ ChangeLog (revision 28453) @@ -1,3 +1,9 @@ +Mon Jun 28 02:43:35 2010 Yusuke Endoh <mame@t...> + + * 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@r...> * include/ruby/io.h, io.c: reverted r21709. Index: class.c =================================================================== --- class.c (revision 28452) +++ class.c (revision 28453) @@ -146,6 +146,7 @@ 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)) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/