зеркало из https://github.com/github/ruby.git
* 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:
Родитель
218d1f5e1e
Коммит
7e1f3c636b
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче