sorbet-runtime 0.6.13632 → 0.6.13635

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
  SHA256:
3
- metadata.gz: 4257e8ca00e1add499a378928571bea2674281fc10b65796b343f1ab934ad360
4
- data.tar.gz: f3960d20e4b93c67c085b8745f5c29560296c741930f3d7f6207a0bfae394260
3
+ metadata.gz: eefe1ddc8c9547b0d83f954f99257f317b083a54aeaf51bc36e7aa26b2f35f74
4
+ data.tar.gz: fb88d8b6d8d544c49d1a6c505f4d914e3397eb8589da9e7b45990c1d99867f4e
5
5
  SHA512:
6
- metadata.gz: b1e44f1984ffc3e8b309834a19491128133f0956842ce6372acb4caa2b2b669f7e1669f5d8213a8d614f1c900015b0239d5c0d2e9f87e426dad796a1155b9814
7
- data.tar.gz: f97d4f469a9ef194c4d169c77eb3653c65ce6990c45dfabeb3b1be0b5247e48c942e75c165ba341d97307e1924567bc62bf9099ac76ac4724d94b5c667ecbb5a
6
+ metadata.gz: f2b0fe69b707100a6daaeb2dee86598436f38fcc2d78f373acee688adacbbe4a007ecacb7facb2cec61c1007557d6435700e580c1d3534c9857b4ac5e7734323
7
+ data.tar.gz: e43447bc650100a300abfaf2f846ba8347b209d61174023c87a5335f37d5d6c107d3d59b7d71da44b976818e4cabf6d4744689ba047311fa11b084d3c434a650
@@ -232,7 +232,9 @@ module T::Private::Methods::SignatureValidation
232
232
  end
233
233
  end
234
234
 
235
- if super_signature.block_name && !signature.block_name
235
+ # block_type is set exactly when the method declares a block param, and
236
+ # unlike block_name, reading it doesn't rebuild `method.parameters`.
237
+ if !super_signature.block_type.nil? && signature.block_type.nil?
236
238
  raise "Your definition of `#{method_name}` must accept a block parameter to be compatible " \
237
239
  "with the method it #{mode_verb}: " \
238
240
  "#{base_override_loc_str(signature, super_signature)}"
@@ -10,12 +10,15 @@ class T::Private::Types::SimplePairUnion < T::Types::Union
10
10
  # @param type_a [T::Types::Simple]
11
11
  # @param type_b [T::Types::Simple]
12
12
  def initialize(type_a, type_b)
13
+ @raw_a = type_a.raw_type
14
+ @raw_b = type_b.raw_type
15
+
16
+ # Only raise after setting every field. `union_of_types` rescues this and
17
+ # drops the object, but `ObjectSpace.each_object` still yields it until the
18
+ # next GC, and `T::Utils.build_all_types` must be able to build it.
13
19
  if type_a == type_b
14
20
  raise DuplicateType.new("#{type_a} == #{type_b}")
15
21
  end
16
-
17
- @raw_a = type_a.raw_type
18
- @raw_b = type_b.raw_type
19
22
  end
20
23
 
21
24
  # @override Union
@@ -16,6 +16,12 @@ module T::Types
16
16
  else
17
17
  values.to_set
18
18
  end
19
+ rescue StandardError
20
+ # The conversion can raise. A caller can rescue that and drop this
21
+ # object, but `ObjectSpace.each_object` still yields it until the next
22
+ # GC, and `T::Utils.build_all_types` must be able to build it.
23
+ @values = Set[]
24
+ raise
19
25
  end
20
26
 
21
27
  def build_type
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorbet-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.13632
4
+ version: 0.6.13635
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe