summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 191f846d36..dbfce96788 100644
--- a/string.c
+++ b/string.c
@@ -8069,7 +8069,7 @@ rb_str_scrub(VALUE str, VALUE repl)
if (!rep7bit_p) cr = ENC_CODERANGE_VALID;
}
else {
- repl = rb_yield(rb_enc_str_new(p1, clen, enc));
+ repl = rb_yield(rb_enc_str_new(p, clen, enc));
repl = str_compat_and_valid(repl, enc);
rb_str_buf_cat(buf, RSTRING_PTR(repl), RSTRING_LEN(repl));
if (ENC_CODERANGE(repl) == ENC_CODERANGE_VALID)