use ordinary syntax for options to be well-formed in 1.8
This commit is contained in:
parent
c1d7327071
commit
1d63129eff
@ -104,7 +104,7 @@ def escape_html_entities_in_json=(value)
|
||||
|
||||
def escape(string)
|
||||
if string.respond_to?(:force_encoding)
|
||||
string = string.encode(::Encoding::UTF_8, undef: :replace).force_encoding(::Encoding::BINARY)
|
||||
string = string.encode(::Encoding::UTF_8, :undef => :replace).force_encoding(::Encoding::BINARY)
|
||||
end
|
||||
json = string.
|
||||
gsub(escape_regex) { |s| ESCAPED_CHARS[s] }.
|
||||
|
Loading…
Reference in New Issue
Block a user