diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-06 10:56:45 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-06 10:56:45 +0000 |
commit | 58772d711059308d874b092f42ef4a8ac65add3d (patch) | |
tree | 8508c5acc106f88e35b56f288872e2cabe434b3a /array.c | |
parent | 6ae881af48b578f2f2ffd4248991ddb4534e8d54 (diff) | |
download | ruby-58772d711059308d874b092f42ef4a8ac65add3d.tar.gz |
* 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.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 */ |