From a4a90475cfae3e6d467e87fef150b4aaf67731d8 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Thu, 3 Jul 2014 11:11:21 -0400 Subject: [PATCH] FIX: scrub freedom_patch should take the optional replacement_char argument. Mysql2::Error uses it. mysql2 is used by some import scripts. --- lib/freedom_patches/scrub.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/freedom_patches/scrub.rb b/lib/freedom_patches/scrub.rb index c202dbd5b12..26917b5aec7 100644 --- a/lib/freedom_patches/scrub.rb +++ b/lib/freedom_patches/scrub.rb @@ -1,7 +1,7 @@ class String # A poor man's scrub, Ruby 2.1 has a much better implementation, but this will do unless method_defined? :scrub - def scrub + def scrub(replace_char=nil) str = dup.force_encoding("utf-8") unless str.valid_encoding?