diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb index ee3f13cad9..bf80b94cc7 100644 --- a/bootstraptest/test_ractor.rb +++ b/bootstraptest/test_ractor.rb @@ -1130,7 +1130,7 @@ assert_equal 'can not set constants with non-shareable objects by non-main Racto } # define_method is not allowed -assert_equal "defined in a different Ractor", %q{ +assert_equal "defined with an un-shareable Proc in a different Ractor", %q{ str = "foo" define_method(:buggy){|i| str << "#{i}"} begin diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 5d83d3dfd5..048ed63aed 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -3082,7 +3082,7 @@ vm_call_bmethod_body(rb_execution_context_t *ec, struct rb_calling_info *calling if (!RB_OBJ_SHAREABLE_P(procv) && cme->def->body.bmethod.defined_ractor != rb_ractor_self(rb_ec_ractor_ptr(ec))) { - rb_raise(rb_eRuntimeError, "defined in a different Ractor"); + rb_raise(rb_eRuntimeError, "defined with an un-shareable Proc in a different Ractor"); } /* control block frame */