summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-06 01:44:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-06 01:44:38 +0000
commitc22b223cb0a48342cef7412e139313e60a913e71 (patch)
tree06e41261c0c6f831948fd8e4ed59494231f9eff8 /array.c
parentf40d2c967005e49914046bbc6a7a8c06c46b1d38 (diff)
* array.c (rb_ary_product): need to set the length in order to get
the entries marked. [ruby-dev:41540] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28184 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 b7ee2f8833..35335f5437 100644
--- a/array.c
+++ b/array.c
@@ -4306,6 +4306,7 @@ rb_ary_product(int argc, VALUE *argv, VALUE ary)
RBASIC(t1)->klass = 0;
/* initialize the arrays of arrays */
+ ARY_SET_LEN(t0, n);
arrays[0] = ary;
for (i = 1; i < n; i++) arrays[i] = to_ary(argv[i-1]);