diff options
Diffstat (limited to 'class.c')
-rw-r--r-- | class.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -524,6 +524,7 @@ rb_define_class_id_under(VALUE outer, ID id, VALUE super) rb_set_class_path_string(klass, outer, rb_id2str(id)); rb_const_set(outer, id, klass); rb_class_inherited(super, klass); + rb_gc_register_mark_object(klass); return klass; } @@ -590,6 +591,7 @@ rb_define_module_id_under(VALUE outer, ID id) module = rb_define_module_id(id); rb_const_set(outer, id, module); rb_set_class_path_string(module, outer, rb_id2str(id)); + rb_gc_register_mark_object(module); return module; } |