summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index 5a8d40101d..5c28618a1a 100644
--- a/numeric.c
+++ b/numeric.c
@@ -5664,6 +5664,12 @@ int_downto(VALUE from, VALUE to)
return from;
}
+static VALUE
+int_dotimes_size(VALUE num, VALUE args, VALUE eobj)
+{
+ return int_neg_p(num) ? INT2FIX(0) : num;
+}
+
/*
* call-seq:
* round(ndigits= 0, half: :up) -> integer