aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index bad3c83714..1baf914a3a 100644
--- a/eval.c
+++ b/eval.c
@@ -567,6 +567,17 @@ setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg, VALUE cause)
}
}
+void
+rb_threadptr_setup_exception(rb_thread_t *th, VALUE mesg, VALUE cause)
+{
+ if (cause == Qundef) {
+ cause = get_thread_errinfo(th);
+ }
+ if (cause != mesg) {
+ rb_ivar_set(mesg, id_cause, cause);
+ }
+}
+
static void
rb_longjmp(int tag, volatile VALUE mesg, VALUE cause)
{