aboutsummaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index 966aaa1933..31c1547e34 100644
--- a/gc.c
+++ b/gc.c
@@ -732,6 +732,8 @@ rb_newobj(void)
return v;
#else
rb_objspace_t *objspace = &rb_objspace;
+ if (during_gc)
+ rb_bug("object allocation during garbage collection phase");
return rb_newobj_from_heap(objspace);
#endif
}