summaryrefslogtreecommitdiff
path: root/test/yaml/test_array.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-12-17 09:48:38 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2009-12-17 09:48:38 -0800
commitcb8c3eb5a62c792d657eb7318d033ef52d2127a3 (patch)
tree428d6067f4a475d8ae97ec09bcf21f53f49ea5c5 /test/yaml/test_array.rb
parent31126b53bbe0d88f0c1050f81ce88f847c13b5d3 (diff)
downloadpsych-cb8c3eb5a62c792d657eb7318d033ef52d2127a3.zip
testing self referential structs
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