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 5e18b9a7dc..634bf3ca54 100644
--- a/gc.c
+++ b/gc.c
@@ -4598,6 +4598,8 @@ rb_gc_disable(void)
rb_objspace_t *objspace = &rb_objspace;
int old = dont_gc;
+ gc_rest_sweep(objspace);
+
dont_gc = TRUE;
return old ? Qtrue : Qfalse;
}