sorbet-runtime 0.5.10941 → 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: ee54735d23f8ea6f624a42fb9f5c265a23d020f42c095817c913ff66e8b40ce8
4
- data.tar.gz: a1d59945879ac569cc45f6d796e4cfa8e9ad7fbfbdb5e12beff5631ac1b31fc2
3
+ metadata.gz: a0f91e65ae1b0e498c5df805b8f45638368257bba5b57c83153d73468c93c902
4
+ data.tar.gz: c183a3eb926674965fb519fe6fd03450151134fd14e494d3cf9cbdb2214fefb3
5
5
  SHA512:
6
- metadata.gz: e64ee81d184a7e85ad5a36d804c227c4c17d5a645d86145f820825ec753a91709079b41d3276b9b1be63c0f758501e31335f9cb2df93d9b0c687bd1cc6cc26f5
7
- data.tar.gz: 6b954a2044f7b16b8e516977e154fd9856abd4625ff13d1b5aec52a55f448eef97e3f771e28265096e6b6d1f147b4bffac55c7fb973d987e6512aecf0433d3ce
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.10941
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-01 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