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/stdlib/yaml/0/store.rbs
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# <!-- rdoc-file=lib/yaml/store.rb -->
|
1
2
|
# YAML::Store provides the same functionality as PStore, except it uses YAML to
|
2
3
|
# dump objects instead of Marshal.
|
3
4
|
#
|
@@ -30,6 +31,11 @@
|
|
30
31
|
# hello: world
|
31
32
|
#
|
32
33
|
class YAML::Store < ::PStore
|
34
|
+
# <!--
|
35
|
+
# rdoc-file=lib/yaml/store.rb
|
36
|
+
# - initialize( file_name, yaml_opts = {} )
|
37
|
+
# - initialize( file_name, thread_safe = false, yaml_opts = {} )
|
38
|
+
# -->
|
33
39
|
# Creates a new YAML::Store object, which will store data in `file_name`. If the
|
34
40
|
# file does not already exist, it will be created.
|
35
41
|
#
|
data/stdlib/zlib/0/zlib.rbs
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
1
2
|
# This module provides access to the [zlib library](http://zlib.net). Zlib is
|
2
3
|
# designed to be a portable, free, general-purpose, legally unencumbered -- that
|
3
4
|
# is, not covered by any patents -- lossless data-compression library for use on
|
@@ -54,6 +55,7 @@
|
|
54
55
|
# * Zlib::MemError
|
55
56
|
# * Zlib::BufError
|
56
57
|
# * Zlib::VersionError
|
58
|
+
# * Zlib::InProgressError
|
57
59
|
#
|
58
60
|
#
|
59
61
|
#
|
@@ -66,12 +68,16 @@
|
|
66
68
|
# * Zlib::GzipFile::CRCError
|
67
69
|
# * Zlib::GzipFile::NoFooter
|
68
70
|
#
|
69
|
-
#
|
70
|
-
#
|
71
71
|
module Zlib
|
72
|
+
# <!--
|
73
|
+
# rdoc-file=ext/zlib/zlib.c
|
74
|
+
# - Zlib.adler32(string, adler)
|
75
|
+
# -->
|
72
76
|
# Calculates Adler-32 checksum for `string`, and returns updated value of
|
73
77
|
# `adler`. If `string` is omitted, it returns the Adler-32 initial value. If
|
74
|
-
# `adler` is omitted, it assumes that the initial value is given to `adler`.
|
78
|
+
# `adler` is omitted, it assumes that the initial value is given to `adler`. If
|
79
|
+
# `string` is an IO instance, reads from the IO until the IO returns nil and
|
80
|
+
# returns Adler-32 of all read data.
|
75
81
|
#
|
76
82
|
# Example usage:
|
77
83
|
#
|
@@ -85,15 +91,25 @@ module Zlib
|
|
85
91
|
| (String) -> Integer
|
86
92
|
| (String, Integer) -> Integer
|
87
93
|
|
94
|
+
# <!--
|
95
|
+
# rdoc-file=ext/zlib/zlib.c
|
96
|
+
# - Zlib.adler32_combine(adler1, adler2, len2)
|
97
|
+
# -->
|
88
98
|
# Combine two Adler-32 check values in to one. `alder1` is the first Adler-32
|
89
99
|
# value, `adler2` is the second Adler-32 value. `len2` is the length of the
|
90
100
|
# string used to generate `adler2`.
|
91
101
|
#
|
92
102
|
def self.adler32_combine: (Integer, Integer, Integer) -> Integer
|
93
103
|
|
104
|
+
# <!--
|
105
|
+
# rdoc-file=ext/zlib/zlib.c
|
106
|
+
# - Zlib.crc32(string, crc)
|
107
|
+
# -->
|
94
108
|
# Calculates CRC checksum for `string`, and returns updated value of `crc`. If
|
95
109
|
# `string` is omitted, it returns the CRC initial value. If `crc` is omitted, it
|
96
|
-
# assumes that the initial value is given to `crc`.
|
110
|
+
# assumes that the initial value is given to `crc`. If `string` is an IO
|
111
|
+
# instance, reads from the IO until the IO returns nil and returns CRC checksum
|
112
|
+
# of all read data.
|
97
113
|
#
|
98
114
|
# FIXME: expression.
|
99
115
|
#
|
@@ -101,16 +117,29 @@ module Zlib
|
|
101
117
|
| (String) -> Integer
|
102
118
|
| (String, Integer) -> Integer
|
103
119
|
|
120
|
+
# <!--
|
121
|
+
# rdoc-file=ext/zlib/zlib.c
|
122
|
+
# - Zlib.crc32_combine(crc1, crc2, len2)
|
123
|
+
# -->
|
104
124
|
# Combine two CRC-32 check values in to one. `crc1` is the first CRC-32 value,
|
105
125
|
# `crc2` is the second CRC-32 value. `len2` is the length of the string used to
|
106
126
|
# generate `crc2`.
|
107
127
|
#
|
108
128
|
def self.crc32_combine: (Integer, Integer, Integer) -> Integer
|
109
129
|
|
130
|
+
# <!--
|
131
|
+
# rdoc-file=ext/zlib/zlib.c
|
132
|
+
# - crc_table()
|
133
|
+
# -->
|
110
134
|
# Returns the table for calculating CRC checksum as an array.
|
111
135
|
#
|
112
136
|
def self.crc_table: () -> Array[Integer]
|
113
137
|
|
138
|
+
# <!--
|
139
|
+
# rdoc-file=ext/zlib/zlib.c
|
140
|
+
# - Zlib.deflate(string[, level])
|
141
|
+
# - Zlib::Deflate.deflate(string[, level])
|
142
|
+
# -->
|
114
143
|
# Compresses the given `string`. Valid values of level are Zlib::NO_COMPRESSION,
|
115
144
|
# Zlib::BEST_SPEED, Zlib::BEST_COMPRESSION, Zlib::DEFAULT_COMPRESSION, or an
|
116
145
|
# integer from 0 to 9.
|
@@ -128,6 +157,11 @@ module Zlib
|
|
128
157
|
#
|
129
158
|
def self.deflate: (String) -> String
|
130
159
|
| (String, Integer) -> String
|
160
|
+
|
161
|
+
# <!--
|
162
|
+
# rdoc-file=ext/zlib/zlib.c
|
163
|
+
# - Zlib.gunzip(src) -> String
|
164
|
+
# -->
|
131
165
|
# Decode the given gzipped `string`.
|
132
166
|
#
|
133
167
|
# This method is almost equivalent to the following code:
|
@@ -144,6 +178,10 @@ module Zlib
|
|
144
178
|
#
|
145
179
|
def self.gunzip: (String) -> String
|
146
180
|
|
181
|
+
# <!--
|
182
|
+
# rdoc-file=ext/zlib/zlib.c
|
183
|
+
# - Zlib.gzip(src, level: nil, strategy: nil) -> String
|
184
|
+
# -->
|
147
185
|
# Gzip the given `string`. Valid values of level are Zlib::NO_COMPRESSION,
|
148
186
|
# Zlib::BEST_SPEED, Zlib::BEST_COMPRESSION, Zlib::DEFAULT_COMPRESSION (default),
|
149
187
|
# or an integer from 0 to 9.
|
@@ -165,6 +203,12 @@ module Zlib
|
|
165
203
|
| (String, level: Integer) -> String
|
166
204
|
| (String, strategy: Integer) -> String
|
167
205
|
| (String, level: Integer, strategy: Integer) -> String
|
206
|
+
|
207
|
+
# <!--
|
208
|
+
# rdoc-file=ext/zlib/zlib.c
|
209
|
+
# - Zlib.inflate(string)
|
210
|
+
# - Zlib::Inflate.inflate(string)
|
211
|
+
# -->
|
168
212
|
# Decompresses `string`. Raises a Zlib::NeedDict exception if a preset
|
169
213
|
# dictionary is needed for decompression.
|
170
214
|
#
|
@@ -182,11 +226,16 @@ module Zlib
|
|
182
226
|
#
|
183
227
|
def self.inflate: (String) -> String
|
184
228
|
|
229
|
+
# <!--
|
230
|
+
# rdoc-file=ext/zlib/zlib.c
|
231
|
+
# - zlib_version()
|
232
|
+
# -->
|
185
233
|
# Returns the string which represents the version of zlib library.
|
186
234
|
#
|
187
235
|
def self.zlib_version: () -> String
|
188
236
|
end
|
189
237
|
|
238
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
190
239
|
# Represents text data as guessed by deflate.
|
191
240
|
#
|
192
241
|
# NOTE: The underlying constant Z_ASCII was deprecated in favor of Z_TEXT in
|
@@ -194,39 +243,41 @@ end
|
|
194
243
|
#
|
195
244
|
# See Zlib::Deflate#data_type.
|
196
245
|
#
|
197
|
-
#
|
198
246
|
Zlib::ASCII: Integer
|
199
247
|
|
248
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
200
249
|
# Slowest compression level, but with the best space savings.
|
201
250
|
#
|
202
|
-
#
|
203
251
|
Zlib::BEST_COMPRESSION: Integer
|
204
252
|
|
253
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
205
254
|
# Fastest compression level, but with the lowest space savings.
|
206
255
|
#
|
207
|
-
#
|
208
256
|
Zlib::BEST_SPEED: Integer
|
209
257
|
|
258
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
210
259
|
# Represents binary data as guessed by deflate.
|
211
260
|
#
|
212
261
|
# See Zlib::Deflate#data_type.
|
213
262
|
#
|
214
|
-
#
|
215
263
|
Zlib::BINARY: Integer
|
216
264
|
|
265
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
217
266
|
# Default compression level which is a good trade-off between space and time
|
218
267
|
#
|
219
268
|
Zlib::DEFAULT_COMPRESSION: Integer
|
220
269
|
|
270
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
221
271
|
# Default deflate strategy which is used for normal data.
|
222
272
|
#
|
223
|
-
#
|
224
273
|
Zlib::DEFAULT_STRATEGY: Integer
|
225
274
|
|
275
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
226
276
|
# The default memory level for allocating zlib deflate compression state.
|
227
277
|
#
|
228
278
|
Zlib::DEF_MEM_LEVEL: Integer
|
229
279
|
|
280
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
230
281
|
# Deflate strategy for data produced by a filter (or predictor). The effect of
|
231
282
|
# FILTERED is to force more Huffman codes and less string matching; it is
|
232
283
|
# somewhat intermediate between DEFAULT_STRATEGY and HUFFMAN_ONLY. Filtered data
|
@@ -234,16 +285,18 @@ Zlib::DEF_MEM_LEVEL: Integer
|
|
234
285
|
#
|
235
286
|
Zlib::FILTERED: Integer
|
236
287
|
|
288
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
237
289
|
# Processes all pending input and flushes pending output.
|
238
290
|
#
|
239
|
-
#
|
240
291
|
Zlib::FINISH: Integer
|
241
292
|
|
293
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
242
294
|
# Deflate strategy which prevents the use of dynamic Huffman codes, allowing for
|
243
295
|
# a simpler decoder for specialized applications.
|
244
296
|
#
|
245
297
|
Zlib::FIXED: Integer
|
246
298
|
|
299
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
247
300
|
# Flushes all output as with SYNC_FLUSH, and the compression state is reset so
|
248
301
|
# that decompression can restart from this point if previous compressed data has
|
249
302
|
# been damaged or if random access is desired. Like SYNC_FLUSH, using FULL_FLUSH
|
@@ -251,115 +304,121 @@ Zlib::FIXED: Integer
|
|
251
304
|
#
|
252
305
|
Zlib::FULL_FLUSH: Integer
|
253
306
|
|
307
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
254
308
|
# Deflate strategy which uses Huffman codes only (no string matching).
|
255
309
|
#
|
256
|
-
#
|
257
310
|
Zlib::HUFFMAN_ONLY: Integer
|
258
311
|
|
312
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
259
313
|
# The maximum memory level for allocating zlib deflate compression state.
|
260
314
|
#
|
261
315
|
Zlib::MAX_MEM_LEVEL: Integer
|
262
316
|
|
317
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
263
318
|
# The maximum size of the zlib history buffer. Note that zlib allows larger
|
264
319
|
# values to enable different inflate modes. See Zlib::Inflate.new for details.
|
265
320
|
#
|
266
321
|
Zlib::MAX_WBITS: Integer
|
267
322
|
|
323
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
268
324
|
# No compression, passes through data untouched. Use this for appending
|
269
325
|
# pre-compressed data to a deflate stream.
|
270
326
|
#
|
271
327
|
Zlib::NO_COMPRESSION: Integer
|
272
328
|
|
329
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
273
330
|
# NO_FLUSH is the default flush method and allows deflate to decide how much
|
274
331
|
# data to accumulate before producing output in order to maximize compression.
|
275
332
|
#
|
276
333
|
Zlib::NO_FLUSH: Integer
|
277
334
|
|
335
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
278
336
|
# OS code for Amiga hosts
|
279
337
|
#
|
280
|
-
#
|
281
338
|
Zlib::OS_AMIGA: Integer
|
282
339
|
|
340
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
283
341
|
# OS code for Atari hosts
|
284
342
|
#
|
285
|
-
#
|
286
343
|
Zlib::OS_ATARI: Integer
|
287
344
|
|
345
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
288
346
|
# The OS code of current host
|
289
347
|
#
|
290
|
-
#
|
291
348
|
Zlib::OS_CODE: Integer
|
292
349
|
|
350
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
293
351
|
# OS code for CP/M hosts
|
294
352
|
#
|
295
|
-
#
|
296
353
|
Zlib::OS_CPM: Integer
|
297
354
|
|
355
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
298
356
|
# OS code for Mac OS hosts
|
299
357
|
#
|
300
|
-
#
|
301
358
|
Zlib::OS_MACOS: Integer
|
302
359
|
|
360
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
303
361
|
# OS code for MSDOS hosts
|
304
362
|
#
|
305
|
-
#
|
306
363
|
Zlib::OS_MSDOS: Integer
|
307
364
|
|
365
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
308
366
|
# OS code for OS2 hosts
|
309
367
|
#
|
310
|
-
#
|
311
368
|
Zlib::OS_OS2: Integer
|
312
369
|
|
370
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
313
371
|
# OS code for QDOS hosts
|
314
372
|
#
|
315
|
-
#
|
316
373
|
Zlib::OS_QDOS: Integer
|
317
374
|
|
375
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
318
376
|
# OS code for RISC OS hosts
|
319
377
|
#
|
320
|
-
#
|
321
378
|
Zlib::OS_RISCOS: Integer
|
322
379
|
|
380
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
323
381
|
# OS code for TOPS-20 hosts
|
324
382
|
#
|
325
|
-
#
|
326
383
|
Zlib::OS_TOPS20: Integer
|
327
384
|
|
385
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
328
386
|
# OS code for UNIX hosts
|
329
387
|
#
|
330
|
-
#
|
331
388
|
Zlib::OS_UNIX: Integer
|
332
389
|
|
390
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
333
391
|
# OS code for unknown hosts
|
334
392
|
#
|
335
|
-
#
|
336
393
|
Zlib::OS_UNKNOWN: Integer
|
337
394
|
|
395
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
338
396
|
# OS code for VM OS hosts
|
339
397
|
#
|
340
|
-
#
|
341
398
|
Zlib::OS_VMCMS: Integer
|
342
399
|
|
400
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
343
401
|
# OS code for VMS hosts
|
344
402
|
#
|
345
|
-
#
|
346
403
|
Zlib::OS_VMS: Integer
|
347
404
|
|
405
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
348
406
|
# OS code for Win32 hosts
|
349
407
|
#
|
350
|
-
#
|
351
408
|
Zlib::OS_WIN32: Integer
|
352
409
|
|
410
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
353
411
|
# OS code for Z-System hosts
|
354
412
|
#
|
355
|
-
#
|
356
413
|
Zlib::OS_ZSYSTEM: Integer
|
357
414
|
|
415
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
358
416
|
# Deflate compression strategy designed to be almost as fast as HUFFMAN_ONLY,
|
359
417
|
# but give better compression for PNG image data.
|
360
418
|
#
|
361
419
|
Zlib::RLE: Integer
|
362
420
|
|
421
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
363
422
|
# The SYNC_FLUSH method flushes all pending output to the output buffer and the
|
364
423
|
# output is aligned on a byte boundary. Flushing may degrade compression so it
|
365
424
|
# should be used only when necessary, such as at a request or response boundary
|
@@ -367,26 +426,26 @@ Zlib::RLE: Integer
|
|
367
426
|
#
|
368
427
|
Zlib::SYNC_FLUSH: Integer
|
369
428
|
|
429
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
370
430
|
# Represents text data as guessed by deflate.
|
371
431
|
#
|
372
432
|
# See Zlib::Deflate#data_type.
|
373
433
|
#
|
374
|
-
#
|
375
434
|
Zlib::TEXT: Integer
|
376
435
|
|
436
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
377
437
|
# Represents an unknown data type as guessed by deflate.
|
378
438
|
#
|
379
439
|
# See Zlib::Deflate#data_type.
|
380
440
|
#
|
381
|
-
#
|
382
441
|
Zlib::UNKNOWN: Integer
|
383
442
|
|
443
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
384
444
|
# The Ruby/zlib version string.
|
385
445
|
#
|
386
|
-
#
|
387
446
|
Zlib::VERSION: String
|
388
447
|
|
448
|
+
# <!-- rdoc-file=ext/zlib/zlib.c -->
|
389
449
|
# The string which represents the version of zlib.h
|
390
450
|
#
|
391
|
-
#
|
392
451
|
Zlib::ZLIB_VERSION: String
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soutaro Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: RBS is the language for type signatures for Ruby and standard library
|
14
14
|
definitions.
|
@@ -59,6 +59,7 @@ files:
|
|
59
59
|
- core/hash.rbs
|
60
60
|
- core/integer.rbs
|
61
61
|
- core/io.rbs
|
62
|
+
- core/io/buffer.rbs
|
62
63
|
- core/io/wait.rbs
|
63
64
|
- core/kernel.rbs
|
64
65
|
- core/marshal.rbs
|
@@ -77,6 +78,7 @@ files:
|
|
77
78
|
- core/range.rbs
|
78
79
|
- core/rational.rbs
|
79
80
|
- core/rb_config.rbs
|
81
|
+
- core/refinement.rbs
|
80
82
|
- core/regexp.rbs
|
81
83
|
- core/ruby_vm.rbs
|
82
84
|
- core/signal.rbs
|
@@ -120,6 +122,11 @@ files:
|
|
120
122
|
- goodcheck.yml
|
121
123
|
- lib/rbs.rb
|
122
124
|
- lib/rbs/ancestor_graph.rb
|
125
|
+
- lib/rbs/annotate.rb
|
126
|
+
- lib/rbs/annotate/annotations.rb
|
127
|
+
- lib/rbs/annotate/formatter.rb
|
128
|
+
- lib/rbs/annotate/rdoc_annotator.rb
|
129
|
+
- lib/rbs/annotate/rdoc_source.rb
|
123
130
|
- lib/rbs/ast/annotation.rb
|
124
131
|
- lib/rbs/ast/comment.rb
|
125
132
|
- lib/rbs/ast/declarations.rb
|
@@ -149,7 +156,6 @@ files:
|
|
149
156
|
- lib/rbs/environment_walker.rb
|
150
157
|
- lib/rbs/errors.rb
|
151
158
|
- lib/rbs/factory.rb
|
152
|
-
- lib/rbs/location.rb
|
153
159
|
- lib/rbs/location_aux.rb
|
154
160
|
- lib/rbs/locator.rb
|
155
161
|
- lib/rbs/method_type.rb
|
@@ -196,6 +202,10 @@ files:
|
|
196
202
|
- schema/types.json
|
197
203
|
- sig/ancestor_builder.rbs
|
198
204
|
- sig/ancestor_graph.rbs
|
205
|
+
- sig/annotate/annotations.rbs
|
206
|
+
- sig/annotate/formatter.rbs
|
207
|
+
- sig/annotate/rdoc_annotater.rbs
|
208
|
+
- sig/annotate/rdoc_source.rbs
|
199
209
|
- sig/annotation.rbs
|
200
210
|
- sig/buffer.rbs
|
201
211
|
- sig/builtin_names.rbs
|
@@ -203,9 +213,9 @@ files:
|
|
203
213
|
- sig/cli.rbs
|
204
214
|
- sig/collection.rbs
|
205
215
|
- sig/collection/cleaner.rbs
|
206
|
-
- sig/collection/collections.rbs
|
207
216
|
- sig/collection/config.rbs
|
208
217
|
- sig/collection/installer.rbs
|
218
|
+
- sig/collection/sources.rbs
|
209
219
|
- sig/comment.rbs
|
210
220
|
- sig/constant.rbs
|
211
221
|
- sig/constant_table.rbs
|
@@ -240,6 +250,7 @@ files:
|
|
240
250
|
- sig/version.rbs
|
241
251
|
- sig/writer.rbs
|
242
252
|
- stdlib/abbrev/0/abbrev.rbs
|
253
|
+
- stdlib/abbrev/0/array.rbs
|
243
254
|
- stdlib/base64/0/base64.rbs
|
244
255
|
- stdlib/benchmark/0/benchmark.rbs
|
245
256
|
- stdlib/bigdecimal-math/0/big_math.rbs
|
@@ -271,6 +282,7 @@ files:
|
|
271
282
|
- stdlib/mutex_m/0/mutex_m.rbs
|
272
283
|
- stdlib/net-http/0/manifest.yaml
|
273
284
|
- stdlib/net-http/0/net-http.rbs
|
285
|
+
- stdlib/nkf/0/nkf.rbs
|
274
286
|
- stdlib/objspace/0/objspace.rbs
|
275
287
|
- stdlib/openssl/0/manifest.yaml
|
276
288
|
- stdlib/openssl/0/openssl.rbs
|
@@ -361,7 +373,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
361
373
|
- !ruby/object:Gem::Version
|
362
374
|
version: '0'
|
363
375
|
requirements: []
|
364
|
-
rubygems_version: 3.
|
376
|
+
rubygems_version: 3.3.6
|
365
377
|
signing_key:
|
366
378
|
specification_version: 4
|
367
379
|
summary: Type signature for Ruby.
|
data/lib/rbs/location.rb
DELETED
@@ -1,221 +0,0 @@
|
|
1
|
-
# module RBS
|
2
|
-
# class Location
|
3
|
-
# attr_reader :buffer
|
4
|
-
# attr_reader :start_pos
|
5
|
-
# attr_reader :end_pos
|
6
|
-
|
7
|
-
# def initialize(buffer, start_pos, end_pos)
|
8
|
-
# @buffer = buffer
|
9
|
-
# @start_pos = start_pos
|
10
|
-
# @end_pos = end_pos
|
11
|
-
# end
|
12
|
-
|
13
|
-
# # def self.new(buffer_ = nil, start_pos_ = nil, end_pos_ = nil)
|
14
|
-
# # __skip__ = super(buffer_, start_pos_, end_pos_)
|
15
|
-
# # end
|
16
|
-
|
17
|
-
# # def inspect
|
18
|
-
# # "#<#{self.class}:#{self.__id__} @buffer=#{buffer.name}, @pos=#{start_pos}...#{end_pos}, source='#{source.lines.first}', start_line=#{start_line}, start_column=#{start_column}>"
|
19
|
-
# # end
|
20
|
-
|
21
|
-
# def name
|
22
|
-
# buffer.name
|
23
|
-
# end
|
24
|
-
|
25
|
-
# def start_line
|
26
|
-
# start_loc[0]
|
27
|
-
# end
|
28
|
-
|
29
|
-
# def start_column
|
30
|
-
# start_loc[1]
|
31
|
-
# end
|
32
|
-
|
33
|
-
# def end_line
|
34
|
-
# end_loc[0]
|
35
|
-
# end
|
36
|
-
|
37
|
-
# def end_column
|
38
|
-
# end_loc[1]
|
39
|
-
# end
|
40
|
-
|
41
|
-
# def start_loc
|
42
|
-
# @start_loc ||= buffer.pos_to_loc(start_pos)
|
43
|
-
# end
|
44
|
-
|
45
|
-
# def end_loc
|
46
|
-
# @end_loc ||= buffer.pos_to_loc(end_pos)
|
47
|
-
# end
|
48
|
-
|
49
|
-
# def range
|
50
|
-
# start_pos...end_pos
|
51
|
-
# end
|
52
|
-
|
53
|
-
# def source
|
54
|
-
# @source ||= buffer.content[start_pos...end_pos] or raise
|
55
|
-
# end
|
56
|
-
|
57
|
-
# def to_s
|
58
|
-
# "#{name || "-"}:#{start_line}:#{start_column}...#{end_line}:#{end_column}"
|
59
|
-
# end
|
60
|
-
|
61
|
-
# def self.to_string(location, default: "*:*:*...*:*")
|
62
|
-
# location&.to_s || default
|
63
|
-
# end
|
64
|
-
|
65
|
-
# def ==(other)
|
66
|
-
# other.is_a?(Location) &&
|
67
|
-
# other.buffer == buffer &&
|
68
|
-
# other.start_pos == start_pos &&
|
69
|
-
# other.end_pos == end_pos
|
70
|
-
# end
|
71
|
-
|
72
|
-
# def +(other)
|
73
|
-
# if other
|
74
|
-
# raise "Invalid concat: buffer=#{buffer.name}, other.buffer=#{other.buffer.name}" unless other.buffer == buffer
|
75
|
-
|
76
|
-
# self.class.new(buffer: buffer,
|
77
|
-
# start_pos: start_pos,
|
78
|
-
# end_pos: other.end_pos)
|
79
|
-
# else
|
80
|
-
# self
|
81
|
-
# end
|
82
|
-
# end
|
83
|
-
|
84
|
-
# def concat(*others)
|
85
|
-
# others.each { |other| self << other }
|
86
|
-
# self
|
87
|
-
# end
|
88
|
-
|
89
|
-
# def <<(other)
|
90
|
-
# if other
|
91
|
-
# raise "Invalid concat: buffer=#{buffer.name}, other.buffer=#{other.buffer.name}" unless other.buffer == buffer
|
92
|
-
# @end_pos = other.end_pos
|
93
|
-
# @source = nil
|
94
|
-
# @end_loc = nil
|
95
|
-
# end
|
96
|
-
# self
|
97
|
-
# end
|
98
|
-
|
99
|
-
# def pred?(loc)
|
100
|
-
# loc.is_a?(Location) &&
|
101
|
-
# loc.name == name &&
|
102
|
-
# loc.start_pos == end_pos
|
103
|
-
# end
|
104
|
-
|
105
|
-
# def to_json(state = _ = nil)
|
106
|
-
# {
|
107
|
-
# start: {
|
108
|
-
# line: start_line,
|
109
|
-
# column: start_column
|
110
|
-
# },
|
111
|
-
# end: {
|
112
|
-
# line: end_line,
|
113
|
-
# column: end_column
|
114
|
-
# },
|
115
|
-
# buffer: {
|
116
|
-
# name: name&.to_s
|
117
|
-
# }
|
118
|
-
# }.to_json(state)
|
119
|
-
# end
|
120
|
-
|
121
|
-
# def with_children(required: {}, optional: {})
|
122
|
-
# # @type var required: Hash[Symbol, Range[Integer] | Location]
|
123
|
-
# # @type var optional: Hash[Symbol, Range[Integer] | Location | nil]
|
124
|
-
|
125
|
-
# this = WithChildren.new(buffer: buffer, start_pos: start_pos, end_pos: end_pos)
|
126
|
-
|
127
|
-
# req = required.transform_values do |value|
|
128
|
-
# case value
|
129
|
-
# when Location
|
130
|
-
# value.range
|
131
|
-
# else
|
132
|
-
# value
|
133
|
-
# end
|
134
|
-
# end
|
135
|
-
|
136
|
-
# opt = optional.transform_values do |value|
|
137
|
-
# case value
|
138
|
-
# when Location
|
139
|
-
# value.range
|
140
|
-
# else
|
141
|
-
# value
|
142
|
-
# end
|
143
|
-
# end
|
144
|
-
|
145
|
-
# this.required_children.merge!(req)
|
146
|
-
# this.optional_children.merge!(opt)
|
147
|
-
|
148
|
-
# this
|
149
|
-
# end
|
150
|
-
|
151
|
-
# class WithChildren < Location
|
152
|
-
# attr_reader :required_children, :optional_children
|
153
|
-
|
154
|
-
# def initialize(buffer, start_pos, end_pos)
|
155
|
-
# super(buffer, start_pos, end_pos)
|
156
|
-
|
157
|
-
# @optional_children = {}
|
158
|
-
# @required_children = {}
|
159
|
-
# end
|
160
|
-
|
161
|
-
# def initialize_copy(from)
|
162
|
-
# required_children.merge!(from.required_children)
|
163
|
-
# optional_children.merge!(from.optional_children)
|
164
|
-
# self
|
165
|
-
# end
|
166
|
-
|
167
|
-
# def [](key)
|
168
|
-
# case
|
169
|
-
# when required_children.key?(_ = key)
|
170
|
-
# range = required_children[_ = key]
|
171
|
-
# Location.new(buffer: buffer, start_pos: range.begin, end_pos: range.end)
|
172
|
-
# when optional_children.key?(_ = key)
|
173
|
-
# range = required_children[_ = key] || optional_children[_ = key]
|
174
|
-
# if range
|
175
|
-
# Location.new(buffer: buffer, start_pos: range.begin, end_pos: range.end)
|
176
|
-
# end
|
177
|
-
# else
|
178
|
-
# raise "Unknown key given: `#{key}`"
|
179
|
-
# end
|
180
|
-
# end
|
181
|
-
|
182
|
-
# def merge_required(hash)
|
183
|
-
# this = dup
|
184
|
-
|
185
|
-
# h = hash.transform_values do |value|
|
186
|
-
# case value
|
187
|
-
# when Range
|
188
|
-
# value
|
189
|
-
# when Location
|
190
|
-
# value.range
|
191
|
-
# else
|
192
|
-
# raise
|
193
|
-
# end
|
194
|
-
# end
|
195
|
-
|
196
|
-
# this.required_children.merge!(h)
|
197
|
-
|
198
|
-
# this
|
199
|
-
# end
|
200
|
-
|
201
|
-
# def merge_optional(hash)
|
202
|
-
# this = dup
|
203
|
-
|
204
|
-
# h = hash.transform_values do |value|
|
205
|
-
# case value
|
206
|
-
# when Range
|
207
|
-
# value
|
208
|
-
# when Location
|
209
|
-
# value.range
|
210
|
-
# else
|
211
|
-
# nil
|
212
|
-
# end
|
213
|
-
# end
|
214
|
-
|
215
|
-
# this.optional_children.merge!(h)
|
216
|
-
|
217
|
-
# this
|
218
|
-
# end
|
219
|
-
# end
|
220
|
-
# end
|
221
|
-
# end
|