sorbet-runtime 0.5.11708 → 0.5.11942

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: 87a029cc24743eb2ad5dee4c2bf7916a348d2d4259117194f3c9e66923bafde7
4
- data.tar.gz: fcd6a50285b656efacf1b3b1ff46f0b975056ca8c90fd7bdf208da14ac500522
3
+ metadata.gz: 13c9e317a9bcfe5e8cf34731c82435927abd0d695ced70df19b5a88bce539668
4
+ data.tar.gz: e34e34ebf98782e858917d212856cb718cbeb0ad1391246e94dbee5f9371c47a
5
5
  SHA512:
6
- metadata.gz: 821b9c49cd79af4787fe7bfac024ce22211922a7f3296e6e65d04522577ce210460a03846e54309905d6f6c03e668b98f9e61bc8e747804bc1fe50255a4f46be
7
- data.tar.gz: 9ab5de64b7139f8fb9b1af473685655a704a49f5134e1c542b96e4e6fd2b392501b61d9f914504a9d5b861ef51b2d4b5febf2ec3e650487d07394801a51cc492
6
+ metadata.gz: 7f2c4ec9504ef94b141bfa1b098ee03a87a56b825d4458aa72c5755b266ae17a16c81d04a2c56b2fcee8e2c8a7399b98e3d009f949037cc9affb9b0eb3eaca4d
7
+ data.tar.gz: a0632346c4aeb277776e84f9841c1eea96a0add8917b2037c4ad3ba257c90a12d9a37a29210d89cbc516af65d5ea0ea80c8aeefead0f3eeea05937327b2ec373
@@ -46,21 +46,25 @@ module T::Private::Methods::CallValidation
46
46
  end
47
47
 
48
48
  def self.create_abstract_wrapper(mod, method_sig, original_method, original_visibility)
49
- mod.module_eval(<<~METHOD, __FILE__, __LINE__ + 1)
50
- #{original_visibility}
51
-
52
- def #{method_sig.method_name}(...)
53
- # We allow abstract methods to be implemented by things further down the ancestor chain.
54
- # So, if a super method exists, call it.
55
- if defined?(super)
56
- super
57
- else
58
- raise NotImplementedError.new(
59
- "The method `#{method_sig.method_name}` on #{mod} is declared as `abstract`. It does not have an implementation."
60
- )
61
- end
49
+ T::Configuration.without_ruby_warnings do
50
+ T::Private::DeclState.current.without_on_method_added do
51
+ mod.module_eval(<<~METHOD, __FILE__, __LINE__ + 1)
52
+ #{original_visibility}
53
+
54
+ def #{method_sig.method_name}(...)
55
+ # We allow abstract methods to be implemented by things further down the ancestor chain.
56
+ # So, if a super method exists, call it.
57
+ if defined?(super)
58
+ super
59
+ else
60
+ raise NotImplementedError.new(
61
+ "The method `#{method_sig.method_name}` on #{mod} is declared as `abstract`. It does not have an implementation."
62
+ )
63
+ end
64
+ end
65
+ METHOD
62
66
  end
63
- METHOD
67
+ end
64
68
  end
65
69
 
66
70
  def self.create_validator_method(mod, original_method, method_sig, original_visibility)
@@ -22,14 +22,14 @@ module T::Private::Sealed
22
22
  module NoIncludeExtend
23
23
  def included(child)
24
24
  super
25
- caller_loc = T::Private::CallerUtils.find_caller {|loc| !loc.to_s.match(/in `included'$/)}
25
+ caller_loc = T::Private::CallerUtils.find_caller {|loc| loc.base_label != 'included'}
26
26
  T::Private::Sealed.validate_inheritance(caller_loc, self, child, 'included')
27
27
  @sorbet_sealed_module_all_subclasses << child
28
28
  end
29
29
 
30
30
  def extended(child)
31
31
  super
32
- caller_loc = T::Private::CallerUtils.find_caller {|loc| !loc.to_s.match(/in `extended'$/)}
32
+ caller_loc = T::Private::CallerUtils.find_caller {|loc| loc.base_label != 'extended'}
33
33
  T::Private::Sealed.validate_inheritance(caller_loc, self, child, 'extended')
34
34
  @sorbet_sealed_module_all_subclasses << child
35
35
  end
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.11708
4
+ version: 0.5.11942
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-21 00:00:00.000000000 Z
11
+ date: 2025-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest