diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-17 17:48:09 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-17 17:48:09 +0000 |
commit | eacee9d95f86b035263fe8ba570c19e133c29aae (patch) | |
tree | 99fbb3f5738efc592678fceda60295d33b73b73e /ext | |
parent | 76fe9e893cc123b9651bcf38620794c6095bb11d (diff) | |
download | ruby-eacee9d95f86b035263fe8ba570c19e133c29aae.tar.gz |
* 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 'ext')
-rw-r--r-- | ext/psych/lib/psych/visitors/json_tree.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/psych/lib/psych/visitors/json_tree.rb b/ext/psych/lib/psych/visitors/json_tree.rb index 3502cdb63c..f2dbfb33d7 100644 --- a/ext/psych/lib/psych/visitors/json_tree.rb +++ b/ext/psych/lib/psych/visitors/json_tree.rb @@ -6,7 +6,7 @@ module Psych end def visit_String o - @emitter.scalar o.to_s, nil, nil, false, true, Nodes::Scalar::ANY + @emitter.scalar o.to_s, nil, nil, false, true, Nodes::Scalar::DOUBLE_QUOTED end alias :visit_Symbol :visit_String end |