Bug #3945

Numeric#step with infinity unit

Added by Yui NARUSE over 3 years ago. Updated almost 3 years ago.

[ruby-core:32779]
Status:Closed
Priority:Normal
Assignee:-
Category:-
Target version:1.9.3
ruby -v:ruby 1.9.3dev (2010-10-13 trunk 29489) [x86_64-freebsd8.1] Backport:

Description

=begin
Numeric#step with infinity unit doesn't works well:

1.step(0, Float::INFINITY) {|x| p x }
1.0
=> 1
1.step(0, -Float::INFINITY) {|x| p x }
=> 1

Expected result is:

1.step(0, Float::INFINITY) {|x| p x }
=> 1
1.step(0, -Float::INFINITY) {|x| p x }
1.0
=> 1
=end


Related issues

Related to ruby-trunk - Bug #781: Numeric#step で step として Infinity をつかうと NaN を生成することがある Closed 11/24/2008

History

#1 Updated by Yui NARUSE over 3 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r29490.
Yui, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Also available in: Atom PDF