From e7fac351c2d46696a5de85710e765327e8346cce Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 1 Nov 2013 11:53:59 +0000 Subject: 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 --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'string.c') 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) -- cgit v1.2.3