mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
use ordinary syntax for options to be well-formed in 1.8
This commit is contained in:
@@ -104,7 +104,7 @@ module ActiveSupport
|
||||
|
||||
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] }.
|
||||
|
||||
Reference in New Issue
Block a user