rbs 2.0.0 → 2.1.0

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.
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/stdlib/dbm/0/dbm.rbs CHANGED
@@ -1,7 +1,8 @@
1
+ # <!-- rdoc-file=ext/dbm/dbm.c -->
1
2
  # ## Introduction
2
3
  #
3
4
  # The DBM class provides a wrapper to a Unix-style
4
- # [dbm](http://en.wikipedia.org/wiki/Dbm) or Database Manager library.
5
+ # [dbm](https://en.wikipedia.org/wiki/Dbm) or Database Manager library.
5
6
  #
6
7
  # Dbm databases do not have tables or columns; they are simple key-value data
7
8
  # stores, like a Ruby Hash except not resident in RAM. Keys and values must be
@@ -13,8 +14,8 @@
13
14
  # * The original ndbm library is released in 4.3BSD. It is based on dbm
14
15
  # library in Unix Version 7 but has different API to support multiple
15
16
  # databases in a process.
16
- # * [Berkeley DB](http://en.wikipedia.org/wiki/Berkeley_DB) versions 1 thru 6,
17
- # also known as BDB and Sleepycat DB, now owned by Oracle Corporation.
17
+ # * [Berkeley DB](https://en.wikipedia.org/wiki/Berkeley_DB) versions 1 thru
18
+ # 6, also known as BDB and Sleepycat DB, now owned by Oracle Corporation.
18
19
  # * Berkeley DB 1.x, still found in 4.4BSD derivatives (FreeBSD, OpenBSD,
19
20
  # etc).
20
21
  # * [gdbm](http://www.gnu.org/software/gdbm/), the GNU implementation of dbm.
@@ -61,8 +62,13 @@
61
62
  # puts db['822']
62
63
  #
63
64
  class DBM
64
- include Enumerable[[String, String]]
65
+ include Enumerable[[ String, String ]]
65
66
 
67
+ # <!--
68
+ # rdoc-file=ext/dbm/dbm.c
69
+ # - DBM.open(filename[, mode[, flags]]) -> dbm
70
+ # - DBM.open(filename[, mode[, flags]]) {|dbm| block}
71
+ # -->
66
72
  # Open a dbm database and yields it if a block is given. See also `DBM.new`.
67
73
  #
68
74
  def self.open: (String filename, ?Integer mode, ?Integer flags) -> DBM
@@ -70,113 +76,205 @@ class DBM
70
76
 
71
77
  public
72
78
 
79
+ # <!--
80
+ # rdoc-file=ext/dbm/dbm.c
81
+ # - dbm[key] -> string value or nil
82
+ # -->
73
83
  # Return a value from the database by locating the key string provided. If the
74
84
  # key is not found, returns nil.
75
85
  #
76
86
  def []: (String) -> String?
77
87
 
88
+ # <!--
89
+ # rdoc-file=ext/dbm/dbm.c
90
+ # - dbm.store(key, value) -> value
91
+ # - dbm[key] = value
92
+ # -->
78
93
  # Stores the specified string value in the database, indexed via the string key
79
94
  # provided.
80
95
  #
81
96
  def []=: (String, String) -> String
82
97
 
98
+ # <!--
99
+ # rdoc-file=ext/dbm/dbm.c
100
+ # - dbm.clear
101
+ # -->
83
102
  # Deletes all data from the database.
84
103
  #
85
104
  def clear: () -> self
86
105
 
106
+ # <!--
107
+ # rdoc-file=ext/dbm/dbm.c
108
+ # - dbm.close
109
+ # -->
87
110
  # Closes the database.
88
111
  #
89
112
  def close: () -> void
90
113
 
114
+ # <!--
115
+ # rdoc-file=ext/dbm/dbm.c
116
+ # - dbm.closed? -> true or false
117
+ # -->
91
118
  # Returns true if the database is closed, false otherwise.
92
119
  #
93
120
  def closed?: () -> bool
94
121
 
122
+ # <!--
123
+ # rdoc-file=ext/dbm/dbm.c
124
+ # - dbm.delete(key)
125
+ # -->
95
126
  # Deletes an entry from the database.
96
127
  #
97
128
  def delete: (String) -> void
98
129
 
130
+ # <!--
131
+ # rdoc-file=ext/dbm/dbm.c
132
+ # - dbm.reject! {|key, value| block} -> self
133
+ # - dbm.delete_if {|key, value| block} -> self
134
+ # -->
99
135
  # Deletes all entries for which the code block returns true. Returns self.
100
136
  #
101
137
  def delete_if: () { (String) -> boolish } -> self
102
138
 
139
+ # <!--
140
+ # rdoc-file=ext/dbm/dbm.c
141
+ # - dbm.each_pair {|key,value| block} -> self
142
+ # -->
103
143
  # Calls the block once for each [key, value] pair in the database. Returns self.
104
144
  #
105
- def each: () { ([String, String]) -> void } -> self
106
- | () -> Enumerator[[String, String], self]
145
+ def each: () { ([ String, String ]) -> void } -> self
146
+ | () -> Enumerator[[ String, String ], self]
107
147
 
148
+ # <!--
149
+ # rdoc-file=ext/dbm/dbm.c
150
+ # - dbm.each_key {|key| block} -> self
151
+ # -->
108
152
  # Calls the block once for each key string in the database. Returns self.
109
153
  #
110
- def each_key: { (String) -> void } -> self
154
+ def each_key: () { (String) -> void } -> self
111
155
  | () -> Enumerator[String, self]
112
156
 
157
+ # <!-- rdoc-file=ext/dbm/dbm.c -->
113
158
  # Calls the block once for each [key, value] pair in the database. Returns self.
114
159
  #
115
- def each_pair: () { ([String, String]) -> void } -> self
116
- | () -> Enumerator[[String, String], self]
160
+ def each_pair: () { ([ String, String ]) -> void } -> self
161
+ | () -> Enumerator[[ String, String ], self]
117
162
 
163
+ # <!--
164
+ # rdoc-file=ext/dbm/dbm.c
165
+ # - dbm.each_value {|value| block} -> self
166
+ # -->
118
167
  # Calls the block once for each value string in the database. Returns self.
119
168
  #
120
169
  def each_value: () { (String) -> void } -> self
121
170
  | () -> Enumerator[String, self]
122
171
 
172
+ # <!--
173
+ # rdoc-file=ext/dbm/dbm.c
174
+ # - dbm.empty?
175
+ # -->
123
176
  # Returns true if the database is empty, false otherwise.
124
177
  #
125
178
  def empty?: () -> bool
126
179
 
180
+ # <!--
181
+ # rdoc-file=ext/dbm/dbm.c
182
+ # - dbm.fetch(key[, ifnone]) -> value
183
+ # -->
127
184
  # Return a value from the database by locating the key string provided. If the
128
185
  # key is not found, returns `ifnone`. If `ifnone` is not given, raises
129
186
  # IndexError.
130
187
  #
131
188
  def fetch: (String key, ?String ifnone) -> String
132
189
 
190
+ # <!-- rdoc-file=ext/dbm/dbm.c -->
133
191
  # Returns true if the database contains the specified key, false otherwise.
134
192
  #
135
193
  def has_key?: (String) -> bool
136
194
 
195
+ # <!--
196
+ # rdoc-file=ext/dbm/dbm.c
197
+ # - dbm.has_value?(value) -> boolean
198
+ # - dbm.value?(value) -> boolean
199
+ # -->
137
200
  # Returns true if the database contains the specified string value, false
138
201
  # otherwise.
139
202
  #
140
203
  def has_value?: () -> bool
141
204
 
205
+ # <!--
206
+ # rdoc-file=ext/dbm/dbm.c
207
+ # - dbm.include?(key) -> boolean
208
+ # - dbm.has_key?(key) -> boolean
209
+ # - dbm.member?(key) -> boolean
210
+ # - dbm.key?(key) -> boolean
211
+ # -->
142
212
  # Returns true if the database contains the specified key, false otherwise.
143
213
  #
144
214
  def include?: (String) -> bool
145
215
 
216
+ # <!--
217
+ # rdoc-file=ext/dbm/dbm.c
218
+ # - dbm.invert -> hash
219
+ # -->
146
220
  # Returns a Hash (not a DBM database) created by using each value in the
147
221
  # database as a key, with the corresponding key as its value.
148
222
  #
149
223
  def invert: () -> Hash[String, String]
150
224
 
225
+ # <!--
226
+ # rdoc-file=ext/dbm/dbm.c
227
+ # - dbm.key(value) -> string
228
+ # -->
151
229
  # Returns the key for the specified value.
152
230
  #
153
231
  def key: (String) -> String?
154
232
 
233
+ # <!-- rdoc-file=ext/dbm/dbm.c -->
155
234
  # Returns true if the database contains the specified key, false otherwise.
156
235
  #
157
236
  def key?: (String) -> bool
158
237
 
238
+ # <!--
239
+ # rdoc-file=ext/dbm/dbm.c
240
+ # - dbm.keys -> array
241
+ # -->
159
242
  # Returns an array of all the string keys in the database.
160
243
  #
161
244
  def keys: () -> Array[String]
162
245
 
246
+ # <!--
247
+ # rdoc-file=ext/dbm/dbm.c
248
+ # - dbm.length -> integer
249
+ # - dbm.size -> integer
250
+ # -->
163
251
  # Returns the number of entries in the database.
164
252
  #
165
253
  def length: () -> Integer
166
254
 
255
+ # <!-- rdoc-file=ext/dbm/dbm.c -->
167
256
  # Returns true if the database contains the specified key, false otherwise.
168
257
  #
169
258
  def member?: (String) -> bool
170
259
 
260
+ # <!--
261
+ # rdoc-file=ext/dbm/dbm.c
262
+ # - dbm.reject {|key,value| block} -> Hash
263
+ # -->
171
264
  # Converts the contents of the database to an in-memory Hash, then calls
172
265
  # Hash#reject with the specified code block, returning a new Hash.
173
266
  #
174
267
  def reject: () { (String, String) -> boolish } -> Hash[String, String]
175
268
 
269
+ # <!-- rdoc-file=ext/dbm/dbm.c -->
176
270
  # Deletes all entries for which the code block returns true. Returns self.
177
271
  #
178
272
  def reject!: () { (String, String) -> boolish } -> self
179
273
 
274
+ # <!--
275
+ # rdoc-file=ext/dbm/dbm.c
276
+ # - dbm.replace(obj)
277
+ # -->
180
278
  # Replaces the contents of the database with the contents of the specified
181
279
  # object. Takes any object which implements the each_pair method, including Hash
182
280
  # and DBM objects.
@@ -184,63 +282,98 @@ class DBM
184
282
  def replace: (_ReplaceSource) -> ::DBM
185
283
 
186
284
  interface _ReplaceSource
187
- def each_pair: () { ([String, String]) -> void } -> void
285
+ def each_pair: () { ([ String, String ]) -> void } -> void
188
286
  end
189
287
 
288
+ # <!--
289
+ # rdoc-file=ext/dbm/dbm.c
290
+ # - dbm.select {|key, value| block} -> array
291
+ # -->
190
292
  # Returns a new array consisting of the [key, value] pairs for which the code
191
293
  # block returns true.
192
294
  #
193
- def select: () { ([String, String]) -> boolish } -> Array[[String, String]]
295
+ def select: () { ([ String, String ]) -> boolish } -> Array[[ String, String ]]
194
296
 
297
+ # <!--
298
+ # rdoc-file=ext/dbm/dbm.c
299
+ # - dbm.shift() -> [key, value]
300
+ # -->
195
301
  # Removes a [key, value] pair from the database, and returns it. If the database
196
302
  # is empty, returns nil. The order in which values are removed/returned is not
197
303
  # guaranteed.
198
304
  #
199
- def shift: () -> [String, String]?
305
+ def shift: () -> [ String, String ]?
200
306
 
307
+ # <!-- rdoc-file=ext/dbm/dbm.c -->
201
308
  # Returns the number of entries in the database.
202
309
  #
203
310
  def size: () -> Integer
204
311
 
312
+ # <!-- rdoc-file=ext/dbm/dbm.c -->
205
313
  # Stores the specified string value in the database, indexed via the string key
206
314
  # provided.
207
315
  #
208
316
  def store: (String, String) -> String
209
317
 
318
+ # <!--
319
+ # rdoc-file=ext/dbm/dbm.c
320
+ # - dbm.to_a -> array
321
+ # -->
210
322
  # Converts the contents of the database to an array of [key, value] arrays, and
211
323
  # returns it.
212
324
  #
213
- def to_a: () -> Array[[String, String]]
325
+ def to_a: () -> Array[[ String, String ]]
214
326
 
327
+ # <!--
328
+ # rdoc-file=ext/dbm/dbm.c
329
+ # - dbm.to_hash -> hash
330
+ # -->
215
331
  # Converts the contents of the database to an in-memory Hash object, and returns
216
332
  # it.
217
333
  #
218
334
  def to_hash: () -> Hash[String, String]
219
335
 
336
+ # <!--
337
+ # rdoc-file=ext/dbm/dbm.c
338
+ # - dbm.update(obj)
339
+ # -->
220
340
  # Updates the database with multiple values from the specified object. Takes any
221
341
  # object which implements the each_pair method, including Hash and DBM objects.
222
342
  #
223
343
  def update: (_UpdateSource) -> ::DBM
224
344
 
225
345
  interface _UpdateSource
226
- def each_pair: () { ([String, String]) -> void } -> void
346
+ def each_pair: () { ([ String, String ]) -> void } -> void
227
347
  end
228
348
 
349
+ # <!-- rdoc-file=ext/dbm/dbm.c -->
229
350
  # Returns true if the database contains the specified string value, false
230
351
  # otherwise.
231
352
  #
232
353
  def value?: (String) -> bool
233
354
 
355
+ # <!--
356
+ # rdoc-file=ext/dbm/dbm.c
357
+ # - dbm.values -> array
358
+ # -->
234
359
  # Returns an array of all the string values in the database.
235
360
  #
236
361
  def values: () -> Array[String]
237
362
 
363
+ # <!--
364
+ # rdoc-file=ext/dbm/dbm.c
365
+ # - dbm.values_at(key, ...) -> Array
366
+ # -->
238
367
  # Returns an array containing the values associated with the given keys.
239
368
  #
240
369
  def values_at: (*String) -> Array[String]
241
370
 
242
371
  private
243
372
 
373
+ # <!--
374
+ # rdoc-file=ext/dbm/dbm.c
375
+ # - DBM.new(filename[, mode[, flags]]) -> dbm
376
+ # -->
244
377
  # Open a dbm database with the specified name, which can include a directory
245
378
  # path. Any file extensions needed will be supplied automatically by the dbm
246
379
  # library. For example, Berkeley DB appends '.db', and GNU gdbm uses two
@@ -253,17 +386,19 @@ class DBM
253
386
  def initialize: (String filename, ?Integer mode, ?Integer flags) -> void
254
387
  end
255
388
 
389
+ # <!-- rdoc-file=ext/dbm/dbm.c -->
256
390
  # Indicates that dbm_open() should open the database in read/write mode, create
257
391
  # it if it does not already exist, and delete all contents if it does already
258
392
  # exist.
259
393
  #
260
394
  DBM::NEWDB: Integer
261
395
 
396
+ # <!-- rdoc-file=ext/dbm/dbm.c -->
262
397
  # Indicates that dbm_open() should open the database in read-only mode
263
398
  #
264
- #
265
399
  DBM::READER: Integer
266
400
 
401
+ # <!-- rdoc-file=ext/dbm/dbm.c -->
267
402
  # Identifies ndbm library version.
268
403
  #
269
404
  # Examples:
@@ -274,15 +409,15 @@ DBM::READER: Integer
274
409
  # * "GDBM version 1.8.3. 10/15/2002 (built Jul 1 2011 12:32:45)"
275
410
  # * "QDBM 1.8.78"
276
411
  #
277
- #
278
412
  DBM::VERSION: String
279
413
 
414
+ # <!-- rdoc-file=ext/dbm/dbm.c -->
280
415
  # Indicates that dbm_open() should open the database in read/write mode, and
281
416
  # create it if it does not already exist
282
417
  #
283
418
  DBM::WRCREAT: Integer
284
419
 
420
+ # <!-- rdoc-file=ext/dbm/dbm.c -->
285
421
  # Indicates that dbm_open() should open the database in read/write mode
286
422
  #
287
- #
288
423
  DBM::WRITER: Integer