From 1d63129eff1e25dd22e182cdef40ec61bf5dde88 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 27 Apr 2010 02:36:34 -0700 Subject: [PATCH] use ordinary syntax for options to be well-formed in 1.8 --- activesupport/lib/active_support/json/encoding.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ 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] }.