Skip to content

Commit

Permalink
Fix for r33811.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nurse committed Nov 22, 2011
1 parent 18b5204 commit cc56bde
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
Tue Nov 22 11:26:08 2011 NARUSE, Yui <[email protected]>

Tue Nov 22 11:33:58 2011 Nobuyoshi Nakada <[email protected]>

* win32/win32.c (dupfd): argument of _osfhnd and so on should not
have side effect.

Tue Nov 22 11:26:08 2011 NARUSE, Yui <[email protected]>

* bignum.c (): refix of r33536. Don't change behavior of Bignum#/.
* bignum.c (rb_big_divide): refix of r33536. Don't change behavior of Bignum#/.
[ruby-core:40429] [Bug #5490]

Tue Nov 22 10:46:57 2011 NARUSE, Yui <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion numeric.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
Expand Down
2 changes: 2 additions & 0 deletions test/ruby/test_float.rb
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,8 @@ def test_step
(1.0..12.7).step(1.3).each do |n|
assert_operator(n, :<=, 12.7)
end

assert_equal([5.0, 4.0, 3.0, 2.0], 5.0.step(1.5, -1).to_a)
end

def test_step_excl
Expand Down

0 comments on commit cc56bde

Please sign in to comment.