mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
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:
commit
5075f943ae
@ -128,15 +128,15 @@ GEM
|
|||||||
simplecov_json_formatter (0.1.4)
|
simplecov_json_formatter (0.1.4)
|
||||||
simpleidn (0.2.1)
|
simpleidn (0.2.1)
|
||||||
unf (~> 0.1.4)
|
unf (~> 0.1.4)
|
||||||
sorbet (0.5.11276)
|
sorbet (0.5.11284)
|
||||||
sorbet-static (= 0.5.11276)
|
sorbet-static (= 0.5.11284)
|
||||||
sorbet-runtime (0.5.11276)
|
sorbet-runtime (0.5.11284)
|
||||||
sorbet-static (0.5.11276-aarch64-linux)
|
sorbet-static (0.5.11284-aarch64-linux)
|
||||||
sorbet-static (0.5.11276-universal-darwin)
|
sorbet-static (0.5.11284-universal-darwin)
|
||||||
sorbet-static (0.5.11276-x86_64-linux)
|
sorbet-static (0.5.11284-x86_64-linux)
|
||||||
sorbet-static-and-runtime (0.5.11276)
|
sorbet-static-and-runtime (0.5.11284)
|
||||||
sorbet (= 0.5.11276)
|
sorbet (= 0.5.11284)
|
||||||
sorbet-runtime (= 0.5.11276)
|
sorbet-runtime (= 0.5.11284)
|
||||||
spoom (1.2.4)
|
spoom (1.2.4)
|
||||||
erubi (>= 1.10.0)
|
erubi (>= 1.10.0)
|
||||||
sorbet-static-and-runtime (>= 0.5.10187)
|
sorbet-static-and-runtime (>= 0.5.10187)
|
||||||
|
@ -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/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/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/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/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/patchelf-1.5.0/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/plist-3.7.1/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_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-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/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-static-0.5.11284-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-0.5.11284/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-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/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/thor-1.3.1/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/spoom-1.2.4/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/spoom-1.2.4/lib")
|
||||||
|
@ -4,20 +4,13 @@
|
|||||||
module T::NonForcingConstants
|
module T::NonForcingConstants
|
||||||
# NOTE: This method is documented on the RBI in Sorbet's payload, so that it
|
# NOTE: This method is documented on the RBI in Sorbet's payload, so that it
|
||||||
# shows up in the hover/completion documentation via LSP.
|
# 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)}
|
T::Sig::WithoutRuntime.sig {params(val: BasicObject, klass: String).returns(T::Boolean)}
|
||||||
def self.non_forcing_is_a?(val, klass, package: nil)
|
def self.non_forcing_is_a?(val, klass)
|
||||||
method_name = "T::NonForcingConstants.non_forcing_is_a?"
|
method_name = "T::NonForcingConstants.non_forcing_is_a?"
|
||||||
if klass.empty?
|
if klass.empty?
|
||||||
raise ArgumentError.new("The string given to `#{method_name}` must not be empty")
|
raise ArgumentError.new("The string given to `#{method_name}` must not be empty")
|
||||||
end
|
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_klass = T.let(nil, T.nilable(Module))
|
||||||
current_prefix = T.let(nil, T.nilable(String))
|
current_prefix = T.let(nil, T.nilable(String))
|
||||||
|
|
||||||
@ -25,10 +18,7 @@ module T::NonForcingConstants
|
|||||||
parts.each do |part|
|
parts.each do |part|
|
||||||
if current_klass.nil?
|
if current_klass.nil?
|
||||||
# First iteration
|
# First iteration
|
||||||
if part != "" && package.nil?
|
if part != ""
|
||||||
# if we've supplied a package, we're probably running in
|
|
||||||
# package mode, which means absolute references are
|
|
||||||
# meaningless
|
|
||||||
raise ArgumentError.new("The string given to `#{method_name}` must be an absolute constant reference that starts with `::`")
|
raise ArgumentError.new("The string given to `#{method_name}` must be an absolute constant reference that starts with `::`")
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -37,7 +27,7 @@ module T::NonForcingConstants
|
|||||||
|
|
||||||
# if this had a :: prefix, then there's no more loading to
|
# if this had a :: prefix, then there's no more loading to
|
||||||
# do---skip to the next one
|
# do---skip to the next one
|
||||||
next if part == ""
|
next
|
||||||
end
|
end
|
||||||
|
|
||||||
if current_klass.autoload?(part)
|
if current_klass.autoload?(part)
|
Loading…
x
Reference in New Issue
Block a user