We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3aa1ea commit 310d97dCopy full SHA for 310d97d
transcode.c
@@ -2993,10 +2993,12 @@ static rb_encoding *
2993
make_encoding(const char *name)
2994
{
2995
rb_encoding *enc;
2996
- RB_VM_LOCKING() {
2997
- enc = rb_enc_find(name);
2998
- if (!enc)
+ enc = rb_enc_find(name);
+ if (!enc) {
+ RB_VM_LOCKING() {
2999
+ // TODO: check again. We may need to export `enc_registered` from encoding.c
3000
enc = make_dummy_encoding(name);
3001
+ }
3002
}
3003
return enc;
3004
0 commit comments