diff --git a/.gitignore b/.gitignore index 7e6379d8f3643..eb1ff5afc9425 100644 --- a/.gitignore +++ b/.gitignore @@ -69,7 +69,6 @@ !**/vendor/bundle/ruby/*/gems/activesupport-*/lib/active_support/core_ext/hash/deep_merge.rb !**/vendor/bundle/ruby/*/gems/activesupport-*/lib/active_support/core_ext/hash/deep_transform_values.rb !**/vendor/bundle/ruby/*/gems/activesupport-*/lib/active_support/core_ext/hash/keys.rb -!**/vendor/bundle/ruby/*/gems/activesupport-*/lib/active_support/core_ext/hash/slice.rb !**/vendor/bundle/ruby/*/gems/activesupport-*/lib/active_support/core_ext/object/deep_dup.rb !**/vendor/bundle/ruby/*/gems/activesupport-*/lib/active_support/core_ext/object/duplicable.rb !**/vendor/bundle/ruby/*/gems/activesupport-*/lib/active_support/core_ext/string/exclude.rb diff --git a/Library/Homebrew/dev-cmd/update-maintainers.rb b/Library/Homebrew/dev-cmd/update-maintainers.rb index 6df75822db795..8bdeb0fd46b5c 100644 --- a/Library/Homebrew/dev-cmd/update-maintainers.rb +++ b/Library/Homebrew/dev-cmd/update-maintainers.rb @@ -5,8 +5,6 @@ require "utils/github" require "manpages" -require "active_support/core_ext/hash/slice" - module Homebrew module_function @@ -39,7 +37,7 @@ def update_maintainers sentences = {} members.each do |group, hash| - hash.slice!(*public_members) + hash.replace(hash.slice(*public_members)) hash.each { |login, name| hash[login] = "[#{name}](https://github.com/#{login})" } sentences[group] = hash.values.sort.to_sentence end diff --git a/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.6/lib/active_support/core_ext/hash/slice.rb b/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.6/lib/active_support/core_ext/hash/slice.rb deleted file mode 100644 index 56bc5de382e68..0000000000000 --- a/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.6/lib/active_support/core_ext/hash/slice.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class Hash - # Replaces the hash with only the given keys. - # Returns a hash containing the removed key/value pairs. - # - # hash = { a: 1, b: 2, c: 3, d: 4 } - # hash.slice!(:a, :b) # => {:c=>3, :d=>4} - # hash # => {:a=>1, :b=>2} - def slice!(*keys) - omit = slice(*self.keys - keys) - hash = slice(*keys) - hash.default = default - hash.default_proc = default_proc if default_proc - replace(hash) - omit - end - - # Removes and returns the key/value pairs matching the given keys. - # - # hash = { a: 1, b: 2, c: 3, d: 4 } - # hash.extract!(:a, :b) # => {:a=>1, :b=>2} - # hash # => {:c=>3, :d=>4} - def extract!(*keys) - keys.each_with_object(self.class.new) { |key, result| result[key] = delete(key) if has_key?(key) } - end -end