From 31126b53bbe0d88f0c1050f81ce88f847c13b5d3 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 17 Dec 2009 09:22:52 -0800 Subject: dealing with self referential omaps --- test/yaml/test_omap.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') 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' -- cgit v1.2.3