From c86ce094e283f400889f4f0bc97b897e84df04ac Mon Sep 17 00:00:00 2001 From: yugui Date: Thu, 9 Oct 2008 05:47:04 +0000 Subject: * include/ruby/ruby.h: embeds the elements of an array into its struct RArray for # of elements <= 3. * array.c: ditto. * gc.c (gc_mark_children): following the change of struct RArray. * ext/tk/tcltklib.c (ip_ruby_cmp): ditto. * parse.y (coverage): ditto. * proc.c (curry): ditto. * .gdbinit: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- proc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'proc.c') diff --git a/proc.c b/proc.c index 705a7640b2..4907d80bbb 100644 --- a/proc.c +++ b/proc.c @@ -1674,11 +1674,7 @@ static VALUE curry(VALUE dummy, VALUE args, int argc, VALUE *argv, VALUE passed_ static VALUE make_curry_proc(VALUE proc, VALUE passed, VALUE arity) { - VALUE args = rb_ary_new2(3); - RARRAY_PTR(args)[0] = proc; - RARRAY_PTR(args)[1] = passed; - RARRAY_PTR(args)[2] = arity; - RARRAY_LEN(args) = 3; + VALUE args = rb_ary_new3(3, proc, passed, arity); rb_ary_freeze(passed); rb_ary_freeze(args); return rb_proc_new(curry, args); -- cgit v1.2.3