rbs 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +5 -0
  3. data/CHANGELOG.md +23 -0
  4. data/README.md +6 -1
  5. data/core/array.rbs +2866 -1086
  6. data/core/basic_object.rbs +150 -30
  7. data/core/binding.rbs +33 -0
  8. data/core/builtin.rbs +4 -4
  9. data/core/class.rbs +43 -5
  10. data/core/comparable.rbs +57 -0
  11. data/core/complex.rbs +170 -4
  12. data/core/constants.rbs +51 -0
  13. data/core/deprecated.rbs +7 -0
  14. data/core/dir.rbs +305 -20
  15. data/core/encoding.rbs +472 -77
  16. data/core/enumerable.rbs +2173 -234
  17. data/core/enumerator.rbs +448 -182
  18. data/core/env.rbs +448 -1
  19. data/core/errno.rbs +1 -10
  20. data/core/errors.rbs +152 -2
  21. data/core/exception.rbs +201 -127
  22. data/core/false_class.rbs +27 -0
  23. data/core/fiber.rbs +118 -37
  24. data/core/fiber_error.rbs +8 -9
  25. data/core/file.rbs +1059 -139
  26. data/core/file_test.rbs +287 -32
  27. data/core/float.rbs +776 -300
  28. data/core/gc.rbs +185 -34
  29. data/core/global_variables.rbs +5 -1
  30. data/core/hash.rbs +1582 -649
  31. data/core/integer.rbs +974 -204
  32. data/core/io/buffer.rbs +710 -0
  33. data/core/io/wait.rbs +29 -8
  34. data/core/io.rbs +2438 -417
  35. data/core/kernel.rbs +2315 -316
  36. data/core/marshal.rbs +37 -2
  37. data/core/match_data.rbs +123 -6
  38. data/core/math.rbs +126 -6
  39. data/core/method.rbs +226 -102
  40. data/core/module.rbs +421 -45
  41. data/core/nil_class.rbs +64 -0
  42. data/core/numeric.rbs +620 -142
  43. data/core/object.rbs +453 -81
  44. data/core/object_space.rbs +92 -2
  45. data/core/proc.rbs +482 -285
  46. data/core/process.rbs +443 -34
  47. data/core/ractor.rbs +232 -9
  48. data/core/random.rbs +151 -52
  49. data/core/range.rbs +885 -160
  50. data/core/rational.rbs +122 -6
  51. data/core/rb_config.rbs +14 -4
  52. data/core/refinement.rbs +44 -0
  53. data/core/regexp.rbs +156 -14
  54. data/core/ruby_vm.rbs +42 -3
  55. data/core/signal.rbs +78 -39
  56. data/core/string.rbs +2123 -567
  57. data/core/string_io.rbs +204 -0
  58. data/core/struct.rbs +283 -28
  59. data/core/symbol.rbs +304 -30
  60. data/core/thread.rbs +1288 -688
  61. data/core/thread_group.rbs +66 -10
  62. data/core/time.rbs +643 -217
  63. data/core/trace_point.rbs +100 -12
  64. data/core/true_class.rbs +24 -0
  65. data/core/unbound_method.rbs +73 -7
  66. data/core/warning.rbs +37 -12
  67. data/docs/CONTRIBUTING.md +40 -34
  68. data/docs/stdlib.md +3 -102
  69. data/lib/rbs/annotate/annotations.rb +197 -0
  70. data/lib/rbs/annotate/formatter.rb +80 -0
  71. data/lib/rbs/annotate/rdoc_annotator.rb +398 -0
  72. data/lib/rbs/annotate/rdoc_source.rb +120 -0
  73. data/lib/rbs/annotate.rb +6 -0
  74. data/lib/rbs/cli.rb +45 -1
  75. data/lib/rbs/definition_builder.rb +5 -1
  76. data/lib/rbs/location_aux.rb +12 -0
  77. data/lib/rbs/prototype/rb.rb +12 -0
  78. data/lib/rbs/version.rb +1 -1
  79. data/sig/annotate/annotations.rbs +102 -0
  80. data/sig/annotate/formatter.rbs +24 -0
  81. data/sig/annotate/rdoc_annotater.rbs +82 -0
  82. data/sig/annotate/rdoc_source.rbs +30 -0
  83. data/sig/cli.rbs +2 -0
  84. data/sig/collection/{collections.rbs → sources.rbs} +0 -0
  85. data/sig/location.rbs +6 -0
  86. data/sig/method_types.rbs +5 -1
  87. data/sig/polyfill.rbs +78 -0
  88. data/stdlib/abbrev/0/abbrev.rbs +6 -0
  89. data/stdlib/abbrev/0/array.rbs +26 -0
  90. data/stdlib/base64/0/base64.rbs +31 -0
  91. data/stdlib/benchmark/0/benchmark.rbs +74 -3
  92. data/stdlib/bigdecimal/0/big_decimal.rbs +614 -165
  93. data/stdlib/bigdecimal-math/0/big_math.rbs +41 -64
  94. data/stdlib/cgi/0/core.rbs +59 -0
  95. data/stdlib/coverage/0/coverage.rbs +164 -2
  96. data/stdlib/csv/0/csv.rbs +2862 -398
  97. data/stdlib/date/0/date.rbs +483 -25
  98. data/stdlib/date/0/date_time.rbs +187 -12
  99. data/stdlib/dbm/0/dbm.rbs +152 -17
  100. data/stdlib/digest/0/digest.rbs +146 -0
  101. data/stdlib/erb/0/erb.rbs +65 -245
  102. data/stdlib/fiber/0/fiber.rbs +73 -91
  103. data/stdlib/fileutils/0/fileutils.rbs +301 -1
  104. data/stdlib/find/0/find.rbs +9 -0
  105. data/stdlib/forwardable/0/forwardable.rbs +65 -1
  106. data/stdlib/io-console/0/io-console.rbs +227 -15
  107. data/stdlib/ipaddr/0/ipaddr.rbs +161 -0
  108. data/stdlib/json/0/json.rbs +1146 -144
  109. data/stdlib/logger/0/formatter.rbs +24 -0
  110. data/stdlib/logger/0/log_device.rbs +64 -0
  111. data/stdlib/logger/0/logger.rbs +165 -13
  112. data/stdlib/logger/0/period.rbs +10 -0
  113. data/stdlib/logger/0/severity.rbs +26 -0
  114. data/stdlib/monitor/0/monitor.rbs +163 -0
  115. data/stdlib/mutex_m/0/mutex_m.rbs +35 -6
  116. data/stdlib/net-http/0/net-http.rbs +1492 -683
  117. data/stdlib/nkf/0/nkf.rbs +372 -0
  118. data/stdlib/objspace/0/objspace.rbs +149 -90
  119. data/stdlib/openssl/0/openssl.rbs +8108 -71
  120. data/stdlib/optparse/0/optparse.rbs +487 -19
  121. data/stdlib/pathname/0/pathname.rbs +425 -124
  122. data/stdlib/prettyprint/0/prettyprint.rbs +120 -99
  123. data/stdlib/prime/0/integer-extension.rbs +20 -2
  124. data/stdlib/prime/0/prime.rbs +88 -21
  125. data/stdlib/pstore/0/pstore.rbs +102 -0
  126. data/stdlib/pty/0/pty.rbs +64 -14
  127. data/stdlib/resolv/0/resolv.rbs +420 -31
  128. data/stdlib/rubygems/0/basic_specification.rbs +4 -1
  129. data/stdlib/rubygems/0/config_file.rbs +33 -1
  130. data/stdlib/rubygems/0/dependency_installer.rbs +4 -3
  131. data/stdlib/rubygems/0/installer.rbs +13 -1
  132. data/stdlib/rubygems/0/path_support.rbs +4 -1
  133. data/stdlib/rubygems/0/platform.rbs +5 -1
  134. data/stdlib/rubygems/0/request_set.rbs +44 -2
  135. data/stdlib/rubygems/0/requirement.rbs +65 -2
  136. data/stdlib/rubygems/0/rubygems.rbs +407 -0
  137. data/stdlib/rubygems/0/source_list.rbs +13 -0
  138. data/stdlib/rubygems/0/specification.rbs +21 -1
  139. data/stdlib/rubygems/0/stream_ui.rbs +3 -1
  140. data/stdlib/rubygems/0/uninstaller.rbs +8 -1
  141. data/stdlib/rubygems/0/version.rbs +60 -157
  142. data/stdlib/securerandom/0/securerandom.rbs +44 -0
  143. data/stdlib/set/0/set.rbs +420 -106
  144. data/stdlib/shellwords/0/shellwords.rbs +55 -77
  145. data/stdlib/singleton/0/singleton.rbs +20 -0
  146. data/stdlib/socket/0/addrinfo.rbs +210 -9
  147. data/stdlib/socket/0/basic_socket.rbs +103 -11
  148. data/stdlib/socket/0/ip_socket.rbs +31 -9
  149. data/stdlib/socket/0/socket.rbs +586 -38
  150. data/stdlib/socket/0/tcp_server.rbs +22 -2
  151. data/stdlib/socket/0/tcp_socket.rbs +12 -1
  152. data/stdlib/socket/0/udp_socket.rbs +25 -2
  153. data/stdlib/socket/0/unix_server.rbs +22 -2
  154. data/stdlib/socket/0/unix_socket.rbs +45 -5
  155. data/stdlib/strscan/0/string_scanner.rbs +210 -9
  156. data/stdlib/tempfile/0/tempfile.rbs +58 -10
  157. data/stdlib/time/0/time.rbs +208 -116
  158. data/stdlib/timeout/0/timeout.rbs +10 -0
  159. data/stdlib/tmpdir/0/tmpdir.rbs +13 -4
  160. data/stdlib/tsort/0/cyclic.rbs +1 -0
  161. data/stdlib/tsort/0/interfaces.rbs +1 -0
  162. data/stdlib/tsort/0/tsort.rbs +42 -0
  163. data/stdlib/uri/0/common.rbs +57 -8
  164. data/stdlib/uri/0/file.rbs +55 -109
  165. data/stdlib/uri/0/ftp.rbs +6 -3
  166. data/stdlib/uri/0/generic.rbs +556 -327
  167. data/stdlib/uri/0/http.rbs +26 -115
  168. data/stdlib/uri/0/https.rbs +8 -102
  169. data/stdlib/uri/0/ldap.rbs +143 -137
  170. data/stdlib/uri/0/ldaps.rbs +8 -102
  171. data/stdlib/uri/0/mailto.rbs +3 -0
  172. data/stdlib/uri/0/rfc2396_parser.rbs +66 -26
  173. data/stdlib/uri/0/ws.rbs +6 -3
  174. data/stdlib/uri/0/wss.rbs +5 -3
  175. data/stdlib/yaml/0/dbm.rbs +151 -87
  176. data/stdlib/yaml/0/store.rbs +6 -0
  177. data/stdlib/zlib/0/zlib.rbs +90 -31
  178. metadata +17 -5
  179. 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
- # :count=>0,
53
- # :heap_allocated_pages=>24,
54
- # :heap_sorted_length=>24,
55
- # :heap_allocatable_pages=>0,
56
- # :heap_available_slots=>9783,
57
- # :heap_live_slots=>7713,
58
- # :heap_free_slots=>2070,
59
- # :heap_final_slots=>0,
60
- # :heap_marked_slots=>0,
61
- # :heap_eden_pages=>24,
62
- # :heap_tomb_pages=>0,
63
- # :total_allocated_pages=>24,
64
- # :total_freed_pages=>0,
65
- # :total_allocated_objects=>7796,
66
- # :total_freed_objects=>83,
67
- # :malloc_increase_bytes=>2389312,
68
- # :malloc_increase_bytes_limit=>16777216,
69
- # :minor_gc_count=>0,
70
- # :major_gc_count=>0,
71
- # :remembered_wb_unprotected_objects=>0,
72
- # :remembered_wb_unprotected_objects_limit=>0,
73
- # :old_objects=>0,
74
- # :old_objects_limit=>0,
75
- # :oldmalloc_increase_bytes=>2389760,
76
- # :oldmalloc_increase_bytes_limit=>16777216
77
- # }
78
- #
79
- # The contents of the hash are implementation specific and may be changed in the
80
- # future.
81
- #
82
- # This method is only expected to work on C Ruby.
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
@@ -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