From: matz@... Date: 2019-07-30T13:35:32+00:00 Subject: [ruby-core:94055] [Ruby master Bug#12961] Bad value for range using infinity for Date or Time Issue #12961 has been updated by matz (Yukihiro Matsumoto). So we only need to fix `Date` class. I don't think we should enhance Time ranges to support Integer/Float. Matz. ---------------------------------------- Bug #12961: Bad value for range using infinity for Date or Time https://bugs.ruby-lang.org/issues/12961#change-80283 * 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: