summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/enum.c b/enum.c
index 4613ab7..2b2806a 100644
--- a/enum.c
+++ b/enum.c
@@ -2845,6 +2845,7 @@ enum_cycle_size(VALUE self, VALUE args, VALUE eobj)
VALUE size = enum_size(self, args, 0);
if (size == Qnil) return Qnil;
+ if (FIXNUM_ZERO_P(size)) return size;
if (args && (RARRAY_LEN(args) > 0)) {
n = RARRAY_AREF(args, 0);