summaryrefslogtreecommitdiff
path: root/test/yaml/test_array.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/yaml/test_array.rb')
-rw-r--r--test/yaml/test_array.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/yaml/test_array.rb b/test/yaml/test_array.rb
index 208c996..7e7318e 100644
--- a/test/yaml/test_array.rb
+++ b/test/yaml/test_array.rb
@@ -6,6 +6,11 @@ module YAML
@list = [{ :a => 'b' }, 'foo']
end
+ def test_self_referential
+ @list << @list
+ assert_equal @list, YAML.load(@list.to_yaml)
+ end
+
def test_to_yaml
assert_equal @list, YAML.load(@list.to_yaml)
end