1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* array.c (rb_ary_product): clear uninitialized elements in temporary

array.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-06-06 10:56:45 +00:00
parent 6ae881af48
commit 58772d7110
2 changed files with 6 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Sun Jun 6 19:55:21 2010 Tanaka Akira <akr@fsij.org>
* array.c (rb_ary_product): clear uninitialized elements in temporary
array.
Sun Jun 6 12:31:57 2010 Narihiro Nakamura <authorNari@gmail.com>
* gc.c: set_heaps_increment is not

View file

@ -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 */