From: "jeremyevans0 (Jeremy Evans)" Date: 2022-06-08T15:53:17+00:00 Subject: [ruby-core:108809] [Ruby master Bug#18748] Range#cover? returns true for beginless range of different type Issue #18748 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Closed Fixed by commit:c5475f42694eff35465c3332e0182c0611ca5918 (I messed up the bug reference in the commit message). ---------------------------------------- Bug #18748: Range#cover? returns true for beginless range of different type https://bugs.ruby-lang.org/issues/18748#change-97884 * Author: jeremyevans0 (Jeremy Evans) * Status: Closed * Priority: Normal * Backport: 2.7: REQUIRED, 3.0: REQUIRED, 3.1: REQUIRED ---------------------------------------- While adding documentation to address #18155, I found a bug: ```ruby (2..).cover?("2"..) # => false (..2).cover?(.."2") # => true ``` I've submitted a pull request for fix this: https://github.com/ruby/ruby/pull/5831 -- https://bugs.ruby-lang.org/ Unsubscribe: