summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-09 16:16:42 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-09 16:16:42 +0000
commite11c22602af69e8139ec0649bb39f5a66d1e66a1 (patch)
tree7f9b5fd9e72b5f675209712d45407f41cef791f9 /eval.c
parenta4a4e8b5a05f69cec077e72a43769e38ef205e23 (diff)
parentd0c717e410cff2fb0d39ca4e113532e84c04f06b (diff)
add tag v2_4_0_preview2v2_4_0_preview2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v2_4_0_preview2@56129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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)
{