diff options
| author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2025-07-24 14:45:43 +1200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-24 14:45:43 +1200 |
| commit | 64f508ade8c8535b7d3ecdd217886aa52fddd43c (patch) | |
| tree | 6acdef44dba44edc023070790190c2f2ebbafee3 /include/ruby/internal | |
| parent | 2e0a782936608bee757c07b9578cfa6885009fa4 (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 'include/ruby/internal')
| -rw-r--r-- | include/ruby/internal/intern/cont.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/internal/intern/cont.h b/include/ruby/internal/intern/cont.h index 32647f48aa..e3c89557fd 100644 --- a/include/ruby/internal/intern/cont.h +++ b/include/ruby/internal/intern/cont.h @@ -275,7 +275,7 @@ VALUE rb_fiber_transfer_kw(VALUE fiber, int argc, const VALUE *argv, int kw_spla * @exception rb_eFiberError `fiber` is terminated etc. * @return (See rb_fiber_resume() for details) */ -VALUE rb_fiber_raise(VALUE fiber, int argc, const VALUE *argv); +VALUE rb_fiber_raise(VALUE fiber, int argc, VALUE *argv); RBIMPL_SYMBOL_EXPORT_END() |
