From 6112b290037533383811e328f26759320d036d60 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 5 May 2016 07:27:10 +0000 Subject: proc.c: no temporary args array * proc.c (bmcall): method proc is always lambda, args is the array which is made from argc and argv. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- proc.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/proc.c b/proc.c index 570cbcbc64..ca0158bc58 100644 --- a/proc.c +++ b/proc.c @@ -2529,16 +2529,7 @@ mlambda(VALUE method) static VALUE bmcall(VALUE args, VALUE method, int argc, VALUE *argv, VALUE passed_proc) { - volatile VALUE a; - VALUE ret; - - if (CLASS_OF(args) != rb_cArray) { - return rb_method_call_with_block(1, &args, method, passed_proc); - } - argc = check_argc(RARRAY_LEN(args)); - ret = rb_method_call_with_block(argc, RARRAY_PTR(args), method, passed_proc); - RB_GC_GUARD(a) = args; - return ret; + return rb_method_call_with_block(argc, argv, method, passed_proc); } VALUE -- cgit v1.2.3