summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authornari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-03 11:24:11 +0000
committernari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-03 11:24:11 +0000
commit53f1de2f49cafeba1f1c7f0674c976f3c0bb4be0 (patch)
tree38727568ac093c745b720e1bfe96f314c1b74b64 /object.c
parent437b8bc53b25c3c2ac751db816dc1076d8c6957f (diff)
* object.c (rb_obj_clone): Protect FL_PROMOTED and FL_WB_PROTECTED
flags of a destination object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index 70f6d66..f316a1b 100644
--- a/object.c
+++ b/object.c
@@ -335,7 +335,7 @@ rb_obj_clone(VALUE obj)
rb_raise(rb_eTypeError, "can't clone %s", rb_obj_classname(obj));
}
clone = rb_obj_alloc(rb_obj_class(obj));
- RBASIC(clone)->flags &= FL_TAINT;
+ RBASIC(clone)->flags &= (FL_TAINT|FL_PROMOTED|FL_WB_PROTECTED);
RBASIC(clone)->flags |= RBASIC(obj)->flags & ~(FL_PROMOTED|FL_FREEZE|FL_FINALIZE);
singleton = rb_singleton_class_clone_and_attach(obj, clone);