diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-06 02:29:18 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-06 02:29:18 +0000 |
commit | 10284a049af43112881d658abacaa32900ed0d0e (patch) | |
tree | db40c493570098a2e06c72cbdad74ff2e79fbead | |
parent | b092e967b05ba203323a3eeec2ef1133d7c194bb (diff) | |
download | ruby-10284a049af43112881d658abacaa32900ed0d0e.tar.gz |
* ext/psych/lib/psych/json/tree_builder.rb (start_mapping): tags
should not be included in JSON mapping
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/psych/lib/psych/json/tree_builder.rb | 2 | ||||
-rw-r--r-- | test/psych/test_coder.rb | 4 |
3 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Thu Jan 6 11:27:01 2011 Aaron Patterson <aaron@tenderlovemaking.com> + + * ext/psych/lib/psych/json/tree_builder.rb (start_mapping): tags + should not be included in JSON mapping + Thu Jan 6 09:23:33 2011 Aaron Patterson <aaron@tenderlovemaking.com> * lib/net/protocol.rb (eof?): BufferedIO should proxy eof? to the diff --git a/ext/psych/lib/psych/json/tree_builder.rb b/ext/psych/lib/psych/json/tree_builder.rb index 720ede7e1e..26fcb118d0 100644 --- a/ext/psych/lib/psych/json/tree_builder.rb +++ b/ext/psych/lib/psych/json/tree_builder.rb @@ -13,7 +13,7 @@ module Psych end def start_mapping anchor, tag, implicit, style - super(anchor, tag, implicit, Nodes::Mapping::FLOW) + super(anchor, nil, implicit, Nodes::Mapping::FLOW) end def start_sequence anchor, tag, implicit, style diff --git a/test/psych/test_coder.rb b/test/psych/test_coder.rb index 0fa01ca3b6..c171c5ad0d 100644 --- a/test/psych/test_coder.rb +++ b/test/psych/test_coder.rb @@ -89,6 +89,10 @@ module Psych end end + def test_json_dump_exclude_tag + refute_match('TestCoder::InitApi', Psych.to_json(InitApi.new)) + end + def test_map_takes_block coder = Psych::Coder.new 'foo' tag = coder.tag |