summaryrefslogtreecommitdiff
path: root/test/psych
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-28 17:37:09 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-28 17:37:09 +0000
commit6ce27adabe13baefb974fd7ea4d1ff0becd60134 (patch)
tree6b3d1172c7548bddd9034f341cac3eaa0581a14e /test/psych
parent8914d672b814c16259ff49c43f12af32c7528e4a (diff)
* ext/psych/lib/psych/visitors/to_ruby.rb: fix parsing hashes with
instance variables when it is referenced multiple times. * ext/psych/lib/psych.rb: bump version * ext/psych/psych.gemspec: bump version * test/psych/test_hash.rb: test for fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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)