summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-29 07:45:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-29 07:45:00 +0000
commit32145ebfd6b69f833e7f5bddb6968a702499eb67 (patch)
treed6daeebf7e924f78d87ec90c74251f7e1899514a /array.c
parent9f45081627cf682b3ee938353da134d6f28560da (diff)
array.c, enum.c, range.c: rb_block_call_func compatible
* array.c (take_i), range.c (first_i): make rb_block_call_func compatible. * enum.c (collect_all, DEFINE_ENUMFUNCS): add blockarg. * enum.c ({min,max,minmax,chunk,slicebefore}_ii): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/array.c b/array.c
index 83a7274..b4b079d 100644
--- a/array.c
+++ b/array.c
@@ -3169,8 +3169,9 @@ rb_ary_delete_if(VALUE ary)
}
static VALUE
-take_i(VALUE val, VALUE *args, int argc, VALUE *argv, VALUE blockarg)
+take_i(VALUE val, VALUE cbarg, int argc, const VALUE *argv, VALUE blockarg)
{
+ VALUE *args = (VALUE *)cbarg;
if (args[1]-- == 0) rb_iter_break();
if (argc > 1) val = rb_ary_new4(argc, argv);
rb_ary_push(args[0], val);