ruby-changes:69472
From: Satoshi <ko1@a...>
Date: Wed, 27 Oct 2021 16:13:55 +0900 (JST)
Subject: [ruby-changes:69472] 489e5e3a82 (master): the core problem is the Proc is not shareable
https://git.ruby-lang.org/ruby.git/commit/?id=489e5e3a82 From 489e5e3a8293553578757664b338009667a8f204 Mon Sep 17 00:00:00 2001 From: Satoshi Moris Tagomori <tagomoris@g...> Date: Tue, 24 Aug 2021 21:00:00 +0900 Subject: the core problem is the Proc is not shareable --- bootstraptest/test_ractor.rb | 2 +- vm_insnhelper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb index ee3f13cad90..bf80b94cc70 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 https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_ractor.rb#L1130 } # 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 5d83d3dfd56..048ed63aed9 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 https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L3082 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 */ -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/