aboutsummaryrefslogtreecommitdiffstats
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/array.c b/array.c
index 09063d7dc3..aee476a688 100644
--- a/array.c
+++ b/array.c
@@ -3170,7 +3170,7 @@ rb_ary_product(int argc, VALUE *argv, VALUE ary)
/* initialize the arrays of arrays */
arrays[0] = ary;
- for (i = 1; i < n; i++) arrays[i] = argv[i-1];
+ for (i = 1; i < n; i++) arrays[i] = to_ary(argv[i-1]);
/* initialize the counters for the arrays */
for (i = 0; i < n; i++) counters[i] = 0;