Show the target Proc on Ractor::IsolationError

It's useful for debug.
This commit is contained in:
Sutou Kouhei 2021-12-22 08:59:04 +09:00 committed by Sutou Kouhei
parent fff9b45fa9
commit c9396a3520
Notes: git 2021-12-22 11:10:39 +09:00
1 changed files with 3 additions and 1 deletions

4
vm.c
View File

@ -1182,7 +1182,9 @@ rb_proc_ractor_make_shareable(VALUE self)
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;