mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* range.c (range_step): allow float step bigger than zero but less
than one. [ruby-dev:34557] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
de0561684c
commit
0a32f9a43f
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu May 1 23:35:11 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* range.c (range_step): allow float step bigger than zero but less
|
||||
than one. [ruby-dev:34557]
|
||||
|
||||
Thu May 1 23:20:12 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* bignum.c (rb_big_divide): return an integer for idiv.
|
||||
|
|
2
range.c
2
range.c
|
@ -312,7 +312,7 @@ range_step(int argc, VALUE *argv, VALUE range)
|
|||
unit = NUM2LONG(step);
|
||||
}
|
||||
else {
|
||||
VALUE tmp = rb_to_int(step);
|
||||
VALUE tmp = rb_funcall(rb_funcall(b, '+', 1, step), '-', 1, b);
|
||||
unit = rb_cmpint(tmp, step, INT2FIX(0));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue