summaryrefslogtreecommitdiff
path: root/test/ruby/test_array.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-14 01:55:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-14 01:55:25 +0000
commitb654e0719a6d87f51c8b680e53347e4f5de8a54e (patch)
treec501f316269735e959d280fed5dd35e360970bfc /test/ruby/test_array.rb
parent4802149e44ac616ac50cd7a4315b5933f4a89b19 (diff)
array.c: non-recursive rcombinate0
* array.c (rcombinate0): remove recursion, by looping with indexes stored in `p`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_array.rb')
-rw-r--r--test/ruby/test_array.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index b9b2d5f88b..d728bb78f0 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -1815,6 +1815,12 @@ class TestArray < Test::Unit::TestCase
a = @cls[0, 1, 2, 3, 4][1, 4].repeated_combination(2)
assert_empty(a.reject {|x| !x.include?(0)})
+
+ assert_separately([], <<-"end;") # do
+ assert_nothing_raised(SystemStackError) do
+ assert_equal(:ok, Array.new(100_000, nil).repeated_combination(500_000) {break :ok})
+ end
+ end;
end
def test_take