1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/psych/lib/psych/visitors/yaml_tree.rb: tree should return the

same thing on every call.

* test/psych/visitors/test_yaml_tree.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tenderlove 2012-10-28 01:13:09 +00:00
parent dbe6250af2
commit f8d34b2a75
3 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,10 @@
Sun Oct 28 10:12:15 2012 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/psych/lib/psych/visitors/yaml_tree.rb: `tree` should return the
same thing on every call.
* test/psych/visitors/test_yaml_tree.rb: related test.
Sun Oct 28 10:05:03 2012 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/psych/lib/psych/visitors/yaml_tree.rb: YAML Tree object should

View file

@ -47,6 +47,7 @@ module Psych
def tree
finish unless finished?
@emitter.root
end
def push object

View file

@ -8,6 +8,13 @@ module Psych
@v = Visitors::YAMLTree.new
end
def test_tree_can_be_called_twice
@v.start
@v << Object.new
t = @v.tree
assert_equal t, @v.tree
end
def test_yaml_tree_can_take_an_emitter
io = StringIO.new
e = Psych::Emitter.new io