rbs 3.9.5 → 3.10.0.pre.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.clang-format +74 -0
- data/.clangd +2 -0
- data/.github/workflows/c-check.yml +54 -0
- data/.github/workflows/comments.yml +3 -3
- data/.github/workflows/ruby.yml +34 -19
- data/.github/workflows/typecheck.yml +1 -1
- data/.github/workflows/windows.yml +1 -1
- data/.gitignore +4 -0
- data/README.md +38 -1
- data/Rakefile +152 -23
- data/config.yml +190 -62
- data/core/array.rbs +44 -43
- data/core/dir.rbs +2 -2
- data/core/encoding.rbs +3 -2
- data/core/enumerable.rbs +89 -2
- data/core/errno.rbs +8 -0
- data/core/errors.rbs +28 -1
- data/core/exception.rbs +2 -2
- data/core/fiber.rbs +3 -3
- data/core/file.rbs +26 -11
- data/core/float.rbs +1 -1
- data/core/gc.rbs +422 -281
- data/core/hash.rbs +1024 -727
- data/core/io/wait.rbs +11 -33
- data/core/io.rbs +6 -4
- data/core/kernel.rbs +49 -43
- data/core/marshal.rbs +1 -1
- data/core/match_data.rbs +1 -1
- data/core/math.rbs +42 -3
- data/core/method.rbs +14 -6
- data/core/module.rbs +71 -11
- data/core/nil_class.rbs +3 -3
- data/core/numeric.rbs +8 -8
- data/core/object.rbs +3 -3
- data/core/object_space.rbs +13 -0
- data/{stdlib/pathname/0 → core}/pathname.rbs +253 -352
- data/core/proc.rbs +15 -8
- data/core/process.rbs +2 -2
- data/core/ractor.rbs +278 -437
- data/core/range.rbs +6 -7
- data/core/rbs/unnamed/argf.rbs +1 -1
- data/core/rbs/unnamed/env_class.rbs +1 -1
- data/core/rbs/unnamed/random.rbs +4 -2
- data/core/regexp.rbs +22 -17
- data/core/ruby_vm.rbs +6 -4
- data/core/rubygems/errors.rbs +3 -70
- data/core/rubygems/rubygems.rbs +11 -79
- data/core/set.rbs +439 -332
- data/core/string.rbs +2897 -1117
- data/core/struct.rbs +1 -1
- data/core/symbol.rbs +4 -4
- data/core/thread.rbs +83 -20
- data/core/time.rbs +35 -9
- data/core/unbound_method.rbs +14 -6
- data/docs/aliases.md +79 -0
- data/docs/collection.md +2 -2
- data/docs/gem.md +0 -1
- data/docs/sigs.md +3 -3
- data/ext/rbs_extension/ast_translation.c +1016 -0
- data/ext/rbs_extension/ast_translation.h +37 -0
- data/ext/rbs_extension/class_constants.c +157 -0
- data/{include/rbs/constants.h → ext/rbs_extension/class_constants.h} +7 -1
- data/ext/rbs_extension/compat.h +10 -0
- data/ext/rbs_extension/extconf.rb +25 -1
- data/ext/rbs_extension/legacy_location.c +317 -0
- data/ext/rbs_extension/legacy_location.h +45 -0
- data/ext/rbs_extension/main.c +365 -14
- data/ext/rbs_extension/rbs_extension.h +6 -21
- data/ext/rbs_extension/rbs_string_bridging.c +9 -0
- data/ext/rbs_extension/rbs_string_bridging.h +24 -0
- data/include/rbs/ast.h +687 -0
- data/include/rbs/defines.h +86 -0
- data/include/rbs/lexer.h +199 -0
- data/include/rbs/location.h +59 -0
- data/include/rbs/parser.h +135 -0
- data/include/rbs/string.h +49 -0
- data/include/rbs/util/rbs_allocator.h +59 -0
- data/include/rbs/util/rbs_assert.h +20 -0
- data/include/rbs/util/rbs_buffer.h +83 -0
- data/include/rbs/util/rbs_constant_pool.h +6 -67
- data/include/rbs/util/rbs_encoding.h +282 -0
- data/include/rbs/util/rbs_unescape.h +23 -0
- data/include/rbs.h +1 -2
- data/lib/rbs/annotate/formatter.rb +3 -13
- data/lib/rbs/annotate/rdoc_annotator.rb +3 -1
- data/lib/rbs/annotate/rdoc_source.rb +1 -1
- data/lib/rbs/cli/validate.rb +2 -2
- data/lib/rbs/cli.rb +1 -1
- data/lib/rbs/collection/config/lockfile_generator.rb +1 -0
- data/lib/rbs/definition_builder/ancestor_builder.rb +5 -5
- data/lib/rbs/environment.rb +64 -59
- data/lib/rbs/environment_loader.rb +1 -1
- data/lib/rbs/errors.rb +1 -1
- data/lib/rbs/parser_aux.rb +5 -0
- data/lib/rbs/resolver/constant_resolver.rb +2 -2
- data/lib/rbs/resolver/type_name_resolver.rb +124 -38
- data/lib/rbs/test/type_check.rb +13 -0
- data/lib/rbs/types.rb +3 -1
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs.rb +1 -1
- data/lib/rdoc/discover.rb +1 -1
- data/lib/rdoc_plugin/parser.rb +3 -3
- data/sig/annotate/formatter.rbs +2 -2
- data/sig/annotate/rdoc_annotater.rbs +1 -1
- data/sig/environment.rbs +57 -6
- data/sig/manifest.yaml +0 -1
- data/sig/parser.rbs +20 -0
- data/sig/resolver/type_name_resolver.rbs +38 -7
- data/sig/types.rbs +4 -1
- data/src/ast.c +1256 -0
- data/src/lexer.c +2956 -0
- data/src/lexer.re +147 -0
- data/src/lexstate.c +205 -0
- data/src/location.c +71 -0
- data/src/parser.c +3495 -0
- data/src/string.c +90 -0
- data/src/util/rbs_allocator.c +152 -0
- data/src/util/rbs_assert.c +21 -0
- data/src/util/rbs_buffer.c +54 -0
- data/src/util/rbs_constant_pool.c +16 -86
- data/src/util/rbs_encoding.c +21308 -0
- data/src/util/rbs_unescape.c +131 -0
- data/stdlib/cgi/0/core.rbs +2 -396
- data/stdlib/cgi/0/manifest.yaml +1 -0
- data/stdlib/cgi-escape/0/escape.rbs +153 -0
- data/stdlib/coverage/0/coverage.rbs +3 -1
- data/stdlib/delegate/0/delegator.rbs +10 -7
- data/stdlib/erb/0/erb.rbs +737 -347
- data/stdlib/fileutils/0/fileutils.rbs +18 -13
- data/stdlib/forwardable/0/forwardable.rbs +3 -0
- data/stdlib/json/0/json.rbs +67 -48
- data/stdlib/net-http/0/net-http.rbs +3 -0
- data/stdlib/objspace/0/objspace.rbs +8 -3
- data/stdlib/open-uri/0/open-uri.rbs +40 -0
- data/stdlib/openssl/0/openssl.rbs +182 -149
- data/stdlib/optparse/0/optparse.rbs +3 -3
- data/stdlib/rdoc/0/code_object.rbs +2 -2
- data/stdlib/rdoc/0/comment.rbs +2 -0
- data/stdlib/rdoc/0/options.rbs +76 -0
- data/stdlib/rdoc/0/rdoc.rbs +7 -5
- data/stdlib/rdoc/0/store.rbs +1 -1
- data/stdlib/resolv/0/resolv.rbs +25 -68
- data/stdlib/ripper/0/ripper.rbs +5 -2
- data/stdlib/singleton/0/singleton.rbs +3 -0
- data/stdlib/socket/0/socket.rbs +13 -1
- data/stdlib/socket/0/tcp_socket.rbs +10 -2
- data/stdlib/stringio/0/stringio.rbs +412 -80
- data/stdlib/strscan/0/string_scanner.rbs +31 -31
- data/stdlib/tempfile/0/tempfile.rbs +1 -1
- data/stdlib/tsort/0/cyclic.rbs +3 -0
- data/stdlib/uri/0/common.rbs +11 -2
- data/stdlib/uri/0/file.rbs +1 -1
- data/stdlib/uri/0/generic.rbs +16 -15
- data/stdlib/uri/0/rfc2396_parser.rbs +6 -7
- data/stdlib/zlib/0/zstream.rbs +1 -0
- metadata +41 -18
- data/ext/rbs_extension/lexer.c +0 -2728
- data/ext/rbs_extension/lexer.h +0 -179
- data/ext/rbs_extension/lexer.re +0 -147
- data/ext/rbs_extension/lexstate.c +0 -175
- data/ext/rbs_extension/location.c +0 -325
- data/ext/rbs_extension/location.h +0 -85
- data/ext/rbs_extension/parser.c +0 -2982
- data/ext/rbs_extension/parser.h +0 -18
- data/ext/rbs_extension/parserstate.c +0 -411
- data/ext/rbs_extension/parserstate.h +0 -163
- data/ext/rbs_extension/unescape.c +0 -32
- data/include/rbs/ruby_objs.h +0 -72
- data/src/constants.c +0 -153
- data/src/ruby_objs.c +0 -799
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
# * `match_values_cleared?(scanner)`:
|
|
29
29
|
# Returns whether the scanner's [match
|
|
30
30
|
# values](rdoc-ref:StringScanner@Match+Values) are cleared.
|
|
31
|
-
# See examples [
|
|
31
|
+
# See examples at [helper methods](doc/strscan/helper_methods.md).
|
|
32
32
|
# ## The `StringScanner` Object
|
|
33
33
|
# This code creates a `StringScanner` object
|
|
34
34
|
# (we'll call it simply a *scanner*),
|
|
@@ -85,10 +85,10 @@
|
|
|
85
85
|
# and a zero-based *character position*.
|
|
86
86
|
# Each of these methods explicitly sets positions:
|
|
87
87
|
# Method | Effect
|
|
88
|
-
#
|
|
89
|
-
# #reset |Sets both positions to zero (
|
|
88
|
+
# ------------------------|---------------------------------------------------------
|
|
89
|
+
# #reset |Sets both positions to zero (beginning of stored string).
|
|
90
90
|
# #terminate | Sets both positions to the end of the stored string.
|
|
91
|
-
# #pos=(new_byte_position)|
|
|
91
|
+
# #pos=(new_byte_position)| Sets byte position; adjusts character position.
|
|
92
92
|
# ### Byte Position (Position)
|
|
93
93
|
# The byte position (or simply *position*)
|
|
94
94
|
# is a zero-based index into the bytes in the scanner's stored string;
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
# # rest_size: 12
|
|
160
160
|
#
|
|
161
161
|
# ## Target Substring
|
|
162
|
-
# The target substring is the
|
|
162
|
+
# The target substring is the part of the [stored
|
|
163
163
|
# string](rdoc-ref:StringScanner@Stored+String)
|
|
164
164
|
# that extends from the current [byte
|
|
165
165
|
# position](rdoc-ref:StringScanner@Byte+Position+-28Position-29) to the end of
|
|
@@ -211,12 +211,12 @@
|
|
|
211
211
|
# This table summarizes (details and examples at the links):
|
|
212
212
|
# Method | Returns |Sets Match Values?
|
|
213
213
|
# ---------------------|---------------------------------------------|------------------
|
|
214
|
-
# #check(pattern) | Matched leading substring or
|
|
215
|
-
# #check_until(pattern)| Matched substring (anywhere) or
|
|
214
|
+
# #check(pattern) | Matched leading substring or `nil`. | Yes.
|
|
215
|
+
# #check_until(pattern)| Matched substring (anywhere) or `nil`. | Yes.
|
|
216
216
|
# #exist?(pattern) | Matched substring (anywhere) end index. | Yes.
|
|
217
|
-
# #match?(pattern) | Size of matched leading substring or
|
|
217
|
+
# #match?(pattern) | Size of matched leading substring or `nil`. | Yes.
|
|
218
218
|
# #peek(size) | Leading substring of given length (bytes). | No.
|
|
219
|
-
# #peek_byte | Integer leading byte or
|
|
219
|
+
# #peek_byte | Integer leading byte or `nil`. | No.
|
|
220
220
|
# #rest |Target substring (from byte position to end).| No.
|
|
221
221
|
# ### Traversing the Target Substring
|
|
222
222
|
# A *traversal* method examines the target substring,
|
|
@@ -226,24 +226,24 @@
|
|
|
226
226
|
# This table summarizes (details and examples at links):
|
|
227
227
|
# Method | Returns |Sets Match Values?
|
|
228
228
|
# --------------------|----------------------------------------------------|------------------
|
|
229
|
-
# #get_byte | Leading byte or
|
|
230
|
-
# #getch | Leading character or
|
|
231
|
-
# #scan(pattern) | Matched leading substring or
|
|
232
|
-
# #scan_byte | Integer leading byte or
|
|
233
|
-
# #scan_until(pattern)| Matched substring (anywhere) or
|
|
234
|
-
# #skip(pattern) | Matched leading substring size or
|
|
235
|
-
# #skip_until(pattern)|Position delta to end-of-matched-substring or
|
|
236
|
-
# #unscan |
|
|
229
|
+
# #get_byte | Leading byte or `nil`. | No.
|
|
230
|
+
# #getch | Leading character or `nil`. | No.
|
|
231
|
+
# #scan(pattern) | Matched leading substring or `nil`. | Yes.
|
|
232
|
+
# #scan_byte | Integer leading byte or `nil`. | No.
|
|
233
|
+
# #scan_until(pattern)| Matched substring (anywhere) or `nil`. | Yes.
|
|
234
|
+
# #skip(pattern) | Matched leading substring size or `nil`. | Yes.
|
|
235
|
+
# #skip_until(pattern)|Position delta to end-of-matched-substring or `nil`.| Yes.
|
|
236
|
+
# #unscan | `self`. | No.
|
|
237
237
|
# ## Querying the Scanner
|
|
238
238
|
# Each of these methods queries the scanner object
|
|
239
239
|
# without modifying it (details and examples at links)
|
|
240
240
|
# Method | Returns
|
|
241
241
|
# -------------------|--------------------------------
|
|
242
|
-
# #beginning_of_line?|
|
|
242
|
+
# #beginning_of_line?| `true` or `false`.
|
|
243
243
|
# #charpos | Character position.
|
|
244
|
-
# #eos? |
|
|
245
|
-
# #fixed_anchor? |
|
|
246
|
-
# #inspect |String representation of
|
|
244
|
+
# #eos? | `true` or `false`.
|
|
245
|
+
# #fixed_anchor? | `true` or `false`.
|
|
246
|
+
# #inspect |String representation of `self`.
|
|
247
247
|
# #pos | Byte position.
|
|
248
248
|
# #rest | Target substring.
|
|
249
249
|
# #rest_size | Size of target substring.
|
|
@@ -312,11 +312,11 @@
|
|
|
312
312
|
# Each of these methods returns a basic match value:
|
|
313
313
|
# Method | Return After Match |Return After No Match
|
|
314
314
|
# -------------|--------------------------------------|---------------------
|
|
315
|
-
# #matched? |
|
|
316
|
-
# #matched_size| Size of matched substring. |
|
|
317
|
-
# #matched | Matched substring. |
|
|
318
|
-
# #pre_match |Substring preceding matched substring.|
|
|
319
|
-
# #post_match |Substring following matched substring.|
|
|
315
|
+
# #matched? | `true`. | `false`.
|
|
316
|
+
# #matched_size| Size of matched substring. | `nil`.
|
|
317
|
+
# #matched | Matched substring. | `nil`.
|
|
318
|
+
# #pre_match |Substring preceding matched substring.| `nil`.
|
|
319
|
+
# #post_match |Substring following matched substring.| `nil`.
|
|
320
320
|
#
|
|
321
321
|
# See examples below.
|
|
322
322
|
# #### Captured Match Values
|
|
@@ -326,11 +326,11 @@
|
|
|
326
326
|
# Each of these methods returns a captured match value:
|
|
327
327
|
# Method | Return After Match |Return After No Match
|
|
328
328
|
# ---------------|---------------------------------------|---------------------
|
|
329
|
-
# #size | Count of captured substrings. |
|
|
330
|
-
# #[](n) |
|
|
331
|
-
# #captures | Array of all captured substrings. |
|
|
332
|
-
# #values_at(*n) |Array of specified captured substrings.|
|
|
333
|
-
# #named_captures| Hash of named captures. |
|
|
329
|
+
# #size | Count of captured substrings. | `nil`.
|
|
330
|
+
# #[](n) | `n`th captured substring. | `nil`.
|
|
331
|
+
# #captures | Array of all captured substrings. | `nil`.
|
|
332
|
+
# #values_at(*n) |Array of specified captured substrings.| `nil`.
|
|
333
|
+
# #named_captures| Hash of named captures. | `{}`.
|
|
334
334
|
#
|
|
335
335
|
# See examples below.
|
|
336
336
|
# #### Match Values Examples
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
# require 'tempfile'
|
|
20
20
|
#
|
|
21
21
|
# # Tempfile.create with a block
|
|
22
|
-
# # The filename are
|
|
22
|
+
# # The filename are chosen automatically.
|
|
23
23
|
# # (You can specify the prefix and suffix of the filename by an optional argument.)
|
|
24
24
|
# Tempfile.create {|f|
|
|
25
25
|
# f.puts "foo"
|
data/stdlib/tsort/0/cyclic.rbs
CHANGED
data/stdlib/uri/0/common.rbs
CHANGED
|
@@ -420,8 +420,8 @@ module URI
|
|
|
420
420
|
# URI.parse('http://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top')
|
|
421
421
|
# # => #<URI::HTTP http://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top>
|
|
422
422
|
#
|
|
423
|
-
# It's recommended to first ::escape string `uri` if it may
|
|
424
|
-
# characters.
|
|
423
|
+
# It's recommended to first URI::RFC2396_PARSER.escape string `uri` if it may
|
|
424
|
+
# contain invalid URI characters.
|
|
425
425
|
#
|
|
426
426
|
def self.parse: (_ToStr uri) -> (File | FTP | HTTP | HTTPS | LDAP | LDAPS | MailTo | WS | WSS | Generic)
|
|
427
427
|
|
|
@@ -535,6 +535,9 @@ URI::ABS_URI: Regexp
|
|
|
535
535
|
|
|
536
536
|
URI::ABS_URI_REF: Regexp
|
|
537
537
|
|
|
538
|
+
# <!-- rdoc-file=lib/uri/common.rb -->
|
|
539
|
+
# The default parser instance.
|
|
540
|
+
#
|
|
538
541
|
URI::DEFAULT_PARSER: URI::RFC2396_Parser
|
|
539
542
|
|
|
540
543
|
URI::ESCAPED: Regexp
|
|
@@ -557,6 +560,9 @@ URI::REL_URI: Regexp
|
|
|
557
560
|
|
|
558
561
|
URI::REL_URI_REF: Regexp
|
|
559
562
|
|
|
563
|
+
# <!-- rdoc-file=lib/uri/common.rb -->
|
|
564
|
+
# The default parser instance for RFC 3986.
|
|
565
|
+
#
|
|
560
566
|
URI::RFC3986_PARSER: URI::RFC3986_Parser
|
|
561
567
|
|
|
562
568
|
URI::SCHEME: Regexp
|
|
@@ -588,6 +594,7 @@ module Kernel
|
|
|
588
594
|
# Returns a URI object derived from the given `uri`, which may be a URI string
|
|
589
595
|
# or an existing URI object:
|
|
590
596
|
#
|
|
597
|
+
# require 'uri'
|
|
591
598
|
# # Returns a new URI.
|
|
592
599
|
# uri = URI('http://github.com/ruby/ruby')
|
|
593
600
|
# # => #<URI::HTTP http://github.com/ruby/ruby>
|
|
@@ -595,5 +602,7 @@ module Kernel
|
|
|
595
602
|
# URI(uri)
|
|
596
603
|
# # => #<URI::HTTP http://github.com/ruby/ruby>
|
|
597
604
|
#
|
|
605
|
+
# You must require 'uri' to use this method.
|
|
606
|
+
#
|
|
598
607
|
def self?.URI: (URI::Generic | String uri) -> URI::Generic
|
|
599
608
|
end
|
data/stdlib/uri/0/file.rbs
CHANGED
|
@@ -43,7 +43,7 @@ module URI
|
|
|
43
43
|
# :path => '/ruby/src'})
|
|
44
44
|
# uri2.to_s # => "file://host.example.com/ruby/src"
|
|
45
45
|
#
|
|
46
|
-
# uri3 = URI::File.build({:path => URI::escape('/path/my file.txt')})
|
|
46
|
+
# uri3 = URI::File.build({:path => URI::RFC2396_PARSER.escape('/path/my file.txt')})
|
|
47
47
|
# uri3.to_s # => "file:///path/my%20file.txt"
|
|
48
48
|
#
|
|
49
49
|
def self.build: (Array[String] args) -> URI::File
|
data/stdlib/uri/0/generic.rbs
CHANGED
|
@@ -145,7 +145,7 @@ module URI
|
|
|
145
145
|
#
|
|
146
146
|
# At first, tries to create a new URI::Generic instance using
|
|
147
147
|
# URI::Generic::build. But, if exception URI::InvalidComponentError is raised,
|
|
148
|
-
# then it does URI::
|
|
148
|
+
# then it does URI::RFC2396_PARSER.escape all URI components and tries again.
|
|
149
149
|
#
|
|
150
150
|
def self.build2: (Array[nil | String | Integer]) -> URI::Generic
|
|
151
151
|
| ({ scheme: String?, userinfo: String?, host: String?, port: Integer?, registry: String?, path: String?, opaque: String?, query: String?, fragment: String? }) -> instance
|
|
@@ -293,7 +293,7 @@ module URI
|
|
|
293
293
|
# -->
|
|
294
294
|
# Returns the parser to be used.
|
|
295
295
|
#
|
|
296
|
-
# Unless
|
|
296
|
+
# Unless the `parser` is defined, DEFAULT_PARSER is used.
|
|
297
297
|
#
|
|
298
298
|
def parser: () -> untyped
|
|
299
299
|
|
|
@@ -317,7 +317,7 @@ module URI
|
|
|
317
317
|
# rdoc-file=lib/uri/generic.rb
|
|
318
318
|
# - check_scheme(v)
|
|
319
319
|
# -->
|
|
320
|
-
# Checks the scheme `v` component against the
|
|
320
|
+
# Checks the scheme `v` component against the `parser` Regexp for :SCHEME.
|
|
321
321
|
#
|
|
322
322
|
def check_scheme: (String? v) -> true
|
|
323
323
|
|
|
@@ -374,8 +374,8 @@ module URI
|
|
|
374
374
|
# rdoc-file=lib/uri/generic.rb
|
|
375
375
|
# - check_user(v)
|
|
376
376
|
# -->
|
|
377
|
-
# Checks the user `v` component for RFC2396 compliance and against the
|
|
378
|
-
#
|
|
377
|
+
# Checks the user `v` component for RFC2396 compliance and against the `parser`
|
|
378
|
+
# Regexp for :USERINFO.
|
|
379
379
|
#
|
|
380
380
|
# Can not have a registry or opaque component defined, with a user component
|
|
381
381
|
# defined.
|
|
@@ -387,7 +387,7 @@ module URI
|
|
|
387
387
|
# - check_password(v, user = @user)
|
|
388
388
|
# -->
|
|
389
389
|
# Checks the password `v` component for RFC2396 compliance and against the
|
|
390
|
-
#
|
|
390
|
+
# `parser` Regexp for :USERINFO.
|
|
391
391
|
#
|
|
392
392
|
# Can not have a registry or opaque component defined, with a user component
|
|
393
393
|
# defined.
|
|
@@ -530,8 +530,8 @@ module URI
|
|
|
530
530
|
# rdoc-file=lib/uri/generic.rb
|
|
531
531
|
# - check_host(v)
|
|
532
532
|
# -->
|
|
533
|
-
# Checks the host `v` component for RFC2396 compliance and against the
|
|
534
|
-
#
|
|
533
|
+
# Checks the host `v` component for RFC2396 compliance and against the `parser`
|
|
534
|
+
# Regexp for :HOST.
|
|
535
535
|
#
|
|
536
536
|
# Can not have a registry or opaque component defined, with a host component
|
|
537
537
|
# defined.
|
|
@@ -611,8 +611,8 @@ module URI
|
|
|
611
611
|
# rdoc-file=lib/uri/generic.rb
|
|
612
612
|
# - check_port(v)
|
|
613
613
|
# -->
|
|
614
|
-
# Checks the port `v` component for RFC2396 compliance and against the
|
|
615
|
-
#
|
|
614
|
+
# Checks the port `v` component for RFC2396 compliance and against the `parser`
|
|
615
|
+
# Regexp for :PORT.
|
|
616
616
|
#
|
|
617
617
|
# Can not have a registry or opaque component defined, with a port component
|
|
618
618
|
# defined.
|
|
@@ -670,8 +670,8 @@ module URI
|
|
|
670
670
|
# rdoc-file=lib/uri/generic.rb
|
|
671
671
|
# - check_path(v)
|
|
672
672
|
# -->
|
|
673
|
-
# Checks the path `v` component for RFC2396 compliance and against the
|
|
674
|
-
#
|
|
673
|
+
# Checks the path `v` component for RFC2396 compliance and against the `parser`
|
|
674
|
+
# Regexp for :ABS_PATH and :REL_PATH.
|
|
675
675
|
#
|
|
676
676
|
# Can not have a opaque component defined, with a path component defined.
|
|
677
677
|
#
|
|
@@ -742,7 +742,7 @@ module URI
|
|
|
742
742
|
# - check_opaque(v)
|
|
743
743
|
# -->
|
|
744
744
|
# Checks the opaque `v` component for RFC2396 compliance and against the
|
|
745
|
-
#
|
|
745
|
+
# `parser` Regexp for :OPAQUE.
|
|
746
746
|
#
|
|
747
747
|
# Can not have a host, port, user, or path component defined, with an opaque
|
|
748
748
|
# component defined.
|
|
@@ -781,8 +781,7 @@ module URI
|
|
|
781
781
|
# rdoc-file=lib/uri/generic.rb
|
|
782
782
|
# - fragment=(v)
|
|
783
783
|
# -->
|
|
784
|
-
# Checks the fragment `v` component against the
|
|
785
|
-
# :FRAGMENT.
|
|
784
|
+
# Checks the fragment `v` component against the `parser` Regexp for :FRAGMENT.
|
|
786
785
|
#
|
|
787
786
|
# ## Args
|
|
788
787
|
#
|
|
@@ -1010,6 +1009,7 @@ module URI
|
|
|
1010
1009
|
# rdoc-file=lib/uri/generic.rb
|
|
1011
1010
|
# - hash()
|
|
1012
1011
|
# -->
|
|
1012
|
+
# Returns the hash value.
|
|
1013
1013
|
#
|
|
1014
1014
|
def hash: () -> Integer
|
|
1015
1015
|
|
|
@@ -1017,6 +1017,7 @@ module URI
|
|
|
1017
1017
|
# rdoc-file=lib/uri/generic.rb
|
|
1018
1018
|
# - eql?(oth)
|
|
1019
1019
|
# -->
|
|
1020
|
+
# Compares with *oth* for Hash.
|
|
1020
1021
|
#
|
|
1021
1022
|
def eql?: (URI::Generic oth) -> bool
|
|
1022
1023
|
|
|
@@ -17,14 +17,14 @@ module URI
|
|
|
17
17
|
# <!-- rdoc-file=lib/uri/rfc2396_parser.rb -->
|
|
18
18
|
# The Hash of patterns.
|
|
19
19
|
#
|
|
20
|
-
# See also
|
|
20
|
+
# See also #initialize_pattern.
|
|
21
21
|
#
|
|
22
22
|
attr_reader pattern: Hash[Symbol, String]
|
|
23
23
|
|
|
24
24
|
# <!-- rdoc-file=lib/uri/rfc2396_parser.rb -->
|
|
25
25
|
# The Hash of Regexp.
|
|
26
26
|
#
|
|
27
|
-
# See also
|
|
27
|
+
# See also #initialize_regexp.
|
|
28
28
|
#
|
|
29
29
|
attr_reader regexp: Hash[Symbol, Regexp]
|
|
30
30
|
|
|
@@ -34,7 +34,7 @@ module URI
|
|
|
34
34
|
# -->
|
|
35
35
|
# ## Synopsis
|
|
36
36
|
#
|
|
37
|
-
# URI::
|
|
37
|
+
# URI::RFC2396_Parser.new([opts])
|
|
38
38
|
#
|
|
39
39
|
# ## Args
|
|
40
40
|
#
|
|
@@ -52,7 +52,7 @@ module URI
|
|
|
52
52
|
#
|
|
53
53
|
# ## Examples
|
|
54
54
|
#
|
|
55
|
-
# p = URI::
|
|
55
|
+
# p = URI::RFC2396_Parser.new(:ESCAPED => "(?:%[a-fA-F0-9]{2}|%u[a-fA-F0-9]{4})")
|
|
56
56
|
# u = p.parse("http://example.jp/%uABCD") #=> #<URI::HTTP http://example.jp/%uABCD>
|
|
57
57
|
# URI.parse(u.to_s) #=> raises URI::InvalidURIError
|
|
58
58
|
#
|
|
@@ -105,7 +105,7 @@ module URI
|
|
|
105
105
|
# Attempts to parse and merge a set of URIs. If no `block` given, then returns
|
|
106
106
|
# the result, else it calls `block` for each element in result.
|
|
107
107
|
#
|
|
108
|
-
# See also
|
|
108
|
+
# See also #make_regexp.
|
|
109
109
|
#
|
|
110
110
|
def extract: (String str, ?Array[String] schemes) -> Array[String]
|
|
111
111
|
| (String str, ?Array[String] schemes) { (String) -> untyped } -> nil
|
|
@@ -152,8 +152,7 @@ module URI
|
|
|
152
152
|
#
|
|
153
153
|
# ## Usage
|
|
154
154
|
#
|
|
155
|
-
#
|
|
156
|
-
# p.parse("ldap://ldap.example.com/dc=example?user=john")
|
|
155
|
+
# URI::RFC2396_PARSER.parse("ldap://ldap.example.com/dc=example?user=john")
|
|
157
156
|
# #=> #<URI::LDAP ldap://ldap.example.com/dc=example?user=john>
|
|
158
157
|
#
|
|
159
158
|
def parse: (String uri) -> URI::Generic
|
data/stdlib/zlib/0/zstream.rbs
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rbs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.10.0.pre.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Soutaro Matsumoto
|
|
@@ -33,7 +33,10 @@ extensions:
|
|
|
33
33
|
- ext/rbs_extension/extconf.rb
|
|
34
34
|
extra_rdoc_files: []
|
|
35
35
|
files:
|
|
36
|
+
- ".clang-format"
|
|
37
|
+
- ".clangd"
|
|
36
38
|
- ".github/dependabot.yml"
|
|
39
|
+
- ".github/workflows/c-check.yml"
|
|
37
40
|
- ".github/workflows/comments.yml"
|
|
38
41
|
- ".github/workflows/dependabot.yml"
|
|
39
42
|
- ".github/workflows/ruby.yml"
|
|
@@ -90,6 +93,7 @@ files:
|
|
|
90
93
|
- core/object.rbs
|
|
91
94
|
- core/object_space.rbs
|
|
92
95
|
- core/object_space/weak_key_map.rbs
|
|
96
|
+
- core/pathname.rbs
|
|
93
97
|
- core/proc.rbs
|
|
94
98
|
- core/process.rbs
|
|
95
99
|
- core/ractor.rbs
|
|
@@ -131,6 +135,7 @@ files:
|
|
|
131
135
|
- core/unbound_method.rbs
|
|
132
136
|
- core/warning.rbs
|
|
133
137
|
- docs/CONTRIBUTING.md
|
|
138
|
+
- docs/aliases.md
|
|
134
139
|
- docs/architecture.md
|
|
135
140
|
- docs/collection.md
|
|
136
141
|
- docs/data_and_struct.md
|
|
@@ -142,25 +147,32 @@ files:
|
|
|
142
147
|
- docs/syntax.md
|
|
143
148
|
- docs/tools.md
|
|
144
149
|
- exe/rbs
|
|
150
|
+
- ext/rbs_extension/ast_translation.c
|
|
151
|
+
- ext/rbs_extension/ast_translation.h
|
|
152
|
+
- ext/rbs_extension/class_constants.c
|
|
153
|
+
- ext/rbs_extension/class_constants.h
|
|
154
|
+
- ext/rbs_extension/compat.h
|
|
145
155
|
- ext/rbs_extension/extconf.rb
|
|
146
|
-
- ext/rbs_extension/
|
|
147
|
-
- ext/rbs_extension/
|
|
148
|
-
- ext/rbs_extension/lexer.re
|
|
149
|
-
- ext/rbs_extension/lexstate.c
|
|
150
|
-
- ext/rbs_extension/location.c
|
|
151
|
-
- ext/rbs_extension/location.h
|
|
156
|
+
- ext/rbs_extension/legacy_location.c
|
|
157
|
+
- ext/rbs_extension/legacy_location.h
|
|
152
158
|
- ext/rbs_extension/main.c
|
|
153
|
-
- ext/rbs_extension/parser.c
|
|
154
|
-
- ext/rbs_extension/parser.h
|
|
155
|
-
- ext/rbs_extension/parserstate.c
|
|
156
|
-
- ext/rbs_extension/parserstate.h
|
|
157
159
|
- ext/rbs_extension/rbs_extension.h
|
|
158
|
-
- ext/rbs_extension/
|
|
160
|
+
- ext/rbs_extension/rbs_string_bridging.c
|
|
161
|
+
- ext/rbs_extension/rbs_string_bridging.h
|
|
159
162
|
- goodcheck.yml
|
|
160
163
|
- include/rbs.h
|
|
161
|
-
- include/rbs/
|
|
162
|
-
- include/rbs/
|
|
164
|
+
- include/rbs/ast.h
|
|
165
|
+
- include/rbs/defines.h
|
|
166
|
+
- include/rbs/lexer.h
|
|
167
|
+
- include/rbs/location.h
|
|
168
|
+
- include/rbs/parser.h
|
|
169
|
+
- include/rbs/string.h
|
|
170
|
+
- include/rbs/util/rbs_allocator.h
|
|
171
|
+
- include/rbs/util/rbs_assert.h
|
|
172
|
+
- include/rbs/util/rbs_buffer.h
|
|
163
173
|
- include/rbs/util/rbs_constant_pool.h
|
|
174
|
+
- include/rbs/util/rbs_encoding.h
|
|
175
|
+
- include/rbs/util/rbs_unescape.h
|
|
164
176
|
- lib/rbs.rb
|
|
165
177
|
- lib/rbs/ancestor_graph.rb
|
|
166
178
|
- lib/rbs/annotate.rb
|
|
@@ -341,9 +353,19 @@ files:
|
|
|
341
353
|
- sig/version.rbs
|
|
342
354
|
- sig/visitor.rbs
|
|
343
355
|
- sig/writer.rbs
|
|
344
|
-
- src/
|
|
345
|
-
- src/
|
|
356
|
+
- src/ast.c
|
|
357
|
+
- src/lexer.c
|
|
358
|
+
- src/lexer.re
|
|
359
|
+
- src/lexstate.c
|
|
360
|
+
- src/location.c
|
|
361
|
+
- src/parser.c
|
|
362
|
+
- src/string.c
|
|
363
|
+
- src/util/rbs_allocator.c
|
|
364
|
+
- src/util/rbs_assert.c
|
|
365
|
+
- src/util/rbs_buffer.c
|
|
346
366
|
- src/util/rbs_constant_pool.c
|
|
367
|
+
- src/util/rbs_encoding.c
|
|
368
|
+
- src/util/rbs_unescape.c
|
|
347
369
|
- stdlib/abbrev/0/abbrev.rbs
|
|
348
370
|
- stdlib/abbrev/0/array.rbs
|
|
349
371
|
- stdlib/base64/0/base64.rbs
|
|
@@ -351,6 +373,7 @@ files:
|
|
|
351
373
|
- stdlib/bigdecimal-math/0/big_math.rbs
|
|
352
374
|
- stdlib/bigdecimal-math/0/manifest.yaml
|
|
353
375
|
- stdlib/bigdecimal/0/big_decimal.rbs
|
|
376
|
+
- stdlib/cgi-escape/0/escape.rbs
|
|
354
377
|
- stdlib/cgi/0/core.rbs
|
|
355
378
|
- stdlib/cgi/0/manifest.yaml
|
|
356
379
|
- stdlib/coverage/0/coverage.rbs
|
|
@@ -435,7 +458,6 @@ files:
|
|
|
435
458
|
- stdlib/openssl/0/manifest.yaml
|
|
436
459
|
- stdlib/openssl/0/openssl.rbs
|
|
437
460
|
- stdlib/optparse/0/optparse.rbs
|
|
438
|
-
- stdlib/pathname/0/pathname.rbs
|
|
439
461
|
- stdlib/pp/0/manifest.yaml
|
|
440
462
|
- stdlib/pp/0/pp.rbs
|
|
441
463
|
- stdlib/prettyprint/0/prettyprint.rbs
|
|
@@ -450,6 +472,7 @@ files:
|
|
|
450
472
|
- stdlib/rdoc/0/comment.rbs
|
|
451
473
|
- stdlib/rdoc/0/context.rbs
|
|
452
474
|
- stdlib/rdoc/0/markup.rbs
|
|
475
|
+
- stdlib/rdoc/0/options.rbs
|
|
453
476
|
- stdlib/rdoc/0/parser.rbs
|
|
454
477
|
- stdlib/rdoc/0/rdoc.rbs
|
|
455
478
|
- stdlib/rdoc/0/ri.rbs
|
|
@@ -537,7 +560,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
537
560
|
- !ruby/object:Gem::Version
|
|
538
561
|
version: '0'
|
|
539
562
|
requirements: []
|
|
540
|
-
rubygems_version:
|
|
563
|
+
rubygems_version: 4.0.0.dev
|
|
541
564
|
specification_version: 4
|
|
542
565
|
summary: Type signature for Ruby.
|
|
543
566
|
test_files: []
|