diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-28 01:13:09 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-28 01:13:09 +0000 |
commit | f8d34b2a751207fa9d31482e7f587f8bf59b892c (patch) | |
tree | 7729a89ecb8609b8a38eebd87b143f59f34491bd /test/psych/visitors/test_yaml_tree.rb | |
parent | dbe6250af2a873f7a79980a98f4fe2b4e89ef8c4 (diff) | |
download | ruby-f8d34b2a751207fa9d31482e7f587f8bf59b892c.tar.gz |
* 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
Diffstat (limited to 'test/psych/visitors/test_yaml_tree.rb')
-rw-r--r-- | test/psych/visitors/test_yaml_tree.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/psych/visitors/test_yaml_tree.rb b/test/psych/visitors/test_yaml_tree.rb index 3f2954c71e..496cdd05cc 100644 --- a/test/psych/visitors/test_yaml_tree.rb +++ b/test/psych/visitors/test_yaml_tree.rb @@ -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 |