aboutsummaryrefslogtreecommitdiffstats
path: root/re.c
diff options
context:
space:
mode:
Diffstat (limited to 're.c')
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/re.c b/re.c
index cd93024302..4867104250 100644
--- a/re.c
+++ b/re.c
@@ -2540,7 +2540,7 @@ rb_reg_quote(VALUE str)
}
if (ascii_only && rb_enc_get_index(str) != 0) {
str = rb_str_new3(str);
- rb_enc_associate(str, rb_ascii8bit_encoding());
+ rb_enc_associate(str, rb_usascii_encoding());
}
return str;