summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-26 13:43:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-26 13:43:22 +0000
commit5e2f227d219fe67c8c57aa32dafb61ac4591fb20 (patch)
tree962aafa0b26bda66d9227acfb8775a848308fac5 /range.c
parent26646186afbf474c75a3606a1c492fbc74575c2b (diff)
intern.h: define rb_enumerator_size_func
* include/ruby/intern.h (rb_enumerator_size_func): define strict function declaration for rb_enumeratorize_with_size(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'range.c')
-rw-r--r--range.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/range.c b/range.c
index 280c333..8fa7dcb 100644
--- a/range.c
+++ b/range.c
@@ -327,7 +327,7 @@ discrete_object_p(VALUE obj)
}
static VALUE
-range_step_size(VALUE range, VALUE args)
+range_step_size(VALUE range, VALUE args, VALUE eobj)
{
VALUE b = RANGE_BEG(range), e = RANGE_END(range);
VALUE step = INT2FIX(1);
@@ -716,6 +716,12 @@ range_size(VALUE range)
return Qnil;
}
+static VALUE
+range_enum_size(VALUE range, VALUE args, VALUE eobj)
+{
+ return range_size(range);
+}
+
/*
* call-seq:
* rng.each {| i | block } -> rng
@@ -742,7 +748,7 @@ range_each(VALUE range)
{
VALUE beg, end;
- RETURN_SIZED_ENUMERATOR(range, 0, 0, range_size);
+ RETURN_SIZED_ENUMERATOR(range, 0, 0, range_enum_size);
beg = RANGE_BEG(range);
end = RANGE_END(range);