diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | array.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Wed Nov 7 03:52:26 2007 Yukihiro Matsumoto <matz@ruby-lang.org> + + * array.c (rb_ary_product): core dumped with non array arguments. + a patch from Yusuke ENDOH <mame AT tsg.ne.jp>. [ruby-dev:32180] + Wed Nov 7 03:32:38 2007 Yukihiro Matsumoto <matz@ruby-lang.org> * lib/rexml/encodings/SHIFT-JIS.rb (REXML::Encoding): place -x for @@ -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; |