File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change
1
+ Fri May 24 02:57:17 2013 Koichi Sasada <ko1@atdot.net>
2
+
3
+ * object.c (rb_obj_clone): should not propagate OLDGEN status.
4
+ This propagation had caused WB miss for class.
5
+
1
6
Thu May 23 17:35:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
2
7
3
8
* load.c (loaded_feature_path): fix invalid read by index underflow.
Original file line number Diff line number Diff line change @@ -335,13 +335,15 @@ rb_obj_clone(VALUE obj)
335
335
rb_raise (rb_eTypeError , "can't clone %s" , rb_obj_classname (obj ));
336
336
}
337
337
clone = rb_obj_alloc (rb_obj_class (obj ));
338
+ RBASIC (clone )-> flags &= (FL_TAINT |FL_UNTRUSTED );
339
+ RBASIC (clone )-> flags |= RBASIC (obj )-> flags & ~(FL_OLDGEN |FL_FREEZE |FL_FINALIZE );
340
+
338
341
singleton = rb_singleton_class_clone_and_attach (obj , clone );
339
342
RBASIC_SET_CLASS (clone , singleton );
340
343
if (FL_TEST (singleton , FL_SINGLETON )) {
341
344
rb_singleton_class_attached (singleton , clone );
342
345
}
343
- RBASIC (clone )-> flags &= (FL_TAINT |FL_UNTRUSTED );
344
- RBASIC (clone )-> flags |= RBASIC (obj )-> flags & ~(FL_FREEZE |FL_FINALIZE );
346
+
345
347
init_copy (clone , obj );
346
348
rb_funcall (clone , id_init_clone , 1 , obj );
347
349
RBASIC (clone )-> flags |= RBASIC (obj )-> flags & FL_FREEZE ;
You can’t perform that action at this time.
0 commit comments