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 /array.c | |
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 'array.c')
-rw-r--r-- | array.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -4308,6 +4308,7 @@ rb_ary_product(int argc, VALUE *argv, VALUE ary) /* initialize the arrays of arrays */ ARY_SET_LEN(t0, n); arrays[0] = ary; + for (i = 1; i < n; i++) arrays[i] = Qnil; for (i = 1; i < n; i++) arrays[i] = to_ary(argv[i-1]); /* initialize the counters for the arrays */ |