diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-20 16:43:41 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-20 16:43:41 +0000 |
commit | 060f433f48ccb293ed21bc99a89b162a548d2e74 (patch) | |
tree | beb1650b092b8a90fef0bf9b94288d0b38091117 /vm_insnhelper.c | |
parent | c573aaf73f68500ec482f756dd14508002714e61 (diff) | |
download | ruby-060f433f48ccb293ed21bc99a89b162a548d2e74.tar.gz |
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@23503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 473a336117..bc196d83b3 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); |