From 3a6227f5ee9358bd8d0d093d0b4a7f3400e17e78 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 20 May 2009 16:43:41 +0000 Subject: * include/ruby/ruby.h (rb_long2int, RARRAY_LENINT): check long to cast to int. [ruby-dev:38508] * struct.c, vm_eval.c, vm_insnhelper.c: use RARRAY_LENINT. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_insnhelper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 473a33611..bc196d83b 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -774,7 +774,7 @@ vm_yield_setup_block_args(rb_thread_t *th, const rb_iseq_t * iseq, if (!(iseq->arg_simple & 0x02) && /* exclude {|a|} */ (m + iseq->arg_post_len) > 0 && /* this process is meaningful */ argc == 1 && !NIL_P(ary = rb_check_array_type(argv[0]))) { /* rhs is only an array */ - th->mark_stack_len = argc = RARRAY_LEN(ary); + th->mark_stack_len = argc = RARRAY_LENINT(ary); CHECK_STACK_OVERFLOW(th->cfp, argc); -- cgit