diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-11 04:21:18 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-11 04:21:18 +0000 |
commit | 27a0ad31c490fee6f69107a6d6c83cf19a0436d0 (patch) | |
tree | f686428df6edf3cddb7c059718bba2a82e749b50 /test/ruby | |
parent | 24d86dc09d4cef6de3e5667506b583d376cc8c6e (diff) |
merges r28187 and r28189 from trunk into ruby_1_9_2.
--
* array.c (rb_ary_product): clear uninitialized elements in temporary
array.
--
* test/ruby/test_array.rb (test_product): test for r28187.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_array.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 0ee38a2b37..28f9c49d87 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -1523,6 +1523,11 @@ class TestArray < Test::Unit::TestCase assert_equal([[1, 3, 6], [1, 3, 8], [1, 4, 6], [1, 4, 8], [1, 5, 6], [1, 5, 8], [2, 3, 6], [2, 3, 8], [2, 4, 6], [2, 4, 8], [2, 5, 6], [2, 5, 8]], acc, bug3394) + + def (o = Object.new).to_ary; GC.start; [3,4] end + acc = [1,2].product(*[o]*10) + assert_equal([1,2].product([3,4], [3,4], [3,4], [3,4], [3,4], [3,4], [3,4], [3,4], [3,4], [3,4]), + acc) end def test_permutation |