From: "wilhelmsen (Hallgeir Wilhelmsen) via ruby-core" Date: 2023-02-06T13:28:13+00:00 Subject: [ruby-core:112232] [Ruby master Bug#19418] Checking if a date in an open date range times out when the range starts after the test date Issue #19418 has been reported by wilhelmsen (Hallgeir Wilhelmsen). ---------------------------------------- Bug #19418: Checking if a date in an open date range times out when the range starts after the test date https://bugs.ruby-lang.org/issues/19418 * Author: wilhelmsen (Hallgeir Wilhelmsen) * Status: Open * Priority: Normal * ruby -v: 3.1.3 * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- ` require 'date' ((Date.today + 1)..).include?(Date.today) ` is expected to return `false`. It never return a value, as like it is in a never ending loop. `((Date.today)..).include?(Date.today)` however, returns `true` right away. `(2..).include?(1)` also returns false, as expected. I.e. this seems to be a date issue and not a range issue, and it seem to happen when the start date comes after the date to check for. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/