summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-17 17:48:09 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-17 17:48:09 +0000
commiteacee9d95f86b035263fe8ba570c19e133c29aae (patch)
tree99fbb3f5738efc592678fceda60295d33b73b73e /test
parent76fe9e893cc123b9651bcf38620794c6095bb11d (diff)
* ext/psych/lib/psych/visitors/json_tree.rb (visit_String): JSON
strings should be dumped with double quotes. [ruby-core:34186] * test/psych/test_json_tree.rb: test for double quotes git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_json_tree.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/psych/test_json_tree.rb b/test/psych/test_json_tree.rb
index 84bd36ce57..96e17be961 100644
--- a/test/psych/test_json_tree.rb
+++ b/test/psych/test_json_tree.rb
@@ -3,11 +3,11 @@ require_relative 'helper'
module Psych
class TestJSONTree < TestCase
def test_string
- assert_match(/(['"])foo\1/, Psych.to_json("foo"))
+ assert_match(/"foo"/, Psych.to_json("foo"))
end
def test_symbol
- assert_match(/(['"])foo\1/, Psych.to_json(:foo))
+ assert_match(/"foo"/, Psych.to_json(:foo))
end
def test_nil
@@ -36,8 +36,8 @@ module Psych
json = Psych.to_json(list)
assert_match(/]$/, json)
assert_match(/^\[/, json)
- assert_match(/['"]one['"]/, json)
- assert_match(/['"]two['"]/, json)
+ assert_match(/"one"/, json)
+ assert_match(/"two"/, json)
end
end
end