Project

General

Profile

Actions

Bug #781

closed

Numeric#step で step として Infinity をつかうと NaN を生成することがある

Added by tadf (tadayoshi funaba) about 16 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
Backport:

Description

=begin
1.0/0 = Infinity として

$ ./ruby -ve "0.step(10,1.0/0){|x| p x}"
ruby 1.9.0 (2008-11-24 revision 20336) [i686-linux]
NaN

1.8 も同じですが、1.6 はなりません。

$ ruby168 -ve "0.step(10,1.0/0){|x| p x}"
ruby 1.6.8 (2002-12-24) [i686-linux]
0
=end


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #3945: Numeric#step with infinity unitClosed10/14/2010Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0