summaryrefslogtreecommitdiff
path: root/ext/psych/lib/psych
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-21 01:56:10 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-21 01:56:10 +0000
commit6f37c467d47483aac7bf5336a72446452e7ae251 (patch)
treeeb2abc252214e476ba0787062b7ec4a6ddd8fea0 /ext/psych/lib/psych
parent816c7900fd084509583953d7b2739e8412b0834d (diff)
* ext/psych/lib/psych/json/stream.rb: do not emit custom tags in maps
or sequences when emitting JSON. * ext/psych/lib/psych/json/tree_builder.rb: do not emit custom tags in sequences when emitting JSON. * test/psych/json/test_stream.rb: tests for custom stream emits. * test/psych/test_json_tree.rb: tests for JSON emits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych/lib/psych')
-rw-r--r--ext/psych/lib/psych/json/stream.rb4
-rw-r--r--ext/psych/lib/psych/json/tree_builder.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/psych/lib/psych/json/stream.rb b/ext/psych/lib/psych/json/stream.rb
index 60c458ad38..5f0233515d 100644
--- a/ext/psych/lib/psych/json/stream.rb
+++ b/ext/psych/lib/psych/json/stream.rb
@@ -11,11 +11,11 @@ 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
- super(anchor, tag, implicit, Nodes::Sequence::FLOW)
+ super(anchor, nil, implicit, Nodes::Sequence::FLOW)
end
def scalar value, anchor, tag, plain, quoted, style
diff --git a/ext/psych/lib/psych/json/tree_builder.rb b/ext/psych/lib/psych/json/tree_builder.rb
index 26fcb118d0..e4ab423dbb 100644
--- a/ext/psych/lib/psych/json/tree_builder.rb
+++ b/ext/psych/lib/psych/json/tree_builder.rb
@@ -17,7 +17,7 @@ module Psych
end
def start_sequence anchor, tag, implicit, style
- super(anchor, tag, implicit, Nodes::Sequence::FLOW)
+ super(anchor, nil, implicit, Nodes::Sequence::FLOW)
end
def scalar value, anchor, tag, plain, quoted, style