sorbet-runtime 0.5.11162 → 0.5.11163

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: ff2a15cd88086b3d0d1657d317e16e1685ae3ec3c6f98ebb8d529d2af70c6d40
4
- data.tar.gz: d6f2e4fbf608fe47e8a9c3fb2e276e0466565e7d587024553dde860f9dbfc156
3
+ metadata.gz: 1894f38aceb8807e68bf82d5573e05e9d405d1223ff0c4ad4bec22d58997d787
4
+ data.tar.gz: 8e1d1e55ba680b6e33d703430e6e1eed986d601d468d6476a03e7a0bbf13d548
5
5
  SHA512:
6
- metadata.gz: b4c34c316387ea3b51f7ba314310829a5a55d58990a9c844568ee922e36617f4b46245ab9e769f597ff1308497845227e992eb635d6209bcb56a304230446b2f
7
- data.tar.gz: 599dd0c1d69d3c2e06929d974c8b16f2a792a117ca5ee18dec7819c555a951fc3c0d4f702c07668a7a992c244106167223b9ef78d5f3f62362ce14406b69ec9a
6
+ metadata.gz: 628584b4968261c5bc1f3ec49fcc4fb14a49193c790860a71b83cafb5537029b95ddd73482991abf8a9f4258624818270bf89659b6c8cbb901551d0312cd2bcb
7
+ data.tar.gz: 99d1dd7d125388760931c96e1634e68b22d7190d732957a46e91478574fc0712118aafbed4fa31fd92aac789864023603db5a1f0e31274d3441128f730e3aa55
@@ -191,12 +191,11 @@ module T::Private::Methods
191
191
  end
192
192
  end
193
193
 
194
- def self.add_module_with_final_method(mod, method_name, is_singleton_method)
195
- m = is_singleton_method ? mod.singleton_class : mod
196
- methods = @modules_with_final[m]
194
+ def self.add_module_with_final_method(mod, method_name)
195
+ methods = @modules_with_final[mod]
197
196
  if methods.nil?
198
197
  methods = {}
199
- @modules_with_final[m] = methods
198
+ @modules_with_final[mod] = methods
200
199
  end
201
200
  methods[method_name] = true
202
201
  nil
@@ -209,13 +208,12 @@ module T::Private::Methods
209
208
  end
210
209
 
211
210
  # Only public because it needs to get called below inside the replace_method blocks below.
212
- def self._on_method_added(hook_mod, method_name, is_singleton_method: false)
211
+ def self._on_method_added(hook_mod, mod, method_name)
213
212
  if T::Private::DeclState.current.skip_on_method_added
214
213
  return
215
214
  end
216
215
 
217
216
  current_declaration = T::Private::DeclState.current.active_declaration
218
- mod = is_singleton_method ? hook_mod.singleton_class : hook_mod
219
217
 
220
218
  if T::Private::Final.final_module?(mod) && (current_declaration.nil? || !current_declaration.final)
221
219
  raise "#{mod} was declared as final but its method `#{method_name}` was not declared as final"
@@ -286,7 +284,7 @@ module T::Private::Methods
286
284
  # use hook_mod, not mod, because for example, we want class C to be marked as having final if we def C.foo as
287
285
  # final. change this to mod to see some final_method tests fail.
288
286
  note_module_deals_with_final(hook_mod)
289
- add_module_with_final_method(hook_mod, method_name, is_singleton_method)
287
+ add_module_with_final_method(mod, method_name)
290
288
  end
291
289
  end
292
290
 
@@ -540,14 +538,14 @@ module T::Private::Methods
540
538
  module MethodHooks
541
539
  def method_added(name)
542
540
  super(name)
543
- ::T::Private::Methods._on_method_added(self, name, is_singleton_method: false)
541
+ ::T::Private::Methods._on_method_added(self, self, name)
544
542
  end
545
543
  end
546
544
 
547
545
  module SingletonMethodHooks
548
546
  def singleton_method_added(name)
549
547
  super(name)
550
- ::T::Private::Methods._on_method_added(self, name, is_singleton_method: true)
548
+ ::T::Private::Methods._on_method_added(self, singleton_class, name)
551
549
  end
552
550
  end
553
551
 
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.11162
4
+ version: 0.5.11163
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-20 00:00:00.000000000 Z
11
+ date: 2023-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest