mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Revert "UTF-8 is one of byte based encodings"
This reverts commit 5776ae3475
.
Mistaken `max` as `min`.
This commit is contained in:
parent
594a033ff0
commit
f1b0db2c70
1 changed files with 1 additions and 1 deletions
2
string.c
2
string.c
|
@ -6461,7 +6461,7 @@ check_case_options(int argc, VALUE *argv, OnigCaseFoldType flags)
|
|||
static inline bool
|
||||
case_option_single_p(OnigCaseFoldType flags, rb_encoding *enc, VALUE str)
|
||||
{
|
||||
if ((flags & ONIGENC_CASE_ASCII_ONLY) && (rb_enc_mbmaxlen(enc) == 1))
|
||||
if ((flags & ONIGENC_CASE_ASCII_ONLY) && (enc==rb_utf8_encoding() || rb_enc_mbmaxlen(enc) == 1))
|
||||
return true;
|
||||
return !(flags & ONIGENC_CASE_FOLD_TURKISH_AZERI) && ENC_CODERANGE(str) == ENC_CODERANGE_7BIT;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue