sorbet-runtime 0.5.11391 → 0.5.11394

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: abde4d5b5a8a843b5bd3d32cebf3c41e54538123db43179f0c2687f97aa6f177
4
- data.tar.gz: cfb4d36682ef59617d574a965b86e30ec753e1a4197c708f4ce9450cd3882085
3
+ metadata.gz: fa7441c9ec6cb790292c47404a6fea7495375c35c5a6951d37863f59ed118735
4
+ data.tar.gz: 752183e17a6c8d1ffecb4dc461efdf76a246d4ce1b655366143081880ab9eb26
5
5
  SHA512:
6
- metadata.gz: 948dc6b61e8aa1552068e8e8587481ea2f708104aedac364735cb05bf29d608140258bb06f24d2cd0fee766e3302184d010e1861ba543358ce7e67ec447b24af
7
- data.tar.gz: e912d2a0513901458bd80099f0650862cba12fb02eb5adb55e4bea81f3af3f19f81e2fc91ae8cf0e1ebb58bf1641acbd5f4fe0a2f74f0410f1153c31e595d236
6
+ metadata.gz: 3c348a725fe897b96c52cf6afbcedc3b3dc120dd265ed3cd2611e6f21b38dd31bed11e6e7676aa0197d533163b340f9d003d066d08167e4d8cfd9c2a68e3eb64
7
+ data.tar.gz: f3996445c17e8d86e08673f0396162163bd00a22a83edad05f9465543d153607facba41dcfea29b9dd25ada62e21a975342601c266e0b44a6744351cf88031b5
@@ -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.11394
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-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest