aboutsummaryrefslogtreecommitdiffstats
path: root/vm_trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_trace.c')
-rw-r--r--vm_trace.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vm_trace.c b/vm_trace.c
index 49a5fd0832..81452997e9 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -1511,7 +1511,9 @@ rb_postponed_job_flush(rb_vm_t *vm)
{
rb_thread_t *th = GET_THREAD();
unsigned long saved_postponed_job_interrupt_mask = th->interrupt_mask & POSTPONED_JOB_INTERRUPT_MASK;
+ VALUE saved_errno = th->errinfo;
+ th->errinfo = Qnil;
/* mask POSTPONED_JOB dispatch */
th->interrupt_mask |= POSTPONED_JOB_INTERRUPT_MASK;
{
@@ -1530,4 +1532,5 @@ rb_postponed_job_flush(rb_vm_t *vm)
}
/* restore POSTPONED_JOB mask */
th->interrupt_mask &= ~(saved_postponed_job_interrupt_mask ^ POSTPONED_JOB_INTERRUPT_MASK);
+ th->errinfo = saved_errno;
}