Skip to content

Commit 310d97d

Browse files
committed
More ractor encoding autoload fixes
1 parent f3aa1ea commit 310d97d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

transcode.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2993,10 +2993,12 @@ static rb_encoding *
29932993
make_encoding(const char *name)
29942994
{
29952995
rb_encoding *enc;
2996-
RB_VM_LOCKING() {
2997-
enc = rb_enc_find(name);
2998-
if (!enc)
2996+
enc = rb_enc_find(name);
2997+
if (!enc) {
2998+
RB_VM_LOCKING() {
2999+
// TODO: check again. We may need to export `enc_registered` from encoding.c
29993000
enc = make_dummy_encoding(name);
3001+
}
30003002
}
30013003
return enc;
30023004
}

0 commit comments

Comments
 (0)