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 +4 -4
- data/lib/types/enum.rb +1 -1
- data/lib/types/private/methods/_methods.rb +1 -1
- data/lib/types/props/private/setter_factory.rb +1 -1
- data/lib/types/types/simple.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0f91e65ae1b0e498c5df805b8f45638368257bba5b57c83153d73468c93c902
|
4
|
+
data.tar.gz: c183a3eb926674965fb519fe6fd03450151134fd14e494d3cf9cbdb2214fefb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4e0e8d924176d843836921e5b8de7b768ec85636aaba35d05e8329225bf92854e979a8c6e8ee373de5568c2fc1f57f3a1b069197c0b6849942561f7cd16e395
|
7
|
+
data.tar.gz: c75f0f7590bc1b1e481f674e537497b69969bebeaa8866cea12994e63b62d3366dad7fbc583cdfff7c67392e76294374ef16e1946234ecc9be1ae4429211152b
|
data/lib/types/enum.rb
CHANGED
@@ -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
|
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
|
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
|
data/lib/types/types/simple.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2023-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|