* 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
Родитель 6ae881af48
Коммит 58772d7110
2 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -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> Sun Jun 6 12:31:57 2010 Narihiro Nakamura <authorNari@gmail.com>
* gc.c: set_heaps_increment is not * gc.c: set_heaps_increment is not

Просмотреть файл

@ -4308,6 +4308,7 @@ rb_ary_product(int argc, VALUE *argv, VALUE ary)
/* initialize the arrays of arrays */ /* initialize the arrays of arrays */
ARY_SET_LEN(t0, n); ARY_SET_LEN(t0, n);
arrays[0] = ary; 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]); for (i = 1; i < n; i++) arrays[i] = to_ary(argv[i-1]);
/* initialize the counters for the arrays */ /* initialize the counters for the arrays */