aboutsummaryrefslogtreecommitdiffstats
path: root/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/vm.c b/vm.c
index 79404a3fa4..29e23b4a6f 100644
--- a/vm.c
+++ b/vm.c
@@ -550,8 +550,7 @@ invoke_block(rb_thread_t *th, rb_block_t *block, VALUE self, int argc, VALUE *ar
rb_vm_set_finish_env(th);
- CHECK_STACK_OVERFLOW(th->cfp, argc);
- CHECK_STACK_OVERFLOW(th->cfp, iseq->stack_max);
+ CHECK_STACK_OVERFLOW(th->cfp, argc + iseq->stack_max);
for (i=0; i<argc; i++) {
th->cfp->sp[i] = argv[i];