sorbet-runtime 0.4.4686 → 0.4.4692
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_validation.rb +14 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7b1987de5dadacec0d1c7b8e4e966190bfb62e1
|
4
|
+
data.tar.gz: 6e689fee43e4dac616ab36ae92034f8962f128f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95675835c3abd7b8e96ed25f037022cf4b00c8be9cf9d77fb6e594116a4e7efb0874e4ae57335d880a0ad83e5f3f228df26065e57a1a2c1a1e26f06bcaef3c0d
|
7
|
+
data.tar.gz: f1e848441d6aa059d7e06488f9da0751740adf970fc8f4c408396e38e84374d3bf1952808dc17e1d482b16fd281bed15035ec03d1a0430fafe32af17dfeb7cf9
|
@@ -96,9 +96,20 @@ module T::Private::Methods::SignatureValidation
|
|
96
96
|
# Peaceful
|
97
97
|
nil
|
98
98
|
when *Modes::IMPLEMENT_MODES
|
99
|
-
|
100
|
-
|
101
|
-
|
99
|
+
if signature.method_name == :each && signature.method.owner < Enumerable
|
100
|
+
# Enumerable#each is the only method in Sorbet's RBI payload that defines an abstract method.
|
101
|
+
# Enumerable#each does not actually exist at runtime, but it is required to be implemented by
|
102
|
+
# any class which includes Enumerable. We want to declare Enumerable#each as abstract so that
|
103
|
+
# people can call it anything which implements the Enumerable interface, and so that it's a
|
104
|
+
# static error to forget to implement it.
|
105
|
+
#
|
106
|
+
# This is a one-off hack, and we should think carefully before adding more methods here.
|
107
|
+
nil
|
108
|
+
else
|
109
|
+
raise "You marked `#{signature.method_name}` as #{pretty_mode(signature)}, but it doesn't match up with a corresponding abstract method.\n" \
|
110
|
+
" Either check for typos and for missing includes or super classes to make the parent method shows up\n" \
|
111
|
+
" ... or remove #{pretty_mode(signature)} here: #{method_loc_str(signature.method)}\n"
|
112
|
+
end
|
102
113
|
else
|
103
114
|
raise "Unexpected mode: #{signature.mode}. Please report to #dev-productivity."
|
104
115
|
end
|
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.4.
|
4
|
+
version: 0.4.4692
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|