summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
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'