summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2025-07-24 14:45:43 +1200
committerGitHub <noreply@github.com>2025-07-24 14:45:43 +1200
commit64f508ade8c8535b7d3ecdd217886aa52fddd43c (patch)
tree6acdef44dba44edc023070790190c2f2ebbafee3 /internal
parent2e0a782936608bee757c07b9578cfa6885009fa4 (diff)
Support `cause:` in `Thread#raise` and `Fiber#raise`. (#13967)
* Add support for `cause:` argument to `Fiber#raise` and `Thread#raise`. The implementation behaviour is consistent with `Kernel#raise` and `Exception#initialize` methods, allowing the `cause:` argument to be passed to `Fiber#raise` and `Thread#raise`. This change ensures that the `cause:` argument is handled correctly, providing a more consistent and expected behavior when raising exceptions in fibers and threads. [Feature #21360] * Shared specs for Fiber/Thread/Kernel raise. --------- Co-authored-by: Samuel Williams <samuel.williams@shopify.com>
Diffstat (limited to 'internal')
-rw-r--r--internal/eval.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/eval.h b/internal/eval.h
index a8b649e509..4c1c045b4e 100644
--- a/internal/eval.h
+++ b/internal/eval.h
@@ -26,6 +26,7 @@ extern ID ruby_static_id_status;
VALUE rb_refinement_module_get_refined_class(VALUE module);
void rb_class_modify_check(VALUE);
NORETURN(VALUE rb_f_raise(int argc, VALUE *argv));
+VALUE rb_exception_setup(int argc, VALUE *argv);
void rb_refinement_setup(struct rb_refinements_data *data, VALUE module, VALUE klass);
void rb_vm_using_module(VALUE module);
VALUE rb_top_main_class(const char *method);