diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-13 19:17:49 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-13 19:17:49 +0000 |
commit | ded94d1c8ca7b318aad0c92ca290d1b6b2f3814d (patch) | |
tree | 8fd11b6fa8f8dde6d21c2ac5c4a6b13e12b7370c /numeric.c | |
parent | b238a3f3fdb575749121f35bbf37bfc1baed050c (diff) | |
download | ruby-ded94d1c8ca7b318aad0c92ca290d1b6b2f3814d.tar.gz |
* numeric.c (ruby_float_step): fix Numeric#step with infinity unit
doesn't works well. [ruby-core:32779]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1621,7 +1621,7 @@ ruby_float_step(VALUE from, VALUE to, VALUE step, int excl) long i; if (isinf(unit)) { - if (unit > 0) rb_yield(DBL2NUM(beg)); + if (unit > 0 ? beg <= end : beg >= end) rb_yield(DBL2NUM(beg)); } else { if (err>0.5) err=0.5; |