Skip to content

Commit 02059b3

Browse files
committed
Revert encoding check in enc_set_default_encoding
It prevents a string from being used for `encoding`.
1 parent 8048328 commit 02059b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

encoding.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1601,7 +1601,7 @@ enc_set_default_encoding(struct default_encoding *def, VALUE encoding, const cha
16011601
overridden = TRUE;
16021602

16031603
if (!NIL_P(encoding)) {
1604-
must_encoding(encoding); // loads it if necessary. Needs to be done outside of VM lock.
1604+
enc_check_encoding(encoding); // loads it if necessary. Needs to be done outside of VM lock.
16051605
}
16061606

16071607
GLOBAL_ENC_TABLE_LOCKING(enc_table) {

0 commit comments

Comments
 (0)