From 34b63da0b0704eb67e6d8c66505fcb6a576e5f1c Mon Sep 17 00:00:00 2001
From: ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Tue, 5 Jun 2007 07:13:52 +0000
Subject: * insns.def (invokeblock): check block is created by lambda   or
 Proc.new. * vm.c (block_proc_is_lambda): added.

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
 insns.def | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'insns.def')

diff --git a/insns.def b/insns.def
index ed147a773..dc8b47b14 100644
--- a/insns.def
+++ b/insns.def
@@ -1238,7 +1238,7 @@ send
 	    id = ip->defined_method_id;
 	    
 	    if (ip != ip->local_iseq) {
-		/* defined by method_defined() */
+		/* defined by Module#define_method() */
 		rb_control_frame_t *lcfp = GET_CFP();
 
 		while (lcfp->iseq != ip) {
@@ -1345,7 +1345,8 @@ invokeblock
 	}
 
 	INC_SP(-argc);
-	argc = th_yield_setup_args(th, iseq, argc, GET_SP(), 0);
+	argc = th_yield_setup_args(th, iseq, argc, GET_SP(),
+				   block_proc_is_lambda(block->proc));
 	INC_SP(argc);
 
 	push_frame(th, iseq,
-- 
cgit 

