sorbet-runtime 0.5.10962 → 0.5.10993

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 343eceabc1ade0afade3e40a3e1d5907e3de7a6782ee879b0ebe0caf9d113dcc
4
- data.tar.gz: ee978768e37c2227f4c38e145c7b723b3cfaa2eee8612b91d231cbf2b46c4059
3
+ metadata.gz: a0f91e65ae1b0e498c5df805b8f45638368257bba5b57c83153d73468c93c902
4
+ data.tar.gz: c183a3eb926674965fb519fe6fd03450151134fd14e494d3cf9cbdb2214fefb3
5
5
  SHA512:
6
- metadata.gz: 022ea77c6fceae0badbb5318a49c01dbb6b097a0a56cdd257371b554ab3ec3e3758fcb6dfce9eb36d5307c53a915c91711df5a76934e928769a84e7a6d12a97e
7
- data.tar.gz: 36a7ea1a9bbd0b1312359497637ff43cda4cf237e26c9bd01b7bc0142a0ef70cef25e80eb21d5fadb6ec499709808503b48a9bfce0ef6b15a8b91f0c4ec0426a
6
+ metadata.gz: a4e0e8d924176d843836921e5b8de7b768ec85636aaba35d05e8329225bf92854e979a8c6e8ee373de5568c2fc1f57f3a1b069197c0b6849942561f7cd16e395
7
+ data.tar.gz: c75f0f7590bc1b1e481f674e537497b69969bebeaa8866cea12994e63b62d3366dad7fbc583cdfff7c67392e76294374ef16e1946234ecc9be1ae4429211152b
data/lib/types/enum.rb CHANGED
@@ -357,7 +357,7 @@ class T::Enum
357
357
  @fully_initialized = true
358
358
  end
359
359
 
360
- sig {params(child_class: Module).void}
360
+ sig {params(child_class: T::Class[T.anything]).void}
361
361
  def self.inherited(child_class)
362
362
  super
363
363
 
@@ -163,7 +163,7 @@ module T::Private::Methods
163
163
 
164
164
  definition_file, definition_line = T::Private::Methods.signature_for_method(ancestor.instance_method(method_name)).method.source_location
165
165
  is_redefined = target == ancestor
166
- caller_loc = caller_locations&.find {|l| !l.to_s.start_with?(SORBET_RUNTIME_LIB_PATH)}
166
+ caller_loc = caller_locations.find {|l| !l.to_s.start_with?(SORBET_RUNTIME_LIB_PATH)}
167
167
  extra_info = "\n"
168
168
  if caller_loc
169
169
  extra_info = (is_redefined ? "Redefined" : "Overridden") + " here: #{caller_loc.path}:#{caller_loc.lineno}\n"
@@ -176,7 +176,7 @@ module T::Props
176
176
  base_message = "Can't set #{klass.name}.#{prop} to #{val.inspect} (instance of #{val.class}) - need a #{type}"
177
177
 
178
178
  pretty_message = "Parameter '#{prop}': #{base_message}\n"
179
- caller_loc = caller_locations&.find {|l| !l.to_s.include?('sorbet-runtime/lib/types/props')}
179
+ caller_loc = caller_locations.find {|l| !l.to_s.include?('sorbet-runtime/lib/types/props')}
180
180
  if caller_loc
181
181
  pretty_message += "Caller: #{caller_loc.path}:#{caller_loc.lineno}\n"
182
182
  end
@@ -32,6 +32,11 @@ module T::Types
32
32
  case other
33
33
  when Simple
34
34
  @raw_type <= other.raw_type
35
+ when TypedClass
36
+ # This case is a bit odd--we would have liked to solve this like we do
37
+ # for `T::Array` et al., but don't for backwards compatibility.
38
+ # See `type_for_module` below.
39
+ @raw_type <= other.underlying_class
35
40
  else
36
41
  false
37
42
  end
@@ -89,6 +94,9 @@ module T::Types
89
94
  elsif !Object.autoload?(:Set) && Object.const_defined?(:Set) && mod == ::Set
90
95
  T::Set[T.untyped]
91
96
  else
97
+ # ideally we would have a case mapping from ::Class -> T::Class here
98
+ # but for backwards compatibility we don't have that, and instead
99
+ # have a special case in subtype_of_single?
92
100
  Simple.new(mod)
93
101
  end
94
102
 
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.10962
4
+ version: 0.5.10993
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-12 00:00:00.000000000 Z
11
+ date: 2023-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest