Skip to content

Commit

Permalink
Show the target Proc on Ractor::IsolationError
Browse files Browse the repository at this point in the history
It's useful for debug.
  • Loading branch information
kou committed Dec 22, 2021
1 parent fff9b45 commit c9396a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vm.c
Expand Up @@ -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;
Expand Down

0 comments on commit c9396a3

Please sign in to comment.