summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-29 07:45:00 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-29 07:45:00 (GMT)
commit32145ebfd6b69f833e7f5bddb6968a702499eb67 (patch)
treed6daeebf7e924f78d87ec90c74251f7e1899514a /range.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 'range.c')
-rw-r--r--range.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/range.c b/range.c
index b0a59e1..c666b88 100644
--- a/range.c
+++ b/range.c
@@ -844,8 +844,9 @@ range_end(VALUE range)
static VALUE
-first_i(VALUE i, VALUE *ary)
+first_i(VALUE i, VALUE cbarg, int argc, VALUE *argv, VALUE blockarg)
{
+ VALUE *ary = (VALUE *)cbarg;
long n = NUM2LONG(ary[0]);
if (n <= 0) {