Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Hide default gems warnings for Ruby 3.4. #17315

Merged
merged 1 commit into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Library/Homebrew/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
require "api/analytics"
require "api/cask"
require "api/formula"
require "base64" # TODO: Add this to the Gemfile or remove it before moving to Ruby 3.4.
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
Expand Down
5 changes: 4 additions & 1 deletion Library/Homebrew/dev-cmd/contributions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
# frozen_string_literal: true

require "abstract_command"
require "csv"
require "warnings"
Warnings.ignore :default_gems do
require "csv"
end

module Homebrew
module DevCmd
Expand Down
3 changes: 3 additions & 0 deletions Library/Homebrew/warnings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading