brew vendor-gems: commit updates.
This commit is contained in:
parent
0f55e04421
commit
99f35794ad
@ -160,6 +160,7 @@ GEM
|
||||
|
||||
PLATFORMS
|
||||
aarch64-linux
|
||||
arm-linux
|
||||
arm64-darwin
|
||||
x86_64-darwin
|
||||
x86_64-linux
|
||||
|
||||
@ -71,7 +71,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.8.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/parser-3.3.2.0/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.11422/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-runtime-0.5.11428/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/parlour-9.0.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/patchelf-1.5.1/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/plist-3.7.1/lib")
|
||||
@ -108,9 +108,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.11422-universal-darwin/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-0.5.11422/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-static-and-runtime-0.5.11422/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-static-0.5.11428-universal-darwin/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-0.5.11428/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-static-and-runtime-0.5.11428/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.3.2/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/stackprof-0.2.26")
|
||||
|
||||
@ -110,7 +110,7 @@ module T::Props
|
||||
#
|
||||
# @return [void]
|
||||
sig {params(name: Symbol, cls: T.untyped, rules: T.untyped).void}
|
||||
def prop(name, cls, rules={})
|
||||
def prop(name, cls, **rules)
|
||||
cls = T::Utils.coerce(cls) if !cls.is_a?(Module)
|
||||
decorator.prop_defined(name, cls, rules)
|
||||
end
|
||||
@ -132,16 +132,16 @@ module T::Props
|
||||
end
|
||||
|
||||
# Shorthand helper to define a `prop` with `immutable => true`
|
||||
sig {params(name: Symbol, cls_or_args: T.untyped, args: T::Hash[Symbol, T.untyped]).void}
|
||||
def const(name, cls_or_args, args={})
|
||||
sig {params(name: Symbol, cls_or_args: T.untyped, args: T.untyped).void}
|
||||
def const(name, cls_or_args, **args)
|
||||
if (cls_or_args.is_a?(Hash) && cls_or_args.key?(:immutable)) || args.key?(:immutable)
|
||||
Kernel.raise ArgumentError.new("Cannot pass 'immutable' argument when using 'const' keyword to define a prop")
|
||||
end
|
||||
|
||||
if cls_or_args.is_a?(Hash)
|
||||
self.prop(name, cls_or_args.merge(immutable: true))
|
||||
self.prop(name, **cls_or_args.merge(immutable: true))
|
||||
else
|
||||
self.prop(name, cls_or_args, args.merge(immutable: true))
|
||||
self.prop(name, cls_or_args, **args.merge(immutable: true))
|
||||
end
|
||||
end
|
||||
|
||||
@ -39,7 +39,7 @@ class T::ImmutableStruct < T::InexactStruct
|
||||
|
||||
# Matches the signature in Props, but raises since this is an immutable struct and only const is allowed
|
||||
sig {params(name: Symbol, cls: T.untyped, rules: T.untyped).void}
|
||||
def self.prop(name, cls, rules={})
|
||||
def self.prop(name, cls, **rules)
|
||||
return super if (cls.is_a?(Hash) && cls[:immutable]) || rules[:immutable]
|
||||
|
||||
raise "Cannot use `prop` in #{self.name} because it is an immutable struct. Use `const` instead"
|
||||
Loading…
x
Reference in New Issue
Block a user