diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-28 17:37:09 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-28 17:37:09 +0000 |
commit | 6ce27adabe13baefb974fd7ea4d1ff0becd60134 (patch) | |
tree | 6b3d1172c7548bddd9034f341cac3eaa0581a14e /test/psych/test_hash.rb | |
parent | 8914d672b814c16259ff49c43f12af32c7528e4a (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/test_hash.rb')
-rw-r--r-- | test/psych/test_hash.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/psych/test_hash.rb b/test/psych/test_hash.rb index e658984f48..e2a312901a 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) |