mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8369164408
commit
ceec42bf8c
9 changed files with 129 additions and 85 deletions
3
range.c
3
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue