diff --git a/ChangeLog b/ChangeLog index 17a0dd6076..6db823fe5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Jan 6 11:27:01 2011 Aaron Patterson + + * 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 * 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