diff --git a/ChangeLog b/ChangeLog index 88b34f64cd..a9669c7648 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Jan 2 00:53:16 2014 Masaki Matsushita + + * array.c (rb_ary_zip): use ALLOCV_N() instead of ALLOCA_N(). + Thu Jan 2 00:04:29 2014 Masaki Matsushita * hash.c (rb_hash_keys): make rb_hash_keys() static. diff --git a/array.c b/array.c index 45713c55b0..c4869789e5 100644 --- a/array.c +++ b/array.c @@ -3240,8 +3240,10 @@ rb_ary_zip(int argc, VALUE *argv, VALUE ary) if (rb_block_given_p()) { int arity = rb_block_arity(); - if (arity > 1 && argc+1 < 0x100) { - VALUE *tmp = ALLOCA_N(VALUE, argc+1); + if (arity > 1) { + VALUE work, *tmp; + + tmp = ALLOCV_N(VALUE, work, argc+1); for (i=0; i