mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* object.c (rb_obj_clone): don't copy FL_WB_PROTECTED of a
original object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
218d1f5e1e
commit
7e1f3c636b
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Dec 3 23:06:20 2013 Narihiro Nakamura <authornari@gmail.com>
|
||||
|
||||
* 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@ruby-lang.org>
|
||||
|
||||
* hash.c (rb_hash_recursive): make similar (recursive) constructs
|
||||
|
|
2
object.c
2
object.c
|
@ -336,7 +336,7 @@ rb_obj_clone(VALUE obj)
|
|||
}
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue