ruby-changes:70431
From: Sutou <ko1@a...>
Date: Wed, 22 Dec 2021 11:10:34 +0900 (JST)
Subject: [ruby-changes:70431] c9396a3520 (master): Show the target Proc on Ractor::IsolationError
https://git.ruby-lang.org/ruby.git/commit/?id=c9396a3520 From c9396a35203fb99e8e6115b36042b2bec116b088 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei <kou@c...> Date: Wed, 22 Dec 2021 08:59:04 +0900 Subject: Show the target Proc on Ractor::IsolationError It's useful for debug. --- vm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vm.c b/vm.c index 287fe2547d9..8ce8b279d43 100644 --- a/vm.c +++ b/vm.c @@ -1182,7 +1182,9 @@ rb_proc_ractor_make_shareable(VALUE self) https://github.com/ruby/ruby/blob/trunk/vm.c#L1182 if (proc->block.type != block_type_iseq) rb_raise(rb_eRuntimeError, "not supported yet"); if (!rb_ractor_shareable_p(vm_block_self(&proc->block))) { - rb_raise(rb_eRactorIsolationError, "Proc's self is not shareable"); + rb_raise(rb_eRactorIsolationError, + "Proc's self is not shareable: %" PRIsVALUE, + self); } VALUE read_only_variables = Qfalse; -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/