FIX: scrub freedom_patch should take the optional replacement_char argument. Mysql2::Error uses it. mysql2 is used by some import scripts.
This commit is contained in:
parent
7ac4372427
commit
a4a90475cf
|
@ -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?
|
||||
|
|
Loading…
Reference in New Issue