summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2019-06-19 19:09:48 +1200
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2019-06-19 20:39:10 +1200
commit3e5b885cd271e42ba4cb39dc8e612714f88ec889 (patch)
treef433be80ada084e056c9fd08e2f410d81f26eadb /gc.c
parentcb5da39f20a17bd73e791dca1e7e1832f0adbc53 (diff)
Rework debug conditional.
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gc.c b/gc.c
index 345622fd4e..b92e068440 100644
--- a/gc.c
+++ b/gc.c
@@ -9398,9 +9398,11 @@ rb_memerror(void)
rb_objspace_t *objspace = rb_objspace_of(rb_ec_vm_ptr(ec));
VALUE exc;
- // Print out pid, sleep, so you can attach debugger to see what went wrong:
- // fprintf(stderr, "rb_memerror pid=%d\n", getpid());
- // sleep(60);
+ if (0) {
+ // Print out pid, sleep, so you can attach debugger to see what went wrong:
+ fprintf(stderr, "rb_memerror pid=%d\n", getpid());
+ sleep(60);
+ }
if (during_gc) gc_exit(objspace, "rb_memerror");