Permalink
Browse files

use ordinary syntax for options to be well-formed in 1.8

  • Loading branch information...
1 parent c1d7327 commit 1d63129eff1e25dd22e182cdef40ec61bf5dde88 @fxn fxn committed Apr 27, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/json/encoding.rb
View
2 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] }.

0 comments on commit 1d63129

Please sign in to comment.