summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-09 05:47:04 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-09 05:47:04 +0000
commitc86ce094e283f400889f4f0bc97b897e84df04ac (patch)
treeabeb5d04d71bf6318c1e81f88f5ff9877c51ed2d /proc.c
parent517a1c340631ecfcb7c2d5558e864a4fe60e315f (diff)
* 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
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c6
1 files changed, 1 insertions, 5 deletions
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);