From 7aab1c2a380a108585a64d1478371f05b8c7aaae Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Tue, 7 Mar 2023 10:16:52 -0800 Subject: [PATCH] Remove ActiveSupport String inflections --- Library/Homebrew/extend/kernel.rb | 4 ++-- Library/Homebrew/global.rb | 9 ++------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Library/Homebrew/extend/kernel.rb b/Library/Homebrew/extend/kernel.rb index 8204552ba3..e152d53c69 100644 --- a/Library/Homebrew/extend/kernel.rb +++ b/Library/Homebrew/extend/kernel.rb @@ -199,13 +199,13 @@ module Kernel if s > 59 m = s / 60 s %= 60 - res = +"#{m} #{"minute".pluralize(m)}" + res = +"#{m} #{Utils.pluralize("minute", m)}" return res.freeze if s.zero? res << " " end - res << "#{s} #{"second".pluralize(s)}" + res << "#{s} #{Utils.pluralize("second", s)}" res.freeze end diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 9666251ced..a7a80c1593 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -16,7 +16,8 @@ require "active_support/core_ext/object/blank" require "active_support/core_ext/string/filters" require "active_support/core_ext/object/try" require "active_support/core_ext/array/access" -require "active_support/core_ext/string/inflections" +require "i18n" +require "active_support/core_ext/hash/except" require "active_support/core_ext/kernel/reporting" require "active_support/core_ext/hash/keys" require "active_support/core_ext/hash/deep_merge" @@ -28,12 +29,6 @@ require "active_support/core_ext/string/indent" I18n.backend.available_locales # Initialize locales so they can be overwritten. I18n.backend.store_translations :en, support: { array: { last_word_connector: " and " } } -ActiveSupport::Inflector.inflections(:en) do |inflect| - inflect.irregular "formula", "formulae" - inflect.irregular "is", "are" - inflect.irregular "it", "they" -end - HOMEBREW_API_DEFAULT_DOMAIN = ENV.fetch("HOMEBREW_API_DEFAULT_DOMAIN").freeze HOMEBREW_BOTTLE_DEFAULT_DOMAIN = ENV.fetch("HOMEBREW_BOTTLE_DEFAULT_DOMAIN").freeze HOMEBREW_BREW_DEFAULT_GIT_REMOTE = ENV.fetch("HOMEBREW_BREW_DEFAULT_GIT_REMOTE").freeze