sorbet-runtime 0.5.9715 → 0.5.9741
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/types/private/methods/signature.rb +6 -0
- data/lib/types/props/decorator.rb +2 -2
- data/lib/types/types/base.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a01f8890c6857ea9aa69f2c9a399eccd48873583e4cea1dd694e846433c316bc
|
4
|
+
data.tar.gz: f633bd837a0b1d4c2b7a0e33f7ccd8e2bbcc605dad070526ec61a77d20c57bbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 836228491149083cd686f823cda7117c7b542b7c94535df5bcc5a1e858584f9a40b04f9276c007dd4ee7999962dfbe28652ea58074e15199441ae8d45bff86a0
|
7
|
+
data.tar.gz: 859ad97119e6145fb034f535bfd03502183c0790cbb991c553a4f81dd98d963bb4bd9c66ef202e424a21526bc151b8b599cfca698f8abe79026b1d36a1966ddf
|
@@ -103,6 +103,12 @@ class T::Private::Methods::Signature
|
|
103
103
|
if @arg_types.length > @req_arg_count
|
104
104
|
# Note that this is actually is supported by Ruby, but it would add complexity to
|
105
105
|
# support it here, and I'm happy to discourage its use anyway.
|
106
|
+
#
|
107
|
+
# If you are seeing this error and surprised by it, it's possible that you have
|
108
|
+
# overridden the method described in the error message. For example, Rails defines
|
109
|
+
# def self.update!(id = :all, attributes)
|
110
|
+
# on AR models. If you have also defined `self.update!` on an AR model you might
|
111
|
+
# see this error. The simplest resolution is to rename your method.
|
106
112
|
raise "Required params after optional params are not supported in method declarations. Method: #{method_desc}"
|
107
113
|
end
|
108
114
|
@arg_types << [param_name, type]
|
@@ -418,9 +418,9 @@ class T::Props::Decorator
|
|
418
418
|
else
|
419
419
|
nonnil_type = T::Utils.unwrap_nilable(type)
|
420
420
|
if nonnil_type
|
421
|
-
T.nilable(T.all(nonnil_type, T.deprecated_enum(enum)))
|
421
|
+
T.unsafe(T.nilable(T.all(nonnil_type, T.deprecated_enum(enum))))
|
422
422
|
else
|
423
|
-
T.all(type, T.deprecated_enum(enum))
|
423
|
+
T.unsafe(T.all(T.unsafe(type), T.deprecated_enum(enum)))
|
424
424
|
end
|
425
425
|
end
|
426
426
|
end
|
data/lib/types/types/base.rb
CHANGED
@@ -160,6 +160,8 @@ module T::Types
|
|
160
160
|
name.hash
|
161
161
|
end
|
162
162
|
|
163
|
+
# Type equivalence, defined by serializing the type to a string (with
|
164
|
+
# `#name`) and comparing the resulting strings for equality.
|
163
165
|
def ==(other)
|
164
166
|
(T::Utils.resolve_alias(other).class == T::Utils.resolve_alias(self).class) &&
|
165
167
|
other.name == self.name
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sorbet-runtime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.9741
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|