Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dduugg committed Jan 12, 2024
1 parent c678491 commit 3dfce75
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@
!**/vendor/bundle/ruby/*/gems/*/lib
!**/vendor/bundle/ruby/*/gems/addressable-*/data
!**/vendor/bundle/ruby/*/gems/public_suffix-*/data
!**/vendor/bundle/ruby/*/gems/rubocop-performance-*/config
!**/vendor/bundle/ruby/*/gems/rubocop-rails-*/config
!**/vendor/bundle/ruby/*/gems/rubocop-rspec-*/config
!**/vendor/bundle/ruby/*/gems/rubocop-sorbet-*/config
!**/vendor/bundle/ruby/*/gems/sorbet-runtime-*/

# Ignore partially included gems where we don't need all files
**/vendor/gems/mechanize-*/.*
Expand Down Expand Up @@ -138,6 +133,7 @@
**/vendor/bundle/ruby/*/gems/simplecov_json_formatter-*/
**/vendor/bundle/ruby/*/gems/simpleidn-*/
**/vendor/bundle/ruby/*/gems/sorbet-*/
!**/vendor/bundle/ruby/*/gems/sorbet-runtime-*/
**/vendor/bundle/ruby/*/gems/spoom-*/
**/vendor/bundle/ruby/*/gems/stackprof-*/
**/vendor/bundle/ruby/*/gems/strscan-*/
Expand Down
8 changes: 6 additions & 2 deletions Library/Homebrew/extend/object/deep_dup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ class Object
# object.instance_variable_defined?(:@a) # => false
# dup.instance_variable_defined?(:@a) # => true
sig { returns(T.self_type) }
def deep_dup = duplicable? ? dup : self
def deep_dup
duplicable? ? dup : self
end
end

class Array
Expand All @@ -27,7 +29,9 @@ class Array
# array[1][2] # => nil
# dup[1][2] # => 4
sig { returns(T.self_type) }
def deep_dup = T.unsafe(self).map(&:deep_dup)
def deep_dup
T.unsafe(self).map(&:deep_dup)
end
end

class Hash
Expand Down
9 changes: 5 additions & 4 deletions Library/Homebrew/global.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
require "forwardable"
require "set"

require "extend/array"
require "extend/blank"
require "extend/enumerable"
require "extend/string"

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
Expand Down Expand Up @@ -61,10 +66,6 @@
%r[https://github\.com/([\w-]+)/([\w-]+)?/(?:pull/(\d+)|commit/[0-9a-fA-F]{4,40})].freeze
HOMEBREW_BOTTLES_EXTNAME_REGEX = /\.([a-z0-9_]+)\.bottle\.(?:(\d+)\.)?tar\.gz$/.freeze

require "extend/array"
require "extend/blank"
require "extend/enumerable"
require "extend/string"
require "env_config"
require "macos_version"
require "os"
Expand Down

0 comments on commit 3dfce75

Please sign in to comment.