Index: activesupport/test/json/decoding_test.rb =================================================================== --- activesupport/test/json/decoding_test.rb (revision 9250) +++ activesupport/test/json/decoding_test.rb (working copy) @@ -24,7 +24,8 @@ %(null) => nil, %(true) => true, %(false) => false, - %q("http:\/\/test.host\/posts\/1") => "http://test.host/posts/1" + %q({"bad":"\\\\","trailing":""}) => {"bad" => "\\", "trailing" => ""}, + %q("http:\/\/test.host\/posts\/1") => "http://test.host/posts/1" } TESTS.each do |json, expected| Index: activesupport/lib/active_support/json/decoding.rb =================================================================== --- activesupport/lib/active_support/json/decoding.rb (revision 9250) +++ activesupport/lib/active_support/json/decoding.rb (working copy) @@ -38,7 +38,9 @@ quoting = false end when ":","," - marks << scanner.pos - 1 unless quoting + marks << scanner.pos - 1 unless quoting + when "\\" + scanner.skip(/\\/) end end