Project

General

Profile

Bug #12961

Bad value for range using infinity for Date or Time

Added by loudandwicked (Damjan Cilenšek) over 2 years ago. Updated about 2 years ago.

Status:
Assigned
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.2p217 (2016-11-15 revision 56796) [x86_64-darwin16]
[ruby-core:78220]

Description

How to reproduce:

-Float::INFINITY...Float::INFINITY # works
Date.today...Float::INFINITY # works
-Float::INFINITY...Date.today # fails with "ArgumentError: bad value for range"
Time.now...Float::INFINITY #fails with "ArgumentError: bad value for range"
-Float::INFINITY...Time.now #fails with "ArgumentError: bad value for range"

There's one similar bug report for 1.9.3, obviously still not resolved

History

Updated by shyouhei (Shyouhei Urabe) about 2 years ago

  • Status changed from Open to Assigned

Matz, please decide how it should work.

Also available in: Atom PDF