sorbet-runtime 0.5.11162 → 0.5.11163
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 +4 -4
- data/lib/types/private/methods/_methods.rb +7 -9
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1894f38aceb8807e68bf82d5573e05e9d405d1223ff0c4ad4bec22d58997d787
|
|
4
|
+
data.tar.gz: 8e1d1e55ba680b6e33d703430e6e1eed986d601d468d6476a03e7a0bbf13d548
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
195
|
-
|
|
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[
|
|
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,
|
|
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(
|
|
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,
|
|
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,
|
|
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.
|
|
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-
|
|
11
|
+
date: 2023-12-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: minitest
|