From: naruse@... Date: 2019-07-30T08:50:09+00:00 Subject: [ruby-core:94044] [Ruby master Bug#12961] Bad value for range using infinity for Date or Time Issue #12961 has been updated by naruse (Yui NARUSE). matz (Yukihiro Matsumoto) wrote: > Since both `Time` and `Date` work with float numbers at the other ends of the ranges, it should accept `Float::INFINITY` as well. > > Matz. It looks only Date supports float number. ---------------------------------------- Bug #12961: Bad value for range using infinity for Date or Time https://bugs.ruby-lang.org/issues/12961#change-80272 * Author: loudandwicked (Damjan Cilen��ek) * Status: Assigned * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) * Target version: * ruby -v: ruby 2.3.2p217 (2016-11-15 revision 56796) [x86_64-darwin16] * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- How to reproduce: ~~~ ruby -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 -- https://bugs.ruby-lang.org/ Unsubscribe: