Project

General

Profile

Actions

Bug #18748

closed

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

Added by jeremyevans0 (Jeremy Evans) almost 2 years ago. Updated about 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

Actions

Also available in: Atom PDF

Like0
Like0Like0