Hide default gems warnings for Ruby 3.4.

These omit warnings with Ruby 3.3 and are required for Ruby 3.4. We'll
fix them when we're upgrading to 3.4 instead.
This commit is contained in:
Mike McQuaid 2024-05-17 14:42:44 +09:00
parent ae914f6255
commit a408da65fc
No known key found for this signature in database
3 changed files with 11 additions and 2 deletions

View File

@ -4,7 +4,10 @@
require "api/analytics"
require "api/cask"
require "api/formula"
require "warnings"
Warnings.ignore :default_gems do
require "base64" # TODO: Add this to the Gemfile or remove it before moving to Ruby 3.4.
end
require "extend/cachable"
module Homebrew

View File

@ -2,7 +2,10 @@
# frozen_string_literal: true
require "abstract_command"
require "warnings"
Warnings.ignore :default_gems do
require "csv"
end
module Homebrew
module DevCmd

View File

@ -14,6 +14,9 @@ module Warnings
%r{warning: please see https://github\.com/whitequark/parser#compatibility-with-ruby-mri\.},
# <!-- vale on -->
],
default_gems: [
/warning: .+\.rb was loaded from the standard library, .+ default gems since Ruby \d+\.\d+\.\d+\./,
],
}.freeze
def self.ignore(*warnings)