rbs 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +5 -0
- data/CHANGELOG.md +23 -0
- data/README.md +6 -1
- data/core/array.rbs +2866 -1086
- data/core/basic_object.rbs +150 -30
- data/core/binding.rbs +33 -0
- data/core/builtin.rbs +4 -4
- data/core/class.rbs +43 -5
- data/core/comparable.rbs +57 -0
- data/core/complex.rbs +170 -4
- data/core/constants.rbs +51 -0
- data/core/deprecated.rbs +7 -0
- data/core/dir.rbs +305 -20
- data/core/encoding.rbs +472 -77
- data/core/enumerable.rbs +2173 -234
- data/core/enumerator.rbs +448 -182
- data/core/env.rbs +448 -1
- data/core/errno.rbs +1 -10
- data/core/errors.rbs +152 -2
- data/core/exception.rbs +201 -127
- data/core/false_class.rbs +27 -0
- data/core/fiber.rbs +118 -37
- data/core/fiber_error.rbs +8 -9
- data/core/file.rbs +1059 -139
- data/core/file_test.rbs +287 -32
- data/core/float.rbs +776 -300
- data/core/gc.rbs +185 -34
- data/core/global_variables.rbs +5 -1
- data/core/hash.rbs +1582 -649
- data/core/integer.rbs +974 -204
- data/core/io/buffer.rbs +710 -0
- data/core/io/wait.rbs +29 -8
- data/core/io.rbs +2438 -417
- data/core/kernel.rbs +2315 -316
- data/core/marshal.rbs +37 -2
- data/core/match_data.rbs +123 -6
- data/core/math.rbs +126 -6
- data/core/method.rbs +226 -102
- data/core/module.rbs +421 -45
- data/core/nil_class.rbs +64 -0
- data/core/numeric.rbs +620 -142
- data/core/object.rbs +453 -81
- data/core/object_space.rbs +92 -2
- data/core/proc.rbs +482 -285
- data/core/process.rbs +443 -34
- data/core/ractor.rbs +232 -9
- data/core/random.rbs +151 -52
- data/core/range.rbs +885 -160
- data/core/rational.rbs +122 -6
- data/core/rb_config.rbs +14 -4
- data/core/refinement.rbs +44 -0
- data/core/regexp.rbs +156 -14
- data/core/ruby_vm.rbs +42 -3
- data/core/signal.rbs +78 -39
- data/core/string.rbs +2123 -567
- data/core/string_io.rbs +204 -0
- data/core/struct.rbs +283 -28
- data/core/symbol.rbs +304 -30
- data/core/thread.rbs +1288 -688
- data/core/thread_group.rbs +66 -10
- data/core/time.rbs +643 -217
- data/core/trace_point.rbs +100 -12
- data/core/true_class.rbs +24 -0
- data/core/unbound_method.rbs +73 -7
- data/core/warning.rbs +37 -12
- data/docs/CONTRIBUTING.md +40 -34
- data/docs/stdlib.md +3 -102
- data/lib/rbs/annotate/annotations.rb +197 -0
- data/lib/rbs/annotate/formatter.rb +80 -0
- data/lib/rbs/annotate/rdoc_annotator.rb +398 -0
- data/lib/rbs/annotate/rdoc_source.rb +120 -0
- data/lib/rbs/annotate.rb +6 -0
- data/lib/rbs/cli.rb +45 -1
- data/lib/rbs/definition_builder.rb +5 -1
- data/lib/rbs/location_aux.rb +12 -0
- data/lib/rbs/prototype/rb.rb +12 -0
- data/lib/rbs/version.rb +1 -1
- data/sig/annotate/annotations.rbs +102 -0
- data/sig/annotate/formatter.rbs +24 -0
- data/sig/annotate/rdoc_annotater.rbs +82 -0
- data/sig/annotate/rdoc_source.rbs +30 -0
- data/sig/cli.rbs +2 -0
- data/sig/collection/{collections.rbs → sources.rbs} +0 -0
- data/sig/location.rbs +6 -0
- data/sig/method_types.rbs +5 -1
- data/sig/polyfill.rbs +78 -0
- data/stdlib/abbrev/0/abbrev.rbs +6 -0
- data/stdlib/abbrev/0/array.rbs +26 -0
- data/stdlib/base64/0/base64.rbs +31 -0
- data/stdlib/benchmark/0/benchmark.rbs +74 -3
- data/stdlib/bigdecimal/0/big_decimal.rbs +614 -165
- data/stdlib/bigdecimal-math/0/big_math.rbs +41 -64
- data/stdlib/cgi/0/core.rbs +59 -0
- data/stdlib/coverage/0/coverage.rbs +164 -2
- data/stdlib/csv/0/csv.rbs +2862 -398
- data/stdlib/date/0/date.rbs +483 -25
- data/stdlib/date/0/date_time.rbs +187 -12
- data/stdlib/dbm/0/dbm.rbs +152 -17
- data/stdlib/digest/0/digest.rbs +146 -0
- data/stdlib/erb/0/erb.rbs +65 -245
- data/stdlib/fiber/0/fiber.rbs +73 -91
- data/stdlib/fileutils/0/fileutils.rbs +301 -1
- data/stdlib/find/0/find.rbs +9 -0
- data/stdlib/forwardable/0/forwardable.rbs +65 -1
- data/stdlib/io-console/0/io-console.rbs +227 -15
- data/stdlib/ipaddr/0/ipaddr.rbs +161 -0
- data/stdlib/json/0/json.rbs +1146 -144
- data/stdlib/logger/0/formatter.rbs +24 -0
- data/stdlib/logger/0/log_device.rbs +64 -0
- data/stdlib/logger/0/logger.rbs +165 -13
- data/stdlib/logger/0/period.rbs +10 -0
- data/stdlib/logger/0/severity.rbs +26 -0
- data/stdlib/monitor/0/monitor.rbs +163 -0
- data/stdlib/mutex_m/0/mutex_m.rbs +35 -6
- data/stdlib/net-http/0/net-http.rbs +1492 -683
- data/stdlib/nkf/0/nkf.rbs +372 -0
- data/stdlib/objspace/0/objspace.rbs +149 -90
- data/stdlib/openssl/0/openssl.rbs +8108 -71
- data/stdlib/optparse/0/optparse.rbs +487 -19
- data/stdlib/pathname/0/pathname.rbs +425 -124
- data/stdlib/prettyprint/0/prettyprint.rbs +120 -99
- data/stdlib/prime/0/integer-extension.rbs +20 -2
- data/stdlib/prime/0/prime.rbs +88 -21
- data/stdlib/pstore/0/pstore.rbs +102 -0
- data/stdlib/pty/0/pty.rbs +64 -14
- data/stdlib/resolv/0/resolv.rbs +420 -31
- data/stdlib/rubygems/0/basic_specification.rbs +4 -1
- data/stdlib/rubygems/0/config_file.rbs +33 -1
- data/stdlib/rubygems/0/dependency_installer.rbs +4 -3
- data/stdlib/rubygems/0/installer.rbs +13 -1
- data/stdlib/rubygems/0/path_support.rbs +4 -1
- data/stdlib/rubygems/0/platform.rbs +5 -1
- data/stdlib/rubygems/0/request_set.rbs +44 -2
- data/stdlib/rubygems/0/requirement.rbs +65 -2
- data/stdlib/rubygems/0/rubygems.rbs +407 -0
- data/stdlib/rubygems/0/source_list.rbs +13 -0
- data/stdlib/rubygems/0/specification.rbs +21 -1
- data/stdlib/rubygems/0/stream_ui.rbs +3 -1
- data/stdlib/rubygems/0/uninstaller.rbs +8 -1
- data/stdlib/rubygems/0/version.rbs +60 -157
- data/stdlib/securerandom/0/securerandom.rbs +44 -0
- data/stdlib/set/0/set.rbs +420 -106
- data/stdlib/shellwords/0/shellwords.rbs +55 -77
- data/stdlib/singleton/0/singleton.rbs +20 -0
- data/stdlib/socket/0/addrinfo.rbs +210 -9
- data/stdlib/socket/0/basic_socket.rbs +103 -11
- data/stdlib/socket/0/ip_socket.rbs +31 -9
- data/stdlib/socket/0/socket.rbs +586 -38
- data/stdlib/socket/0/tcp_server.rbs +22 -2
- data/stdlib/socket/0/tcp_socket.rbs +12 -1
- data/stdlib/socket/0/udp_socket.rbs +25 -2
- data/stdlib/socket/0/unix_server.rbs +22 -2
- data/stdlib/socket/0/unix_socket.rbs +45 -5
- data/stdlib/strscan/0/string_scanner.rbs +210 -9
- data/stdlib/tempfile/0/tempfile.rbs +58 -10
- data/stdlib/time/0/time.rbs +208 -116
- data/stdlib/timeout/0/timeout.rbs +10 -0
- data/stdlib/tmpdir/0/tmpdir.rbs +13 -4
- data/stdlib/tsort/0/cyclic.rbs +1 -0
- data/stdlib/tsort/0/interfaces.rbs +1 -0
- data/stdlib/tsort/0/tsort.rbs +42 -0
- data/stdlib/uri/0/common.rbs +57 -8
- data/stdlib/uri/0/file.rbs +55 -109
- data/stdlib/uri/0/ftp.rbs +6 -3
- data/stdlib/uri/0/generic.rbs +556 -327
- data/stdlib/uri/0/http.rbs +26 -115
- data/stdlib/uri/0/https.rbs +8 -102
- data/stdlib/uri/0/ldap.rbs +143 -137
- data/stdlib/uri/0/ldaps.rbs +8 -102
- data/stdlib/uri/0/mailto.rbs +3 -0
- data/stdlib/uri/0/rfc2396_parser.rbs +66 -26
- data/stdlib/uri/0/ws.rbs +6 -3
- data/stdlib/uri/0/wss.rbs +5 -3
- data/stdlib/yaml/0/dbm.rbs +151 -87
- data/stdlib/yaml/0/store.rbs +6 -0
- data/stdlib/zlib/0/zlib.rbs +90 -31
- metadata +17 -5
- data/lib/rbs/location.rb +0 -221
data/core/gc.rbs
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# <!-- rdoc-file=gc.rb -->
|
1
2
|
# The GC module provides an interface to Ruby's mark and sweep garbage
|
2
3
|
# collection mechanism.
|
3
4
|
#
|
@@ -6,12 +7,20 @@
|
|
6
7
|
# You may obtain information about the operation of the GC through GC::Profiler.
|
7
8
|
#
|
8
9
|
module GC
|
10
|
+
# <!--
|
11
|
+
# rdoc-file=gc.rb
|
12
|
+
# - GC.count -> Integer
|
13
|
+
# -->
|
9
14
|
# The number of times GC occurred.
|
10
15
|
#
|
11
16
|
# It returns the number of times GC occurred since the process started.
|
12
17
|
#
|
13
18
|
def self.count: () -> Integer
|
14
19
|
|
20
|
+
# <!--
|
21
|
+
# rdoc-file=gc.rb
|
22
|
+
# - GC.disable -> true or false
|
23
|
+
# -->
|
15
24
|
# Disables garbage collection, returning `true` if garbage collection was
|
16
25
|
# already disabled.
|
17
26
|
#
|
@@ -20,6 +29,10 @@ module GC
|
|
20
29
|
#
|
21
30
|
def self.disable: () -> bool
|
22
31
|
|
32
|
+
# <!--
|
33
|
+
# rdoc-file=gc.rb
|
34
|
+
# - GC.enable -> true or false
|
35
|
+
# -->
|
23
36
|
# Enables garbage collection, returning `true` if garbage collection was
|
24
37
|
# previously disabled.
|
25
38
|
#
|
@@ -29,6 +42,15 @@ module GC
|
|
29
42
|
#
|
30
43
|
def self.enable: () -> bool
|
31
44
|
|
45
|
+
# <!--
|
46
|
+
# rdoc-file=gc.rb
|
47
|
+
# - GC.start -> nil
|
48
|
+
# - ObjectSpace.garbage_collect -> nil
|
49
|
+
# - include GC; garbage_collect -> nil
|
50
|
+
# - GC.start(full_mark: true, immediate_sweep: true) -> nil
|
51
|
+
# - ObjectSpace.garbage_collect(full_mark: true, immediate_sweep: true) -> nil
|
52
|
+
# - include GC; garbage_collect(full_mark: true, immediate_sweep: true) -> nil
|
53
|
+
# -->
|
32
54
|
# Initiates garbage collection, even if manually disabled.
|
33
55
|
#
|
34
56
|
# This method is defined with keyword arguments that default to true:
|
@@ -44,50 +66,97 @@ module GC
|
|
44
66
|
#
|
45
67
|
def self.start: (?immediate_sweep: boolish immediate_sweep, ?immediate_mark: boolish immediate_mark, ?full_mark: boolish full_mark) -> nil
|
46
68
|
|
69
|
+
# <!--
|
70
|
+
# rdoc-file=gc.rb
|
71
|
+
# - GC.stat -> Hash
|
72
|
+
# - GC.stat(hash) -> Hash
|
73
|
+
# - GC.stat(:key) -> Numeric
|
74
|
+
# -->
|
47
75
|
# Returns a Hash containing information about the GC.
|
48
76
|
#
|
77
|
+
# The contents of the hash are implementation specific and may change in the
|
78
|
+
# future without notice.
|
79
|
+
#
|
49
80
|
# The hash includes information about internal statistics about GC such as:
|
50
81
|
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
#
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
71
|
-
#
|
72
|
-
#
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
# The
|
80
|
-
#
|
81
|
-
#
|
82
|
-
#
|
82
|
+
# count
|
83
|
+
# : The total number of garbage collections ran since application start (count
|
84
|
+
# includes both minor and major garbage collections)
|
85
|
+
# heap_allocated_pages
|
86
|
+
# : The total number of `:heap_eden_pages` + `:heap_tomb_pages`
|
87
|
+
# heap_sorted_length
|
88
|
+
# : The number of pages that can fit into the buffer that holds references to
|
89
|
+
# all pages
|
90
|
+
# heap_allocatable_pages
|
91
|
+
# : The total number of pages the application could allocate without
|
92
|
+
# additional GC
|
93
|
+
# heap_available_slots
|
94
|
+
# : The total number of slots in all `:heap_allocated_pages`
|
95
|
+
# heap_live_slots
|
96
|
+
# : The total number of slots which contain live objects
|
97
|
+
# heap_free_slots
|
98
|
+
# : The total number of slots which do not contain live objects
|
99
|
+
# heap_final_slots
|
100
|
+
# : The total number of slots with pending finalizers to be run
|
101
|
+
# heap_marked_slots
|
102
|
+
# : The total number of objects marked in the last GC
|
103
|
+
# heap_eden_pages
|
104
|
+
# : The total number of pages which contain at least one live slot
|
105
|
+
# heap_tomb_pages
|
106
|
+
# : The total number of pages which do not contain any live slots
|
107
|
+
# total_allocated_pages
|
108
|
+
# : The cumulative number of pages allocated since application start
|
109
|
+
# total_freed_pages
|
110
|
+
# : The cumulative number of pages freed since application start
|
111
|
+
# total_allocated_objects
|
112
|
+
# : The cumulative number of objects allocated since application start
|
113
|
+
# total_freed_objects
|
114
|
+
# : The cumulative number of objects freed since application start
|
115
|
+
# malloc_increase_bytes
|
116
|
+
# : Amount of memory allocated on the heap for objects. Decreased by any GC
|
117
|
+
# malloc_increase_bytes_limit
|
118
|
+
# : When `:malloc_increase_bytes` crosses this limit, GC is triggered
|
119
|
+
# minor_gc_count
|
120
|
+
# : The total number of minor garbage collections run since process start
|
121
|
+
# major_gc_count
|
122
|
+
# : The total number of major garbage collections run since process start
|
123
|
+
# remembered_wb_unprotected_objects
|
124
|
+
# : The total number of objects without write barriers
|
125
|
+
# remembered_wb_unprotected_objects_limit
|
126
|
+
# : When `:remembered_wb_unprotected_objects` crosses this limit, major GC is
|
127
|
+
# triggered
|
128
|
+
# old_objects
|
129
|
+
# : Number of live, old objects which have survived at least 3 garbage
|
130
|
+
# collections
|
131
|
+
# old_objects_limit
|
132
|
+
# : When `:old_objects` crosses this limit, major GC is triggered
|
133
|
+
# oldmalloc_increase_bytes
|
134
|
+
# : Amount of memory allocated on the heap for objects. Decreased by major GC
|
135
|
+
# oldmalloc_increase_bytes_limit
|
136
|
+
# : When `:old_malloc_increase_bytes` crosses this limit, major GC is
|
137
|
+
# triggered
|
138
|
+
#
|
139
|
+
#
|
140
|
+
# If the optional argument, hash, is given, it is overwritten and returned. This
|
141
|
+
# is intended to avoid probe effect.
|
142
|
+
#
|
143
|
+
# This method is only expected to work on CRuby.
|
83
144
|
#
|
84
145
|
def self.stat: (?::Hash[Symbol, Integer] arg0) -> ::Hash[Symbol, Integer]
|
85
146
|
| (?Symbol arg0) -> Integer
|
86
147
|
|
148
|
+
# <!--
|
149
|
+
# rdoc-file=gc.rb
|
150
|
+
# - GC.stress -> integer, true or false
|
151
|
+
# -->
|
87
152
|
# Returns current status of GC stress mode.
|
88
153
|
#
|
89
154
|
def self.stress: () -> (Integer | TrueClass | FalseClass)
|
90
155
|
|
156
|
+
# <!--
|
157
|
+
# rdoc-file=gc.rb
|
158
|
+
# - GC.stress = flag -> flag
|
159
|
+
# -->
|
91
160
|
# Updates the GC stress mode.
|
92
161
|
#
|
93
162
|
# When stress mode is enabled, the GC is invoked at every GC opportunity: all
|
@@ -102,8 +171,33 @@ module GC
|
|
102
171
|
#
|
103
172
|
def self.stress=: (Integer | TrueClass | FalseClass flag) -> (Integer | TrueClass | FalseClass)
|
104
173
|
|
174
|
+
# <!--
|
175
|
+
# rdoc-file=gc.rb
|
176
|
+
# - GC.total_time -> int
|
177
|
+
# -->
|
178
|
+
# Return measured GC total time in nano seconds.
|
179
|
+
#
|
180
|
+
def self.total_time: () -> Integer
|
181
|
+
|
182
|
+
# <!--
|
183
|
+
# rdoc-file=gc.rb
|
184
|
+
# - GC.compact
|
185
|
+
# -->
|
186
|
+
# This function compacts objects together in Ruby's heap. It eliminates unused
|
187
|
+
# space (or fragmentation) in the heap by moving objects in to that unused
|
188
|
+
# space. This function returns a hash which contains statistics about which
|
189
|
+
# objects were moved. See `GC.latest_gc_info` for details about compaction
|
190
|
+
# statistics.
|
191
|
+
#
|
192
|
+
# This method is implementation specific and not expected to be implemented in
|
193
|
+
# any implementation besides MRI.
|
194
|
+
#
|
105
195
|
def self.compact: () -> ::Hash[:considered | :moved, Hash[Symbol | Integer, Integer]]
|
106
196
|
|
197
|
+
# <!--
|
198
|
+
# rdoc-file=gc.rb
|
199
|
+
# - GC.verify_compaction_references(toward: nil, double_heap: false) -> hash
|
200
|
+
# -->
|
107
201
|
# Verify compaction reference consistency.
|
108
202
|
#
|
109
203
|
# This method is implementation specific. During compaction, objects that were
|
@@ -117,6 +211,10 @@ module GC
|
|
117
211
|
#
|
118
212
|
def self.verify_compaction_references: () -> ::Hash[:considered | :moved, Hash[Symbol | Integer, Integer]]
|
119
213
|
|
214
|
+
# <!--
|
215
|
+
# rdoc-file=gc.c
|
216
|
+
# - GC.verify_internal_consistency -> nil
|
217
|
+
# -->
|
120
218
|
# Verify internal consistency.
|
121
219
|
#
|
122
220
|
# This method is implementation specific. Now this method checks generational
|
@@ -124,27 +222,47 @@ module GC
|
|
124
222
|
#
|
125
223
|
def self.verify_internal_consistency: () -> nil
|
126
224
|
|
225
|
+
# <!--
|
226
|
+
# rdoc-file=gc.c
|
227
|
+
# - verify_transient_heap_internal_consistency()
|
228
|
+
# -->
|
229
|
+
#
|
127
230
|
def self.verify_transient_heap_internal_consistency: () -> nil
|
128
231
|
|
232
|
+
# <!--
|
233
|
+
# rdoc-file=gc.rb
|
234
|
+
# - GC.latest_gc_info -> {:gc_by=>:newobj}
|
235
|
+
# - GC.latest_gc_info(hash) -> hash
|
236
|
+
# - GC.latest_gc_info(:major_by) -> :malloc
|
237
|
+
# -->
|
129
238
|
# Returns information about the most recent garbage collection.
|
130
239
|
#
|
240
|
+
# If the optional argument, hash, is given, it is overwritten and returned. This
|
241
|
+
# is intended to avoid probe effect.
|
242
|
+
#
|
131
243
|
def self.latest_gc_info: () -> ::Hash[::Symbol, untyped]
|
132
244
|
| [K] (?Hash[K, untyped] hash) -> ::Hash[::Symbol | K, untyped]
|
133
245
|
| (Symbol key) -> untyped
|
134
246
|
|
247
|
+
# <!--
|
248
|
+
# rdoc-file=gc.rb
|
249
|
+
# - garbage_collect(full_mark: true, immediate_mark: true, immediate_sweep: true)
|
250
|
+
# -->
|
251
|
+
#
|
135
252
|
def garbage_collect: (?immediate_sweep: boolish immediate_sweep, ?immediate_mark: boolish immediate_mark, ?full_mark: boolish full_mark) -> nil
|
136
253
|
end
|
137
254
|
|
255
|
+
# <!-- rdoc-file=gc.c -->
|
138
256
|
# internal constants
|
139
257
|
#
|
140
|
-
#
|
141
258
|
GC::INTERNAL_CONSTANTS: Hash[Symbol, Integer]
|
142
259
|
|
260
|
+
# <!-- rdoc-file=gc.c -->
|
143
261
|
# GC build options
|
144
262
|
#
|
145
|
-
#
|
146
263
|
GC::OPTS: Array[String]
|
147
264
|
|
265
|
+
# <!-- rdoc-file=gc.c -->
|
148
266
|
# The GC profiler provides access to information on GC runs including time,
|
149
267
|
# length and object space size.
|
150
268
|
#
|
@@ -161,22 +279,42 @@ GC::OPTS: Array[String]
|
|
161
279
|
# See also GC.count, GC.malloc_allocated_size and GC.malloc_allocations
|
162
280
|
#
|
163
281
|
module GC::Profiler
|
282
|
+
# <!--
|
283
|
+
# rdoc-file=gc.c
|
284
|
+
# - GC::Profiler.clear -> nil
|
285
|
+
# -->
|
164
286
|
# Clears the GC profiler data.
|
165
287
|
#
|
166
288
|
def self.clear: () -> void
|
167
289
|
|
290
|
+
# <!--
|
291
|
+
# rdoc-file=gc.c
|
292
|
+
# - GC::Profiler.disable -> nil
|
293
|
+
# -->
|
168
294
|
# Stops the GC profiler.
|
169
295
|
#
|
170
296
|
def self.disable: () -> void
|
171
297
|
|
298
|
+
# <!--
|
299
|
+
# rdoc-file=gc.c
|
300
|
+
# - GC::Profiler.enable -> nil
|
301
|
+
# -->
|
172
302
|
# Starts the GC profiler.
|
173
303
|
#
|
174
304
|
def self.enable: () -> void
|
175
305
|
|
306
|
+
# <!--
|
307
|
+
# rdoc-file=gc.c
|
308
|
+
# - GC::Profiler.enabled? -> true or false
|
309
|
+
# -->
|
176
310
|
# The current status of GC profile mode.
|
177
311
|
#
|
178
312
|
def self.enabled?: () -> bool
|
179
313
|
|
314
|
+
# <!--
|
315
|
+
# rdoc-file=gc.c
|
316
|
+
# - GC::Profiler.raw_data -> [Hash, ...]
|
317
|
+
# -->
|
180
318
|
# Returns an Array of individual raw profile data Hashes ordered from earliest
|
181
319
|
# to latest by `:GC_INVOKE_TIME`.
|
182
320
|
#
|
@@ -225,10 +363,19 @@ module GC::Profiler
|
|
225
363
|
#
|
226
364
|
def self.raw_data: () -> ::Array[::Hash[Symbol, untyped]]
|
227
365
|
|
366
|
+
# <!--
|
367
|
+
# rdoc-file=gc.c
|
368
|
+
# - GC::Profiler.report
|
369
|
+
# - GC::Profiler.report(io)
|
370
|
+
# -->
|
228
371
|
# Writes the GC::Profiler.result to `$stdout` or the given IO object.
|
229
372
|
#
|
230
373
|
def self.report: (?IO io) -> void
|
231
374
|
|
375
|
+
# <!--
|
376
|
+
# rdoc-file=gc.c
|
377
|
+
# - GC::Profiler.result -> String
|
378
|
+
# -->
|
232
379
|
# Returns a profile data report such as:
|
233
380
|
#
|
234
381
|
# GC 1 invokes.
|
@@ -237,6 +384,10 @@ module GC::Profiler
|
|
237
384
|
#
|
238
385
|
def self.result: () -> String
|
239
386
|
|
387
|
+
# <!--
|
388
|
+
# rdoc-file=gc.c
|
389
|
+
# - GC::Profiler.total_time -> float
|
390
|
+
# -->
|
240
391
|
# The total time used for garbage collection in seconds
|
241
392
|
#
|
242
393
|
def self.total_time: () -> Float
|
data/core/global_variables.rbs
CHANGED
@@ -147,7 +147,11 @@ $LOADED_FEATURES: Array[String]
|
|
147
147
|
# Has a singleton method <code>$LOAD_PATH.resolve_feature_path(feature)</code>
|
148
148
|
# that returns [+:rb+ or +:so+, path], which resolves the feature to
|
149
149
|
# the path the original Kernel#require method would load.
|
150
|
-
$LOAD_PATH: Array[String]
|
150
|
+
$LOAD_PATH: Array[String] & _LoadPathAPI
|
151
|
+
|
152
|
+
interface _LoadPathAPI
|
153
|
+
def resolve_feature_path: (String) -> [:rb | :so, String]?
|
154
|
+
end
|
151
155
|
|
152
156
|
# Contains the name of the script being executed. May be assignable.
|
153
157
|
$PROGRAM_NAME: String
|