summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
Diffstat (limited to 'range.c')
-rw-r--r--range.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/range.c b/range.c
index ed835c2..cd97504 100644
--- a/range.c
+++ b/range.c
@@ -341,6 +341,9 @@ range_length(range)
if (!EXCL(range)) {
size = rb_funcall(size, '+', 1, INT2FIX(1));
}
+ if (TYPE(size) == T_FLOAT) {
+ size = rb_funcall(size, rb_intern("floor"), 0);
+ }
return size;
}