Project

General

Profile

Actions

Bug #17409

closed

Endless range of dates stuck on include? when miss

Added by gsmetal (Sergey G) over 3 years ago. Updated over 3 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
[ruby-core:101534]

Description

This code stucks (on latest ruby 2.7.1):

require 'date'

(Date.today..).include?(Date.today - 1)

But it works well with cover?:

2.7.1 :001 > require 'date'
 => true 
2.7.1 :002 > (Date.today..).cover?(Date.today - 1)
 => false 
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0