
Issue #18748 has been updated by nagachika (Tomoyuki Chikanaga). 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. ---------------------------------------- Bug #18748: Range#cover? returns true for beginless range of different type https://bugs.ruby-lang.org/issues/18748#change-102544 * Author: jeremyevans0 (Jeremy Evans) * Status: Closed * Priority: Normal * Backport: 2.7: REQUIRED, 3.0: REQUIRED, 3.1: DONE ---------------------------------------- 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/