summaryrefslogtreecommitdiff
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 88ce849bdf..4a2864ee70 100644
--- a/gc.c
+++ b/gc.c
@@ -3285,6 +3285,8 @@ rb_gc_disable(void)
rb_objspace_t *objspace = &rb_objspace;
int old = dont_gc;
+ rest_sweep(objspace);
+
dont_gc = TRUE;
return old ? Qtrue : Qfalse;
}