Merge pull request #16795 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-static-and-runtime-and-sorbet-runtime-0.5.11284

This commit is contained in:
Patrick Linnane 2024-03-02 10:01:01 -08:00 committed by GitHub
commit 5075f943ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
90 changed files with 17 additions and 27 deletions

View File

@ -128,15 +128,15 @@ GEM
simplecov_json_formatter (0.1.4)
simpleidn (0.2.1)
unf (~> 0.1.4)
sorbet (0.5.11276)
sorbet-static (= 0.5.11276)
sorbet-runtime (0.5.11276)
sorbet-static (0.5.11276-aarch64-linux)
sorbet-static (0.5.11276-universal-darwin)
sorbet-static (0.5.11276-x86_64-linux)
sorbet-static-and-runtime (0.5.11276)
sorbet (= 0.5.11276)
sorbet-runtime (= 0.5.11276)
sorbet (0.5.11284)
sorbet-static (= 0.5.11284)
sorbet-runtime (0.5.11284)
sorbet-static (0.5.11284-aarch64-linux)
sorbet-static (0.5.11284-universal-darwin)
sorbet-static (0.5.11284-x86_64-linux)
sorbet-static-and-runtime (0.5.11284)
sorbet (= 0.5.11284)
sorbet-runtime (= 0.5.11284)
spoom (1.2.4)
erubi (>= 1.10.0)
sorbet-static-and-runtime (>= 0.5.10187)

View File

@ -66,7 +66,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/racc-1.7.3/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/parser-3.3.0.5/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rainbow-3.1.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-runtime-0.5.11276/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-runtime-0.5.11284/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/parlour-8.1.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/patchelf-1.5.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/plist-3.7.1/lib")
@ -106,9 +106,9 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/simplecov_json_formatter-0.1.4/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/simplecov-0.22.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/simplecov-cobertura-2.1.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-static-0.5.11276-universal-darwin/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-0.5.11276/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-static-and-runtime-0.5.11276/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-static-0.5.11284-universal-darwin/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-0.5.11284/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-static-and-runtime-0.5.11284/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/syntax_tree-6.2.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/thor-1.3.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/spoom-1.2.4/lib")

View File

@ -4,20 +4,13 @@
module T::NonForcingConstants
# NOTE: This method is documented on the RBI in Sorbet's payload, so that it
# shows up in the hover/completion documentation via LSP.
T::Sig::WithoutRuntime.sig {params(val: BasicObject, klass: String, package: T.nilable(String)).returns(T::Boolean)}
def self.non_forcing_is_a?(val, klass, package: nil)
T::Sig::WithoutRuntime.sig {params(val: BasicObject, klass: String).returns(T::Boolean)}
def self.non_forcing_is_a?(val, klass)
method_name = "T::NonForcingConstants.non_forcing_is_a?"
if klass.empty?
raise ArgumentError.new("The string given to `#{method_name}` must not be empty")
end
# We don't treat packages differently at runtime, but the static
# type-checker still needs to have the package and constant
# separated out. This just re-assembles the string as needed
if !package.nil?
klass = "::#{package}::#{klass}"
end
current_klass = T.let(nil, T.nilable(Module))
current_prefix = T.let(nil, T.nilable(String))
@ -25,10 +18,7 @@ module T::NonForcingConstants
parts.each do |part|
if current_klass.nil?
# First iteration
if part != "" && package.nil?
# if we've supplied a package, we're probably running in
# package mode, which means absolute references are
# meaningless
if part != ""
raise ArgumentError.new("The string given to `#{method_name}` must be an absolute constant reference that starts with `::`")
end
@ -37,7 +27,7 @@ module T::NonForcingConstants
# if this had a :: prefix, then there's no more loading to
# do---skip to the next one
next if part == ""
next
end
if current_klass.autoload?(part)