mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
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 changed files with 1 additions and 1 deletions
|
@ -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 a new issue