Skip to content

Commit 0fe111c

Browse files
osyoyujhawthorn
authored andcommitted
Respect encoding of ID in exception messages
1 parent cbcbbb2 commit 0fe111c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

variable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3357,7 +3357,7 @@ rb_const_get_0(VALUE klass, ID id, int exclude, int recurse, int visibility)
33573357
if (!UNDEF_P(c)) {
33583358
if (UNLIKELY(!rb_ractor_main_p())) {
33593359
if (!rb_ractor_shareable_p(c)) {
3360-
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));
3360+
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));
33613361
}
33623362
}
33633363
return c;

vm_insnhelper.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ vm_get_ev_const(rb_execution_context_t *ec, VALUE orig_klass, ID id, bool allow_
11451145
if (UNLIKELY(!rb_ractor_main_p())) {
11461146
if (!rb_ractor_shareable_p(val)) {
11471147
rb_raise(rb_eRactorIsolationError,
1148-
"can not access non-shareable objects in constant %"PRIsVALUE"::%s by non-main ractor.", rb_class_path(klass), rb_id2name(id));
1148+
"can not access non-shareable objects in constant %"PRIsVALUE"::%"PRIsVALUE" by non-main ractor.", rb_class_path(klass), rb_id2str(id));
11491149
}
11501150
}
11511151
return val;
@@ -7575,4 +7575,3 @@ rb_vm_lvar_exposed(rb_execution_context_t *ec, int index)
75757575
const rb_control_frame_t *cfp = ec->cfp;
75767576
return cfp->ep[index];
75777577
}
7578-

0 commit comments

Comments
 (0)