diff --git a/Library/Homebrew/extend/os/linux/cleanup.rb b/Library/Homebrew/extend/os/linux/cleanup.rb index a9443a3d59..b6cd428fe8 100644 --- a/Library/Homebrew/extend/os/linux/cleanup.rb +++ b/Library/Homebrew/extend/os/linux/cleanup.rb @@ -5,6 +5,7 @@ module Homebrew class Cleanup undef use_system_ruby? + sig { returns(T::Boolean) } def use_system_ruby? return false if Homebrew::EnvConfig.force_vendor_ruby? diff --git a/Library/Homebrew/extend/os/mac/cleanup.rb b/Library/Homebrew/extend/os/mac/cleanup.rb index 6ede0bcd7a..3565e162b4 100644 --- a/Library/Homebrew/extend/os/mac/cleanup.rb +++ b/Library/Homebrew/extend/os/mac/cleanup.rb @@ -1,10 +1,11 @@ -# typed: true # rubocop:disable Sorbet/StrictSigil +# typed: strict # frozen_string_literal: true module Homebrew class Cleanup undef use_system_ruby? + sig { returns(T::Boolean) } def use_system_ruby? return false if Homebrew::EnvConfig.force_vendor_ruby? diff --git a/Library/Homebrew/extend/os/mac/linkage_checker.rb b/Library/Homebrew/extend/os/mac/linkage_checker.rb index 6c69fd291b..b48d2b90d3 100644 --- a/Library/Homebrew/extend/os/mac/linkage_checker.rb +++ b/Library/Homebrew/extend/os/mac/linkage_checker.rb @@ -6,6 +6,7 @@ class LinkageChecker private + sig { returns(T::Boolean) } def system_libraries_exist_in_cache? # In macOS Big Sur and later, system libraries do not exist on-disk and instead exist in a cache. MacOS.version >= :big_sur diff --git a/Library/Homebrew/sorbet/tapioca/compilers/args.rb b/Library/Homebrew/sorbet/tapioca/compilers/args.rb index 947527d5a5..b59ecaff3d 100644 --- a/Library/Homebrew/sorbet/tapioca/compilers/args.rb +++ b/Library/Homebrew/sorbet/tapioca/compilers/args.rb @@ -32,7 +32,7 @@ module Tapioca def decorate cmd = T.cast(constant, T.class_of(Homebrew::AbstractCommand)) # This is a dummy class to make the `brew` command parsable - return if cmd.name == "Homebrew::Cmd::Brew" + return if cmd == Homebrew::Cmd::Brew args_class_name = T.must(T.must(cmd.args_class).name) root.create_class(args_class_name, superclass_name: "Homebrew::CLI::Args") do |klass|