diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 7b8cf1c6c4..dbf041a732 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -2138,7 +2138,9 @@ class TestHashOnly < Test::Unit::TestCase def test_iterlevel_in_ivar_bug19589 h = { a: nil } - hash_iter_recursion(h, 200) + # Recursion level should be over 127 to actually test iterlevel being set in an instance variable, + # but it should be under 131 not to overflow the stack under MN threads/ractors. + hash_iter_recursion(h, 130) assert true end