summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index 0adf5493344..79cd7971f81 100644
--- a/gc.c
+++ b/gc.c
@@ -3908,7 +3908,7 @@ gc_mark_stacked_objects(rb_objspace_t *objspace)
if (!mstack->index) return;
while (pop_mark_stack(mstack, &obj)) {
- if (!gc_marked(objspace, obj)) {
+ if (RGENGC_CHECK_MODE > 0 && !gc_marked(objspace, obj)) {
rb_bug("gc_mark_stacked_objects: %p (%s) is infant, but not marked.", (void *)obj, obj_type_name(obj));
}
gc_mark_children(objspace, obj);