From 9d6b7aede9c20ff46290d9d08027dc8a025f0e78 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 14 Jun 2014 01:54:45 +0000 Subject: 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 --- test/ruby/test_array.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/ruby/test_array.rb') 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 -- cgit v1.2.3