module ActiveSupport::Deprecation::Disallowed

def deprecation_disallowed?(message)

def deprecation_disallowed?(message)
  return false if explicitly_allowed?(message)
  return true if disallowed_warnings == :all
  message && disallowed_warnings.any? do |rule|
    case rule
    when String, Symbol
      message.include?(rule.to_s)
    when Regexp
      rule.match?(message)
    end
  end
end

def disallowed_warnings

which should be treated as disallowed.
Returns the configured criteria used to identify deprecation messages
def disallowed_warnings
  @disallowed_warnings ||= []
end

def explicitly_allowed?(message)

def explicitly_allowed?(message)
  allowances = @explicitly_allowed_warnings.value
  return false unless allowances
  return true if allowances == :all
  message && Array(allowances).any? do |rule|
    case rule
    when String, Symbol
      message.include?(rule.to_s)
    when Regexp
      rule.match?(message)
    end
  end
end