summaryrefslogtreecommitdiff
path: root/ractor.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-22 08:26:42 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-23 13:50:42 +0900
commitc0a2d95cf318cf9b9ffe23f0a4b8720f69775448 (patch)
treef46cfc8edc2a68f735523cdaf0540ee9ddafcb74 /ractor.c
parentb2aa21b868419c2d87e2812b6b3584a8a1479c23 (diff)
Update rb_ractor_ensure_shareable
* Fixed use of rb_ractor_shareable_p * Raise Ractor::IsolationError
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3950
Diffstat (limited to 'ractor.c')
-rw-r--r--ractor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ractor.c b/ractor.c
index 484b5c78b9..585435c820 100644
--- a/ractor.c
+++ b/ractor.c
@@ -2445,10 +2445,10 @@ rb_ractor_make_shareable_copy(VALUE obj)
VALUE
rb_ractor_ensure_shareable(VALUE obj, VALUE name)
{
- if (!RTEST(rb_ractor_shareable_p(obj))) {
+ if (!rb_ractor_shareable_p(obj)) {
VALUE message = rb_sprintf("cannot assign unshareable object to %"PRIsVALUE,
name);
- rb_exc_raise(rb_exc_new_str(rb_eRactorError, message));
+ rb_exc_raise(rb_exc_new_str(rb_eRactorIsolationError, message));
}
return obj;
}