From: merch-redmine@... Date: 2019-07-29T23:36:32+00:00 Subject: [ruby-core:94003] [Ruby master Bug#15449] Range#=== is not using cover in Ruby 2.6 Issue #15449 has been updated by jeremyevans0 (Jeremy Evans). Backport changed from 2.4: UNKNOWN, 2.5: UNKNOWN to 2.5: DONTNEED, 2.6: REQUIRED File range-case-cover-string.patch added I agree that this is a bug, and not the intended behavior now that `Range#===` calls `Range#cover?` in most cases. Hopefully nobu can confirm. Attached is a patch that fixes the behavior. I think this should be backported to 2.6, assuming this behavior is not intentional. ---------------------------------------- Bug #15449: Range#=== is not using cover in Ruby 2.6 https://bugs.ruby-lang.org/issues/15449#change-80219 * Author: ana06 (Ana Maria Martinez Gomez) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: 2.6.0dev (2018-12-20 trunk 66466) * Backport: 2.5: DONTNEED, 2.6: REQUIRED ---------------------------------------- ``` irb(main):105:0> ('A'..'Z').cover? 'ANA' => true irb(main):106:0> ('A'..'Z') === 'ANA' => false ``` Is this expected? Should `===` use cover according to NEWS in Ruby 2.6? ``` > ruby -v ruby 2.6.0dev (2018-12-20 trunk 66466) [x86_64-linux] ``` ---Files-------------------------------- range-case-cover-string.patch (3.69 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: