mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
the core problem is the Proc is not shareable
This commit is contained in:
parent
9541b3b7c0
commit
489e5e3a82
Notes:
git
2021-10-27 16:14:03 +09:00
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue