diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-02 08:07:24 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-02 08:07:24 +0000 |
commit | 0672c5fc3212a7b423eb35f706ee75c72632a376 (patch) | |
tree | 7032a081de143c9510bd930a8bfbb2d979dd6279 /numeric.c | |
parent | 51f6ed8161442265448f5b6c462a3e442cf7fcb1 (diff) |
merges r29490 from trunk into ruby_1_9_2.
--
* 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/branches/ruby_1_9_2@30045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1576,7 +1576,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; |