sorbet-runtime 0.5.11391 → 0.5.11406

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: abde4d5b5a8a843b5bd3d32cebf3c41e54538123db43179f0c2687f97aa6f177
4
- data.tar.gz: cfb4d36682ef59617d574a965b86e30ec753e1a4197c708f4ce9450cd3882085
3
+ metadata.gz: 00b80f8174dfb5d8541843b2f5e26ef480687fbc479022f37b9e339066deb616
4
+ data.tar.gz: eb87d25942940a8441332769719be62711e8260dad5b6623ccd0234ae0634fe3
5
5
  SHA512:
6
- metadata.gz: 948dc6b61e8aa1552068e8e8587481ea2f708104aedac364735cb05bf29d608140258bb06f24d2cd0fee766e3302184d010e1861ba543358ce7e67ec447b24af
7
- data.tar.gz: e912d2a0513901458bd80099f0650862cba12fb02eb5adb55e4bea81f3af3f19f81e2fc91ae8cf0e1ebb58bf1641acbd5f4fe0a2f74f0410f1153c31e595d236
6
+ metadata.gz: c1ea0950562b01ccc73aed17582a014cbcd232eb9a9ff9bf102a08d24f7dce68906d520f256996920de685f10ff5ed0cec0708f73d4806b95491b72a5f42de23
7
+ data.tar.gz: 0200676c69ff14fdb96ad5ef03bed61e845ec562459b95380b119ad1d590ba80e44f34261934ecd748981b92ee0e9cda936a9d5a7dcbc892edefbeb43f4d7320
@@ -291,11 +291,21 @@ module T::Private::Methods::CallValidation
291
291
 
292
292
  def self.report_error(method_sig, error_message, kind, name, type, value, caller_offset: 0)
293
293
  caller_loc = T.must(caller_locations(3 + caller_offset, 1))[0]
294
- definition_file, definition_line = method_sig.method.source_location
294
+ method = method_sig.method
295
+ definition_file, definition_line = method.source_location
296
+
297
+ owner = method.owner
298
+ pretty_method_name =
299
+ if owner.singleton_class? && owner.respond_to?(:attached_object)
300
+ # attached_object is new in Ruby 3.2
301
+ "#{owner.attached_object}.#{method.name}"
302
+ else
303
+ "#{owner}##{method.name}"
304
+ end
295
305
 
296
306
  pretty_message = "#{kind}#{name ? " '#{name}'" : ''}: #{error_message}\n" \
297
307
  "Caller: #{caller_loc.path}:#{caller_loc.lineno}\n" \
298
- "Definition: #{definition_file}:#{definition_line}"
308
+ "Definition: #{definition_file}:#{definition_line} (#{pretty_method_name})"
299
309
 
300
310
  T::Configuration.call_validation_error_handler(
301
311
  method_sig,
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.11391
4
+ version: 0.5.11406
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-24 00:00:00.000000000 Z
11
+ date: 2024-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest