summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 2db160c2ea..c16142b191 100644
--- a/eval.c
+++ b/eval.c
@@ -132,7 +132,11 @@ ruby_cleanup(volatile int ex)
rb_threadptr_interrupt(th);
rb_threadptr_check_signal(th);
- RUBY_VM_CHECK_INTS();
+ PUSH_TAG();
+ if ((state = EXEC_TAG()) == 0) {
+ SAVE_ROOT_JMPBUF(th, { RUBY_VM_CHECK_INTS(); });
+ }
+ POP_TAG();
errs[1] = th->errinfo;
th->safe_level = 0;