diff --git a/actionpack/lib/action_dispatch/journey/formatter.rb b/actionpack/lib/action_dispatch/journey/formatter.rb index a4861719f8..36c041f254 100644 --- a/actionpack/lib/action_dispatch/journey/formatter.rb +++ b/actionpack/lib/action_dispatch/journey/formatter.rb @@ -146,12 +146,12 @@ module ActionDispatch missing_keys << key end when RegexCaseComparator - unless RegexCaseComparator::DEFAULT_REGEX === parts[key] + unless RegexCaseComparator::DEFAULT_REGEX.match?(parts[key]) missing_keys ||= [] missing_keys << key end else - unless /\A#{tests[key]}\Z/ === parts[key] + unless /\A#{tests[key]}\Z/.match?(parts[key]) missing_keys ||= [] missing_keys << key end diff --git a/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb b/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb index 5003e92f43..c8598bc166 100644 --- a/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb +++ b/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb @@ -48,7 +48,7 @@ module ActionDispatch t.map { |s| if states = @regexp_states[s] - regexps.concat states.map { |re, v| re === a ? v : nil } + regexps.concat states.map { |re, v| re.match?(a) ? v : nil } end if states = @string_states[s] diff --git a/activerecord/lib/arel/visitors/oracle.rb b/activerecord/lib/arel/visitors/oracle.rb index a0a74d365c..e8bf24a449 100644 --- a/activerecord/lib/arel/visitors/oracle.rb +++ b/activerecord/lib/arel/visitors/oracle.rb @@ -104,7 +104,7 @@ module Arel # :nodoc: all return o if o.orders.empty? return o unless o.cores.any? do |core| core.projections.any? do |projection| - /FIRST_VALUE/ === projection + /FIRST_VALUE/.match?(projection) end end # Previous version with join and split broke ORDER BY clause diff --git a/activerecord/test/cases/test_case.rb b/activerecord/test/cases/test_case.rb index 1b8bad32a4..04f425945d 100644 --- a/activerecord/test/cases/test_case.rb +++ b/activerecord/test/cases/test_case.rb @@ -42,7 +42,7 @@ module ActiveRecord ensure failed_patterns = [] patterns_to_match.each do |pattern| - failed_patterns << pattern unless SQLCounter.log_all.any? { |sql| pattern === sql } + failed_patterns << pattern unless SQLCounter.log_all.any? { |sql| pattern.match?(sql) } end assert failed_patterns.empty?, "Query pattern(s) #{failed_patterns.map(&:inspect).join(', ')} not found.#{SQLCounter.log.size == 0 ? '' : "\nQueries:\n#{SQLCounter.log.join("\n")}"}" end