aboutsummaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index b036d06421..3a0536e10b 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2672,6 +2672,7 @@ fix_size(VALUE fix)
static VALUE
int_upto(VALUE from, VALUE to)
{
+ RETURN_ENUMERATOR(from, 1, &to);
if (FIXNUM_P(from) && FIXNUM_P(to)) {
long i, end;
@@ -2710,6 +2711,7 @@ int_upto(VALUE from, VALUE to)
static VALUE
int_downto(VALUE from, VALUE to)
{
+ RETURN_ENUMERATOR(from, 1, &to);
if (FIXNUM_P(from) && FIXNUM_P(to)) {
long i, end;
@@ -2749,6 +2751,7 @@ int_downto(VALUE from, VALUE to)
static VALUE
int_dotimes(VALUE num)
{
+ RETURN_ENUMERATOR(num, 0, 0);
if (FIXNUM_P(num)) {
long i, end;