diff options
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -340,8 +340,7 @@ rb_reg_expr_str(VALUE str, const char *s, long len, p = s; pend = p + len; rb_str_coderange_scan_restartable(p, pend, enc, &cr); - if (rb_enc_asciicompat(enc) && - (cr == ENC_CODERANGE_VALID || cr == ENC_CODERANGE_7BIT)) { + if (rb_enc_asciicompat(enc) && ENC_CODERANGE_CLEAN_P(cr)) { while (p < pend) { c = rb_enc_ascget(p, pend, &clen, enc); if (c == -1) { |