aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gc.c b/gc.c
index 9f6dd75400..1331ef21dc 100644
--- a/gc.c
+++ b/gc.c
@@ -4694,6 +4694,13 @@ gc_mark_children(rb_objspace_t *objspace, VALUE obj)
}
switch (BUILTIN_TYPE(obj)) {
+ case T_FLOAT:
+ case T_BIGNUM:
+ case T_SYMBOL:
+ /* Not immediates, but does not have references and singleton
+ * class */
+ return;
+
case T_NIL:
case T_FIXNUM:
rb_bug("rb_gc_mark() called for broken object");
@@ -4805,11 +4812,6 @@ gc_mark_children(rb_objspace_t *objspace, VALUE obj)
gc_mark(objspace, any->as.regexp.src);
break;
- case T_FLOAT:
- case T_BIGNUM:
- case T_SYMBOL:
- break;
-
case T_MATCH:
gc_mark(objspace, any->as.match.regexp);
if (any->as.match.str) {