summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-06 10:56:45 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-06 10:56:45 +0000
commit58772d711059308d874b092f42ef4a8ac65add3d (patch)
tree8508c5acc106f88e35b56f288872e2cabe434b3a /array.c
parent6ae881af48b578f2f2ffd4248991ddb4534e8d54 (diff)
* 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
Diffstat (limited to 'array.c')
-rw-r--r--array.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/array.c b/array.c
index 35335f5437..04c244a385 100644
--- a/array.c
+++ b/array.c
@@ -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 */