Project

General

Profile

Actions

Bug #3945

closed

Numeric#step with infinity unit

Added by naruse (Yui NARUSE) over 13 years ago. Updated almost 13 years ago.

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

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 1 (0 open1 closed)

Related to Ruby master - Bug #781: Numeric#step で step として Infinity をつかうと NaN を生成することがあるClosed11/24/2008Actions
Actions #1

Updated by naruse (Yui NARUSE) over 13 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

Actions

Also available in: Atom PDF

Like0
Like0