sorbet-runtime 0.6.13291 → 0.6.13293
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/decl_state.rb +8 -0
- data/lib/types/private/methods/_methods.rb +11 -2
- 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: 694b8ac11ca3cce9ba8e377eb454d8dc7f1d25a2260d918bbddf6439df4c9e25
|
|
4
|
+
data.tar.gz: 98d704c9f50db944ae0278296a5652cdf2c708c7719216ecb9107243a74d5d23
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c951c0ea164d0ec2c5a37d8a15e76efc269ae4543a4d421ac9fc81381544fb5bbaef1821bab98f9e79cc6cf5d98269e346847ccf385e8490cdab98ce1243a41e
|
|
7
|
+
data.tar.gz: 78c378b45c098585952a9b4b6048008a259b523ebd989d237e3b683094e9414868a1fe88b0ab75653e31f2ae78fcdf4013891d0c3c2620694144e2291fb55393
|
|
@@ -12,9 +12,17 @@ class T::Private::DeclState
|
|
|
12
12
|
|
|
13
13
|
attr_accessor :active_declaration
|
|
14
14
|
attr_accessor :skip_on_method_added
|
|
15
|
+
attr_accessor :previous_declaration
|
|
15
16
|
|
|
16
17
|
def reset!
|
|
17
18
|
self.active_declaration = nil
|
|
19
|
+
@previous_declaration = nil
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def consume!
|
|
23
|
+
@previous_declaration = self.active_declaration
|
|
24
|
+
self.active_declaration = nil
|
|
25
|
+
@previous_declaration
|
|
18
26
|
end
|
|
19
27
|
|
|
20
28
|
def without_on_method_added
|
|
@@ -194,8 +194,7 @@ module T::Private::Methods
|
|
|
194
194
|
return
|
|
195
195
|
end
|
|
196
196
|
|
|
197
|
-
current_declaration = T::Private::DeclState.current.
|
|
198
|
-
T::Private::DeclState.current.reset!
|
|
197
|
+
current_declaration = T::Private::DeclState.current.consume!
|
|
199
198
|
|
|
200
199
|
if T::Private::Final.final_module?(mod) && (current_declaration.nil? || !current_declaration.final)
|
|
201
200
|
raise "#{mod} was declared as final but its method `#{method_name}` was not declared as final"
|
|
@@ -473,12 +472,22 @@ module T::Private::Methods
|
|
|
473
472
|
end
|
|
474
473
|
|
|
475
474
|
def self.run_all_sig_blocks(force_type_init: true)
|
|
475
|
+
current_declaration = T::Private::DeclState.current.active_declaration
|
|
476
|
+
if !current_declaration.nil?
|
|
477
|
+
T::Private::DeclState.current.reset!
|
|
478
|
+
raise "Cannot call `run_all_sig_blocks` while there is a pending `sig` block in #{current_declaration.mod} at #{current_declaration.loc}"
|
|
479
|
+
end
|
|
480
|
+
|
|
476
481
|
loop do
|
|
477
482
|
first_wrapper = @sig_wrappers.first
|
|
478
483
|
break unless first_wrapper
|
|
479
484
|
key, = first_wrapper
|
|
480
485
|
run_sig_block_for_key(key, force_type_init: force_type_init)
|
|
481
486
|
end
|
|
487
|
+
|
|
488
|
+
# Make sure that there are no lingering declaration blocks being kept alive
|
|
489
|
+
# (so we're not retaining any extra references for a possible GC)
|
|
490
|
+
T::Private::DeclState.current.reset!
|
|
482
491
|
end
|
|
483
492
|
|
|
484
493
|
def self.all_checked_tests_sigs
|
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.6.
|
|
4
|
+
version: 0.6.13293
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stripe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: benchmark
|