Project

General

Profile

Actions

Bug #3945

closed

Numeric#step with infinity unit

Added by naruse (Yui NARUSE) about 14 years ago. Updated over 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

Also available in: Atom PDF

Like0
Like0