summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-12-17 09:22:52 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2009-12-17 09:22:52 -0800
commit31126b53bbe0d88f0c1050f81ce88f847c13b5d3 (patch)
treedf1538e010876f18c1619d7e6591e06b48f32fcb /test
parentf0ec58031ed3f4ae9f18830151556cfe26a9b80a (diff)
downloadpsych-31126b53bbe0d88f0c1050f81ce88f847c13b5d3.zip
dealing with self referential omaps
Diffstat (limited to 'test')
-rw-r--r--test/yaml/test_omap.rb7
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'