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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9dcc15a1841fb11cf89f7b2ac23928ce95bb780dd856bf8929659e457ac250b
4
- data.tar.gz: 0b12012cb14809fb91a8a2df0cf06be57f0c0f0a5ee1f4286872424fb211f00c
3
+ metadata.gz: 703752c01c6f0cdac76ba55484a2f4b51be4420287571ff41e6f9a80484d8cd5
4
+ data.tar.gz: 85b439ad47293c164be0473a4fe2665c6d14d251883f98ceea5143aaf0aba62c
5
5
  SHA512:
6
- metadata.gz: c825a12f0e5a4449dbe58430f9e179194b5efaa1a6033866b3e1b7955ff95987eade1785081d5ba7116494a191646ef192551f2e402e064f87e58b818148ee3c
7
- data.tar.gz: d84a2089b063654fcb688515277b01d93ef1b635808440971a67bcd24771fadab5485bbe90aa922a5bb9b1f4f4ea1c17d291674282c578356a0b0b17cd580e0e
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.match?(%r{sorbet-runtime[^/]*/lib/})}
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.10625
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-13 00:00:00.000000000 Z
11
+ date: 2023-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest