summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-27 05:59:03 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-27 05:59:03 +0000
commitceec42bf8c4e350d02d11b84adf9b8ebf7b4af47 (patch)
tree6f9e1b9a22f7b1f58a4d23e6e44b3c3cff16c6b0 /range.c
parent8369164408f2f9aa2984257f428f957876a84ced (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;
}