Permalink
Browse files

Fix syntax error on Ruby 2.0

Since Ruby 2.0 is UTF-8 by default we need to explictly say that the
encoding of this file is US-ASCII
  • Loading branch information...
1 parent 5602c73 commit 9a43816928f07c4ed988fb47545d219eff55e28a @rafaelfranca rafaelfranca committed May 10, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 activesupport/lib/active_support/json/encoding.rb
@@ -1,3 +1,5 @@
+#encoding: us-ascii
+
require 'active_support/core_ext/object/to_json'
require 'active_support/core_ext/module/delegation'
require 'active_support/json/variable'
@@ -123,9 +125,9 @@ class << self
def escape_html_entities_in_json=(value)
self.escape_regex = \
if @escape_html_entities_in_json = value
- /\xe2\x80(\xa8|\xa9)|[\x00-\x1F"\\><&]/
+ /\xe2\x80\xa8|\xe2\x80\xa9|[\x00-\x1F"\\><&]/
else
- /\xe2\x80(\xa8|\xa9)|[\x00-\x1F"\\]/
+ /\xe2\x80\xa8|\xe2\x80\xa9|[\x00-\x1F"\\]/
end
end

0 comments on commit 9a43816

Please sign in to comment.