aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-05 07:27:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-05 07:27:10 +0000
commit6112b290037533383811e328f26759320d036d60 (patch)
treed037f4a983f145650cf03fc64744fc85e5a95165
parentcfc29cf289c75c1d445483dc988620f29aee6eb3 (diff)
downloadruby-6112b290037533383811e328f26759320d036d60.tar.gz
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
-rw-r--r--proc.c11
1 files changed, 1 insertions, 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