summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);