summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-22 04:54:42 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-22 04:54:42 +0000
commitcc56bdee405b6de918f60f9ac73433d84c04fde0 (patch)
tree7f64c0590c3e270fdab1e7dc8c20b847e8f831a0 /numeric.c
parent18b520443cfdf145f3cd7fd22f192c04dc0da9fc (diff)
Fix for r33811.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index c8616f5f73..53d85829bb 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1703,7 +1703,7 @@ ruby_float_step(VALUE from, VALUE to, VALUE step, int excl)
}
for (i=0; i<=n; i++) {
double d = i*unit+beg;
- if (end < d) d = end;
+ if (unit >= 0 ? end < d : d < end) d = end;
rb_yield(DBL2NUM(d));
}
}