From b76155c18b70ec0feafd47b461f582584c445fce Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Wed, 10 Jan 2024 12:08:34 -0800 Subject: [PATCH] Extend Module when requiring sorbet --- Library/Homebrew/extend/module.rb | 6 ------ Library/Homebrew/global.rb | 1 - Library/Homebrew/standalone/sorbet.rb | 5 +++++ 3 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 Library/Homebrew/extend/module.rb diff --git a/Library/Homebrew/extend/module.rb b/Library/Homebrew/extend/module.rb deleted file mode 100644 index ea5d1f5d4cfe98..00000000000000 --- a/Library/Homebrew/extend/module.rb +++ /dev/null @@ -1,6 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -class Module - include T::Sig -end diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 8d53a4c928c17e..38d7f5d6a7c13a 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -69,7 +69,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/module" require "extend/array" require "extend/blank" require "env_config" diff --git a/Library/Homebrew/standalone/sorbet.rb b/Library/Homebrew/standalone/sorbet.rb index 4aaa7e965ac29b..923f6e327d0c30 100644 --- a/Library/Homebrew/standalone/sorbet.rb +++ b/Library/Homebrew/standalone/sorbet.rb @@ -45,3 +45,8 @@ def sig(arg0 = nil, &blk); end T::Configuration.call_validation_error_handler = ->(signature, opts) {} T::Configuration.inline_type_error_handler = ->(error, opts) {} end + +class Module + # Allow `sig` everywhere. + include T::Sig +end