brew vendor-gems: commit updates.

This commit is contained in:
BrewTestBot 2024-02-11 15:27:59 +00:00
parent b7cd5072a9
commit 593e913ea0
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
89 changed files with 42 additions and 24 deletions

View File

@ -165,6 +165,8 @@ GEM
yard (>= 0.9)
PLATFORMS
aarch64-linux
arm-linux
arm64-darwin
x86_64-darwin
x86_64-linux

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.11237/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-runtime-0.5.11247/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.4.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.11237-universal-darwin/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-0.5.11237/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-static-and-runtime-0.5.11237/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-static-0.5.11247-universal-darwin/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-0.5.11247/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-static-and-runtime-0.5.11247/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.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/spoom-1.2.4/lib")

View File

@ -38,7 +38,7 @@ if defined? ::RSpec::Mocks
module MethodDoubleExtensions
def initialize(object, method_name, proxy)
if ::Kernel.instance_method(:respond_to?).bind(object).call(method_name, true)
if ::Kernel.instance_method(:respond_to?).bind(object).call(method_name, true) # rubocop:disable Performance/BindCall
method = ::RSpec::Support.method_handle_for(object, method_name)
T::Private::Methods.maybe_run_sig_block_for_method(method)
end

View File

@ -451,7 +451,7 @@ module T::Configuration
@default_module_name_mangler = if T::Configuration::AT_LEAST_RUBY_2_7
->(type) {MODULE_NAME.bind_call(type)}
else
->(type) {MODULE_NAME.bind(type).call}
->(type) {MODULE_NAME.bind(type).call} # rubocop:disable Performance/BindCall
end
@module_name_mangler = nil

View File

@ -273,7 +273,7 @@ module T::Private::Methods
elsif T::Configuration::AT_LEAST_RUBY_2_7
original_method.bind_call(self, *args, &blk)
else
original_method.bind(self).call(*args, &blk)
original_method.bind(self).call(*args, &blk) # rubocop:disable Performance/BindCall
end
end
end
@ -514,7 +514,7 @@ module T::Private::Methods
if T::Configuration::AT_LEAST_RUBY_2_7
old_included.bind_call(self, arg)
else
old_included.bind(self).call(arg)
old_included.bind(self).call(arg) # rubocop:disable Performance/BindCall
end
::T::Private::Methods._hook_impl(arg, false, self)
end
@ -522,7 +522,7 @@ module T::Private::Methods
if T::Configuration::AT_LEAST_RUBY_2_7
old_extended.bind_call(self, arg)
else
old_extended.bind(self).call(arg)
old_extended.bind(self).call(arg) # rubocop:disable Performance/BindCall
end
::T::Private::Methods._hook_impl(arg, true, self)
end
@ -530,7 +530,7 @@ module T::Private::Methods
if T::Configuration::AT_LEAST_RUBY_2_7
old_inherited.bind_call(self, arg)
else
old_inherited.bind(self).call(arg)
old_inherited.bind(self).call(arg) # rubocop:disable Performance/BindCall
end
::T::Private::Methods._hook_impl(arg, false, self)
end

View File

@ -73,8 +73,7 @@ class T::Private::Methods::Signature
param_names = parameters.map {|_, name| name}
missing_names = param_names - raw_arg_types.keys
raise "The declaration for `#{method.name}` is missing parameter(s): #{missing_names.join(', ')}"
elsif parameters.length == raw_arg_types.size
else
elsif parameters.length != raw_arg_types.size
param_names = parameters.map {|_, name| name}
has_extra_names = parameters.count {|_, name| raw_arg_types.key?(name)} < raw_arg_types.size
if has_extra_names

View File

@ -59,10 +59,9 @@ module T::Private::Methods::SignatureValidation
# `{ new(): AbstractClass }`. We may want to consider building some
# analogue to `T.class_of` in the future that works like this `{new():
# ...}` type.
if signature.method_name == :initialize && signature.method.owner.is_a?(Class)
if signature.mode == Modes.standard
return
end
if signature.method_name == :initialize && signature.method.owner.is_a?(Class) &&
signature.mode == Modes.standard
return
end
super_method = signature.method.super_method

View File

@ -117,7 +117,9 @@ module T::Props
def eagerly_define_lazy_methods!
return if lazily_defined_methods.empty?
# rubocop:disable Style/StringConcatenation
source = "# frozen_string_literal: true\n" + lazily_defined_methods.values.map(&:call).map(&:to_s).join("\n\n")
# rubocop:enable Style/StringConcatenation
cls = decorated_class
cls.class_eval(source)

View File

@ -137,7 +137,10 @@ module T::Props
when ApplyPrimitiveDefault
literal = default.default
case literal
when String, Integer, Symbol, Float, TrueClass, FalseClass, NilClass
# `Float` is intentionally left out here because `.inspect` does not produce the correct code
# representation for non-finite values like `Float::INFINITY` and `Float::NAN` and it's not totally
# clear that it won't cause issues with floating point precision.
when String, Integer, Symbol, TrueClass, FalseClass, NilClass
literal.inspect
else
"self.class.decorator.props_with_defaults.fetch(#{prop.inspect}).default"

View File

@ -264,7 +264,13 @@ module T::Props::Serializable::DecoratorMethods
line_label = error.backtrace.find {|l| l.end_with?("in `#{generated_method}'")}
return unless line_label
line_num = line_label.split(':')[1]&.to_i
line_num = if line_label.start_with?("(eval)")
# (eval):13:in `__t_props_generated_serialize'
line_label.split(':')[1]&.to_i
else
# (eval at /Users/jez/stripe/sorbet/gems/sorbet-runtime/lib/types/props/has_lazily_specialized_methods.rb:65):13:in `__t_props_generated_serialize'
line_label.split(':')[2]&.to_i
end
return unless line_num
source_lines = self.send(generate_source_method).split("\n")

View File

@ -14,9 +14,9 @@ module T::Types
end
def arg_types
@arg_types ||= @inner_arg_types.map do |key, raw_type|
[key, T::Utils.coerce(raw_type)]
end.to_h
@arg_types ||= @inner_arg_types.transform_values do |raw_type|
T::Utils.coerce(raw_type)
end
end
def returns

View File

@ -23,7 +23,12 @@ module T::Types
#
# `name` isn't normally a hot path for types, but it is used in initializing a T::Types::Union,
# and so in `T.nilable`, and so in runtime constructions like `x = T.let(nil, T.nilable(Integer))`.
#
# Care more about back compat than we do about performance here.
# Once 2.6 is well in the rear view mirror, we can replace this.
# rubocop:disable Performance/BindCall
@name ||= (NAME_METHOD.bind(@raw_type).call || @raw_type.name).freeze
# rubocop:enable Performance/BindCall
end
# overrides Base

View File

@ -172,7 +172,7 @@ module T::Types
if T::Configuration::AT_LEAST_RUBY_2_7
Object.instance_method(:class).bind_call(obj)
else
Object.instance_method(:class).bind(obj).call
Object.instance_method(:class).bind(obj).call # rubocop:disable Performance/BindCall
end
end
end

View File

@ -4,6 +4,7 @@
module T::Utils
module Private
def self.coerce_and_check_module_types(val, check_val, check_module_type)
# rubocop:disable Style/CaseLikeIf
if val.is_a?(T::Types::Base)
if val.is_a?(T::Private::Types::TypeAlias)
val.aliased_type
@ -31,6 +32,7 @@ module T::Utils
raise "Invalid value for type constraint. Must be an #{T::Types::Base}, a " \
"class/module, or an array. Got a `#{val.class}`."
end
# rubocop:enable Style/CaseLikeIf
end
end
@ -173,7 +175,7 @@ module T::Utils
def self.get_type_info(prop_type)
if prop_type.is_a?(T::Types::Union)
non_nilable_type = prop_type.unwrap_nilable
if non_nilable_type&.is_a?(T::Types::Simple)
if non_nilable_type.is_a?(T::Types::Simple)
non_nilable_type = non_nilable_type.raw_type
end
TypeInfo.new(true, non_nilable_type)
@ -188,7 +190,7 @@ module T::Utils
def self.get_underlying_type(prop_type)
if prop_type.is_a?(T::Types::Union)
non_nilable_type = prop_type.unwrap_nilable
if non_nilable_type&.is_a?(T::Types::Simple)
if non_nilable_type.is_a?(T::Types::Simple)
non_nilable_type = non_nilable_type.raw_type
end
non_nilable_type || prop_type