Project

General

Profile

Actions

Bug #18748

closed

Range#cover? returns true for beginless range of different type

Added by jeremyevans0 (Jeremy Evans) over 2 years ago. Updated over 1 year ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:108364]

Description

While adding documentation to address #18155, I found a bug:

(2..).cover?("2"..) # => false
(..2).cover?(.."2") # => true

I've submitted a pull request for fix this: https://github.com/ruby/ruby/pull/5831

Updated by jeremyevans0 (Jeremy Evans) over 2 years ago

  • Status changed from Open to Closed

Fixed by c5475f42694eff35465c3332e0182c0611ca5918 (I messed up the bug reference in the commit message).

Updated by nagachika (Tomoyuki Chikanaga) over 1 year ago

  • Backport changed from 2.7: REQUIRED, 3.0: REQUIRED, 3.1: REQUIRED to 2.7: REQUIRED, 3.0: REQUIRED, 3.1: DONE

ruby_3_1 477ab3f6c7f14c79e13f694463aa06a59206dda1 merged revision(s) c5475f42694eff35465c3332e0182c0611ca5918.

Actions

Also available in: Atom PDF

Like0
Like0Like0