summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-16 07:35:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-16 07:35:37 +0000
commit81442f903cab1cb2b7b4579a0300c37d193b27ba (patch)
tree754161f39931dc453d23222f300adcf9368f14d0 /class.c
parent1cbc622ea7a19acb880e21cf93052791289fd192 (diff)
prevent rb_cObject from GC
* class.c (Init_class_hierarchy): prevent rb_cObject which is the class tree root, from GC. [ruby-dev:49666] [Bug #12492] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/class.c b/class.c
index 1215b6d..6b818a3 100644
--- a/class.c
+++ b/class.c
@@ -547,6 +547,7 @@ Init_class_hierarchy(void)
{
rb_cBasicObject = boot_defclass("BasicObject", 0);
rb_cObject = boot_defclass("Object", rb_cBasicObject);
+ rb_gc_register_mark_object(rb_cObject);
/* resolve class name ASAP for order-independence */
rb_class_name(rb_cObject);