aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorTim Pope <code@tpope.net>2009-03-10 09:33:58 -0300
committerPratik Naik <pratiknaik@gmail.com>2009-03-10 17:05:17 +0000
commit9b9b2937ce3bef3bca9d22821e76c40cc74fa689 (patch)
treee7da0ae2a47603171c55d0f9bbe05415b2cfb17d /activesupport/test
parent0464254430f1e594cb2f54dc1e37510fc052c63a (diff)
downloadrails-9b9b2937ce3bef3bca9d22821e76c40cc74fa689.tar.gz
rails-9b9b2937ce3bef3bca9d22821e76c40cc74fa689.tar.bz2
rails-9b9b2937ce3bef3bca9d22821e76c40cc74fa689.zip
Properly decode \u escape sequences in JSON [#1100 state:resolved] [Tim Pope, Philip Hallstrom]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/json/decoding_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/test/json/decoding_test.rb b/activesupport/test/json/decoding_test.rb
index b88a00e584..c5816ea168 100644
--- a/activesupport/test/json/decoding_test.rb
+++ b/activesupport/test/json/decoding_test.rb
@@ -28,7 +28,9 @@ class TestJSONDecoding < Test::Unit::TestCase
%(null) => nil,
%(true) => true,
%(false) => false,
- %q("http:\/\/test.host\/posts\/1") => "http://test.host/posts/1"
+ %q("http:\/\/test.host\/posts\/1") => "http://test.host/posts/1",
+ %q("\u003cunicode\u0020escape\u003e") => "<unicode escape>",
+ %q("\\\\u0020skip double backslashes") => "\\u0020skip double backslashes"
}
TESTS.each do |json, expected|