Fix for r33811.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2011-11-22 04:54:42 +00:00
parent 18b520443c
commit cc56bdee40
3 changed files with 6 additions and 2 deletions

View file

@ -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));
}
}