sorbet-runtime 0.5.11162 → 0.5.11164
Sign up to get free protection for your applications and to get access to all the features.
- 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: 41297d1e5bea141931d127caac32d05555b0f8776f6439d3f7a22ebc3e5adcae
|
4
|
+
data.tar.gz: 9a8b2ced72f5d6878355e48511bbfad8d2beb6242a5c8d2092d3ab6a79286dd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dafe8159c9fc71bbd5ef2f3abcd967a6e721958d72ffdcf29705953e86780382317fa39465c854682718233c856a64df0e1b7dc48c1f15f7262e732c8f5fd35
|
7
|
+
data.tar.gz: f919eb31e746c0ec1730dbb6812d5463e09cbc4001ea20b50207f8ab555bdd9aaf86a402349cd1fe2f614bcd1c00619c359874764b292d4994a04ab6f3d5a355
|
@@ -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.11164
|
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-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|