summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-01 11:53:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-01 11:53:59 +0000
commite7fac351c2d46696a5de85710e765327e8346cce (patch)
tree78ed711f4c38aad4a36022ab9e044e2af989c1d7 /string.c
parent21ea356a42724847f3066d68ad246639fb374927 (diff)
string.c: fix typo
* string.c (rb_str_scrub): fix typo, should yield invalid byte sequence to be scrubbed. reported by znz at IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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)