summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-11 10:15:30 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-11 10:15:30 (GMT)
commit1b6aa03eb91c13a78d6a13158f04a5930fc9c3ef (patch)
tree26484e82c5e7f2e4d2130abd638baa29dae2183e /class.c
parent3977132bbb31dd2439b5d7431ef3b2aebb795eeb (diff)
* class.c (class_alloc): Strat from age == 2.
Class and Module objects can be living long life. * iseq.c: Same for ISeq objects. * gc.c (RVALUE_AGE_RESET): added. * gc.c (newobj_of): allow to generate (age != 0) objects. * gc.c (rb_copy_wb_protected_attribute): reset age for wb unprotected objects. * include/ruby/ruby.h: add RUBY_TYPED_PROMOTED1 as an unrecommended flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/class.c b/class.c
index 06a12a4..9868b72 100644
--- a/class.c
+++ b/class.c
@@ -150,7 +150,7 @@ rb_class_detach_module_subclasses(VALUE klass)
static VALUE
class_alloc(VALUE flags, VALUE klass)
{
- NEWOBJ_OF(obj, struct RClass, klass, (flags & T_MASK) | (RGENGC_WB_PROTECTED_CLASS ? FL_WB_PROTECTED : 0));
+ NEWOBJ_OF(obj, struct RClass, klass, (flags & T_MASK) | FL_PROMOTED1 /* start from age == 2 */ | (RGENGC_WB_PROTECTED_CLASS ? FL_WB_PROTECTED : 0));
obj->ptr = ALLOC(rb_classext_t);
RCLASS_IV_TBL(obj) = 0;
RCLASS_CONST_TBL(obj) = 0;