ruby-changes:31903
From: nari <ko1@a...>
Date: Tue, 3 Dec 2013 23:14:18 +0900 (JST)
Subject: [ruby-changes:31903] nari:r43982 (trunk): * object.c (rb_obj_clone): don't copy FL_WB_PROTECTED of a
nari 2013-12-03 23:14:09 +0900 (Tue, 03 Dec 2013) New Revision: 43982 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43982 Log: * object.c (rb_obj_clone): don't copy FL_WB_PROTECTED of a original object. Modified files: trunk/ChangeLog trunk/object.c Index: ChangeLog =================================================================== --- ChangeLog (revision 43981) +++ ChangeLog (revision 43982) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Dec 3 23:06:20 2013 Narihiro Nakamura <authornari@g...> + + * object.c (rb_obj_clone): don't copy FL_WB_PROTECTED of a + original object. + Tue Dec 3 22:32:18 2013 Nobuyoshi Nakada <nobu@r...> * hash.c (rb_hash_recursive): make similar (recursive) constructs Index: object.c =================================================================== --- object.c (revision 43981) +++ object.c (revision 43982) @@ -336,7 +336,7 @@ rb_obj_clone(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L336 } clone = rb_obj_alloc(rb_obj_class(obj)); RBASIC(clone)->flags &= (FL_TAINT|FL_PROMOTED|FL_WB_PROTECTED); - RBASIC(clone)->flags |= RBASIC(obj)->flags & ~(FL_PROMOTED|FL_FREEZE|FL_FINALIZE); + RBASIC(clone)->flags |= RBASIC(obj)->flags & ~(FL_PROMOTED|FL_FREEZE|FL_FINALIZE|FL_WB_PROTECTED); singleton = rb_singleton_class_clone_and_attach(obj, clone); RBASIC_SET_CLASS(clone, singleton); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/