summaryrefslogtreecommitdiff
path: root/test/psych
diff options
context:
space:
mode:
Diffstat (limited to 'test/psych')
-rw-r--r--test/psych/test_hash.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/psych/test_hash.rb b/test/psych/test_hash.rb
index e658984..e2a3129 100644
--- a/test/psych/test_hash.rb
+++ b/test/psych/test_hash.rb
@@ -23,6 +23,13 @@ module Psych
@hash = { :a => 'b' }
end
+ def test_referenced_hash_with_ivar
+ a = [1,2,3,4,5]
+ t1 = [HashWithCustomInit.new(a)]
+ t1 << t1.first
+ assert_cycle t1
+ end
+
def test_custom_initialized
a = [1,2,3,4,5]
t1 = HashWithCustomInit.new(a)