sorbet-runtime 0.5.10625 → 0.5.10627
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/types/private/methods/_methods.rb +6 -1
- 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: 703752c01c6f0cdac76ba55484a2f4b51be4420287571ff41e6f9a80484d8cd5
|
4
|
+
data.tar.gz: 85b439ad47293c164be0473a4fe2665c6d14d251883f98ceea5143aaf0aba62c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be5436c4fdf4bee8dcf62b32fe1ae7bdbda0059d896bed661187ae2d803907e37b0815d0a7bb07ff4cfaea3fbf21a3f4d6a051f9c695f2b4a29a244f5039466d
|
7
|
+
data.tar.gz: 73224991944b09bd4a67392b6b2b595dbb72807254f32e3e6cfbf04744be9eb1ea30b27e60b7498287dabdb911c840af01738bddb46ea547e4d8b9647df55d0f
|
@@ -117,6 +117,11 @@ module T::Private::Methods
|
|
117
117
|
@signatures_by_method[key]
|
118
118
|
end
|
119
119
|
|
120
|
+
# Fetch the directory name of the file that defines the `T::Private` constant and
|
121
|
+
# add a trailing slash to allow us to match it as a directory prefix.
|
122
|
+
SORBET_RUNTIME_LIB_PATH = File.dirname(T.const_source_location(:Private).first) + File::SEPARATOR
|
123
|
+
private_constant :SORBET_RUNTIME_LIB_PATH
|
124
|
+
|
120
125
|
# when target includes a module with instance methods source_method_names, ensure there is zero intersection between
|
121
126
|
# the final instance methods of target and source_method_names. so, for every m in source_method_names, check if there
|
122
127
|
# is already a method defined on one of target_ancestors with the same name that is final.
|
@@ -158,7 +163,7 @@ module T::Private::Methods
|
|
158
163
|
|
159
164
|
definition_file, definition_line = T::Private::Methods.signature_for_method(ancestor.instance_method(method_name)).method.source_location
|
160
165
|
is_redefined = target == ancestor
|
161
|
-
caller_loc = caller_locations&.find {|l| !l.to_s.
|
166
|
+
caller_loc = caller_locations&.find {|l| !l.to_s.start_with?(SORBET_RUNTIME_LIB_PATH)}
|
162
167
|
extra_info = "\n"
|
163
168
|
if caller_loc
|
164
169
|
extra_info = (is_redefined ? "Redefined" : "Overridden") + " here: #{caller_loc.path}:#{caller_loc.lineno}\n"
|
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.10627
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|