diff options
Diffstat (limited to 'ext/-test-/tracepoint/gc_hook.c')
-rw-r--r-- | ext/-test-/tracepoint/gc_hook.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/-test-/tracepoint/gc_hook.c b/ext/-test-/tracepoint/gc_hook.c index a3f4e7f68a..54c06c54a5 100644 --- a/ext/-test-/tracepoint/gc_hook.c +++ b/ext/-test-/tracepoint/gc_hook.c @@ -33,7 +33,9 @@ gc_start_end_i(VALUE tpval, void *data) } if (invoking == 0) { - rb_postponed_job_register(0, invoke_proc, data); + /* will overwrite the existing handle with new data on the second and subsequent call */ + rb_postponed_job_handle_t h = rb_postponed_job_preregister(0, invoke_proc, data); + rb_postponed_job_trigger(h); } } |