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 b47ec108e6..b9d3840313 100644
--- a/re.c
+++ b/re.c
@@ -381,7 +381,7 @@ rb_reg_desc(const char *s, long len, VALUE re)
{
VALUE str = rb_str_buf_new2("/");
- rb_enc_copy(str, re);
+ rb_enc_associate(str, rb_usascii_encoding());
rb_reg_expr_str(str, s, len);
rb_str_buf_cat2(str, "/");
if (re) {