mirror of
https://github.com/ruby/ruby.git
synced 2026-08-03 11:18:06 +08:00
Respect encoding of ID in exception messages
This commit is contained in:
parent
cbcbbb2fbe
commit
0fe111caa6
Notes:
git
2025-12-17 01:16:28 +00:00
@ -3357,7 +3357,7 @@ rb_const_get_0(VALUE klass, ID id, int exclude, int recurse, int visibility)
|
||||
if (!UNDEF_P(c)) {
|
||||
if (UNLIKELY(!rb_ractor_main_p())) {
|
||||
if (!rb_ractor_shareable_p(c)) {
|
||||
rb_raise(rb_eRactorIsolationError, "can not access non-shareable objects in constant %"PRIsVALUE"::%s by non-main Ractor.", rb_class_path(found_in), rb_id2name(id));
|
||||
rb_raise(rb_eRactorIsolationError, "can not access non-shareable objects in constant %"PRIsVALUE"::%"PRIsVALUE" by non-main Ractor.", rb_class_path(found_in), rb_id2str(id));
|
||||
}
|
||||
}
|
||||
return c;
|
||||
|
||||
@ -1145,7 +1145,7 @@ vm_get_ev_const(rb_execution_context_t *ec, VALUE orig_klass, ID id, bool allow_
|
||||
if (UNLIKELY(!rb_ractor_main_p())) {
|
||||
if (!rb_ractor_shareable_p(val)) {
|
||||
rb_raise(rb_eRactorIsolationError,
|
||||
"can not access non-shareable objects in constant %"PRIsVALUE"::%s by non-main ractor.", rb_class_path(klass), rb_id2name(id));
|
||||
"can not access non-shareable objects in constant %"PRIsVALUE"::%"PRIsVALUE" by non-main ractor.", rb_class_path(klass), rb_id2str(id));
|
||||
}
|
||||
}
|
||||
return val;
|
||||
@ -7575,4 +7575,3 @@ rb_vm_lvar_exposed(rb_execution_context_t *ec, int index)
|
||||
const rb_control_frame_t *cfp = ec->cfp;
|
||||
return cfp->ep[index];
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user