summaryrefslogtreecommitdiff
path: root/test/ruby/test_array.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-14 01:54:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-14 01:54:45 +0000
commit9d6b7aede9c20ff46290d9d08027dc8a025f0e78 (patch)
tree32ed149a35735e670a0bf61e2fd7ba96d2cf7d15 /test/ruby/test_array.rb
parent02725fb682c5653142d7e4b5fca86e12e9359ef5 (diff)
array.c: non-recursive permute0
* array.c (permute0): remove recursion, by looping with indexes stored in `p`. [ruby-core:63103] [Bug #9932] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_array.rb')
-rw-r--r--test/ruby/test_array.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index a3d7163605..732a8ba44e 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -1748,6 +1748,13 @@ class TestArray < Test::Unit::TestCase
bug3708 = '[ruby-dev:42067]'
assert_equal(b, @cls[0, 1, 2, 3, 4][1, 4].permutation.to_a, bug3708)
+
+ bug9932 = '[ruby-core:63103] [Bug #9932]'
+ assert_separately([], <<-"end;") # do
+ assert_nothing_raised(SystemStackError, "#{bug9932}") do
+ assert_equal(:ok, Array.new(100_000, nil).permutation {break :ok})
+ end
+ end;
end
def test_repeated_permutation