diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_hash.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 83d16d462e..8b6065146c 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -1556,6 +1556,17 @@ class TestHash < Test::Unit::TestCase end end + def hash_iter_recursion(h, level) + return if level == 0 + h.each_key {} + h.each_value { hash_iter_recursion(h, level - 1) } + end + + def test_iterlevel_in_ivar_bug19589 + h = { a: nil } + hash_iter_recursion(h, 200) + end + def test_threaded_iter_level bug9105 = '[ruby-dev:47807] [Bug #9105]' h = @cls[1=>2] |