Add a hint of ASCII-8BIT being BINARY

[Feature #18576]

Since outright renaming `ASCII-8BIT` is deemed to backward incompatible,
the next best thing would be to only change its `#inspect`, particularly
in exception messages.
This commit is contained in:
Jean Boussier 2024-02-19 13:35:48 +01:00 committed by Jean Boussier
parent b3c59370ca
commit 3a7846b1aa
7 changed files with 40 additions and 15 deletions

4
re.c
View file

@ -1530,8 +1530,8 @@ reg_enc_error(VALUE re, VALUE str)
{
rb_raise(rb_eEncCompatError,
"incompatible encoding regexp match (%s regexp with %s string)",
rb_enc_name(rb_enc_get(re)),
rb_enc_name(rb_enc_get(str)));
rb_enc_inspect_name(rb_enc_get(re)),
rb_enc_inspect_name(rb_enc_get(str)));
}
static inline int