summaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog5
-rw-r--r--class.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 3b264b6..27aa83a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jun 16 16:35:35 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * class.c (Init_class_hierarchy): prevent rb_cObject which is the
+ class tree root, from GC. [ruby-dev:49666] [Bug #12492]
+
Thu Jun 16 12:17:52 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* string.c (tr_trans): adjust buffer size by processed and rest
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);