diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-12-17 09:22:52 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-12-17 09:22:52 -0800 |
commit | 31126b53bbe0d88f0c1050f81ce88f847c13b5d3 (patch) | |
tree | df1538e010876f18c1619d7e6591e06b48f32fcb /test/yaml/test_omap.rb | |
parent | f0ec58031ed3f4ae9f18830151556cfe26a9b80a (diff) | |
download | psych-31126b53bbe0d88f0c1050f81ce88f847c13b5d3.zip |
dealing with self referential omaps
Diffstat (limited to 'test/yaml/test_omap.rb')
-rw-r--r-- | test/yaml/test_omap.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/yaml/test_omap.rb b/test/yaml/test_omap.rb index d3d7fde..8186f69 100644 --- a/test/yaml/test_omap.rb +++ b/test/yaml/test_omap.rb @@ -2,6 +2,13 @@ require 'helper' module YAML class TestOmap < Test::Unit::TestCase + def test_self_referential + map = YAML::Omap.new + map['foo'] = 'bar' + map['self'] = map + assert_equal(map, YAML.load(YAML.dump(map))) + end + def test_keys map = YAML::Omap.new map['foo'] = 'bar' |