summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-06 18:54:02 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-06 18:54:02 +0000
commit53f22d3a0529ba95d41356f7e93396a42da25cf8 (patch)
treec45e26137f3da598f8870d002e0bb6a218db789b /array.c
parentd9ebaef79b6137e75d0cc53dd4f8d7136ebea684 (diff)
* array.c (rb_ary_product): core dumped with non array arguments.
a patch from Yusuke ENDOH <mame AT tsg.ne.jp>. [ruby-dev:32180] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;