summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index 996713ef19..00d55666a3 100644
--- a/gc.c
+++ b/gc.c
@@ -392,6 +392,9 @@ rb_newobj()
{
VALUE obj;
+ if (during_gc)
+ rb_bug("object allocation during garbage collection phase");
+
if (!freelist) garbage_collect();
obj = (VALUE)freelist;