aboutsummaryrefslogtreecommitdiffstats
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 20af24f82d..a888d659e3 100644
--- a/gc.c
+++ b/gc.c
@@ -714,6 +714,9 @@ rb_newobj(void)
rb_objspace_t *objspace = &rb_objspace;
#endif
+ if (during_gc)
+ rb_bug("object allocation during garbage collection phase");
+
if (v) {
RBASIC(v)->flags = 0;
th->value_cache_ptr++;