summaryrefslogtreecommitdiff
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 55037856ed..db3f04ad04 100644
--- a/re.c
+++ b/re.c
@@ -2832,7 +2832,7 @@ rb_reg_regsub(VALUE str, VALUE src, struct re_registers *regs, VALUE regexp)
rb_str_buf_cat(val, p, e-p);
}
if (!val) return str;
- rb_enc_copy(val, str);
+ rb_enc_associate(val, enc);
return val;
}