diff options
-rw-r--r-- | activesupport/lib/active_support/json/encoding.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/json/encoding.rb b/activesupport/lib/active_support/json/encoding.rb index 0f38fd0e89..e692f6d142 100644 --- a/activesupport/lib/active_support/json/encoding.rb +++ b/activesupport/lib/active_support/json/encoding.rb @@ -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] }. |