sorbet-runtime 0.4.4686 → 0.4.4692

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1eaa5524163c82c8892d2171dd124f11f8a2e60b
4
- data.tar.gz: '09f6336c795d353ef8dcf2c33eb1d9f092f62b1c'
3
+ metadata.gz: a7b1987de5dadacec0d1c7b8e4e966190bfb62e1
4
+ data.tar.gz: 6e689fee43e4dac616ab36ae92034f8962f128f0
5
5
  SHA512:
6
- metadata.gz: 036f25db9097b0f8ff71b1fa35932a6c8c3db2147ee3d7d3470b35ae549bcadba7939ec94fd87c0742214b207be8c5b01a60f9fd2158cc8b0fef567509a1523b
7
- data.tar.gz: fa1f3cba6ab33115ed8e06ef335e86db97a3d5c5a3206b22849e0cf5d3f96a9ff1c9aa72ebcbc403d4dc44b5ad0f67e893332d1f5747cc9f757bd3eb24030b44
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
- raise "You marked `#{signature.method_name}` as #{pretty_mode(signature)}, but it doesn't match up with a corresponding abstract method.\n" \
100
- " Either check for typos and for missing includes or super classes to make the parent method shows up\n" \
101
- " ... or remove #{pretty_mode(signature)} here: #{method_loc_str(signature.method)}\n"
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.4686
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-27 00:00:00.000000000 Z
11
+ date: 2019-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest