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
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
# Used:
|
|
97
97
|
#
|
|
98
98
|
# $ ruby optparse-test.rb -r
|
|
99
|
-
# optparse-test.rb:9:in
|
|
99
|
+
# optparse-test.rb:9:in '<main>': missing argument: -r (OptionParser::MissingArgument)
|
|
100
100
|
# $ ruby optparse-test.rb -r my-library
|
|
101
101
|
# You required my-library!
|
|
102
102
|
#
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
# $ ruby optparse-test.rb --user 2
|
|
192
192
|
# #<struct User id=2, name="Gandalf">
|
|
193
193
|
# $ ruby optparse-test.rb --user 3
|
|
194
|
-
# optparse-test.rb:15:in
|
|
194
|
+
# optparse-test.rb:15:in 'block in find_user': No User Found for id 3 (RuntimeError)
|
|
195
195
|
#
|
|
196
196
|
# ### Store options to a Hash
|
|
197
197
|
#
|
|
@@ -1092,7 +1092,7 @@ OptionParser::RequiredArgument: Array[untyped]
|
|
|
1092
1092
|
OptionParser::SPLAT_PROC: Proc
|
|
1093
1093
|
|
|
1094
1094
|
# <!-- rdoc-file=lib/optparse.rb -->
|
|
1095
|
-
#
|
|
1095
|
+
# An alias for compatibility
|
|
1096
1096
|
#
|
|
1097
1097
|
OptionParser::Version: String
|
|
1098
1098
|
|
|
@@ -30,7 +30,7 @@ module RDoc
|
|
|
30
30
|
# <!-- rdoc-file=lib/rdoc/code_object.rb -->
|
|
31
31
|
# Our comment
|
|
32
32
|
#
|
|
33
|
-
attr_reader comment:
|
|
33
|
+
attr_reader comment: Comment | String
|
|
34
34
|
|
|
35
35
|
# <!--
|
|
36
36
|
# rdoc-file=lib/rdoc/code_object.rb
|
|
@@ -46,6 +46,6 @@ module RDoc
|
|
|
46
46
|
# -->
|
|
47
47
|
# Replaces our comment with `comment`, unless it is empty.
|
|
48
48
|
#
|
|
49
|
-
def comment=: (
|
|
49
|
+
def comment=: (Comment | String | nil) -> (Comment | String | nil)
|
|
50
50
|
end
|
|
51
51
|
end
|
data/stdlib/rdoc/0/comment.rbs
CHANGED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
%a{annotate:rdoc:skip}
|
|
2
|
+
module RDoc
|
|
3
|
+
# <!-- rdoc-file=lib/rdoc/options.rb -->
|
|
4
|
+
# RDoc::Options handles the parsing and storage of options
|
|
5
|
+
#
|
|
6
|
+
# ## Saved Options
|
|
7
|
+
#
|
|
8
|
+
# You can save some options like the markup format in the `.rdoc_options` file
|
|
9
|
+
# in your gem. The easiest way to do this is:
|
|
10
|
+
#
|
|
11
|
+
# rdoc --markup tomdoc --write-options
|
|
12
|
+
#
|
|
13
|
+
# Which will automatically create the file and fill it with the options you
|
|
14
|
+
# specified.
|
|
15
|
+
#
|
|
16
|
+
# The following options will not be saved since they interfere with the user's
|
|
17
|
+
# preferences or with the normal operation of RDoc:
|
|
18
|
+
#
|
|
19
|
+
# * `--coverage-report`
|
|
20
|
+
# * `--dry-run`
|
|
21
|
+
# * `--encoding`
|
|
22
|
+
# * `--force-update`
|
|
23
|
+
# * `--format`
|
|
24
|
+
# * `--pipe`
|
|
25
|
+
# * `--quiet`
|
|
26
|
+
# * `--template`
|
|
27
|
+
# * `--verbose`
|
|
28
|
+
#
|
|
29
|
+
# ## Custom Options
|
|
30
|
+
#
|
|
31
|
+
# Generators can hook into RDoc::Options to add generator-specific command line
|
|
32
|
+
# options.
|
|
33
|
+
#
|
|
34
|
+
# When `--format` is encountered in ARGV, RDoc calls ::setup_options on the
|
|
35
|
+
# generator class to add extra options to the option parser. Options for custom
|
|
36
|
+
# generators must occur after `--format`. `rdoc --help` will list options for
|
|
37
|
+
# all installed generators.
|
|
38
|
+
#
|
|
39
|
+
# Example:
|
|
40
|
+
#
|
|
41
|
+
# class RDoc::Generator::Spellcheck
|
|
42
|
+
# RDoc::RDoc.add_generator self
|
|
43
|
+
#
|
|
44
|
+
# def self.setup_options rdoc_options
|
|
45
|
+
# op = rdoc_options.option_parser
|
|
46
|
+
#
|
|
47
|
+
# op.on('--spell-dictionary DICTIONARY',
|
|
48
|
+
# RDoc::Options::Path) do |dictionary|
|
|
49
|
+
# rdoc_options.spell_dictionary = dictionary
|
|
50
|
+
# end
|
|
51
|
+
# end
|
|
52
|
+
# end
|
|
53
|
+
#
|
|
54
|
+
# Of course, RDoc::Options does not respond to `spell_dictionary` by default so
|
|
55
|
+
# you will need to add it:
|
|
56
|
+
#
|
|
57
|
+
# class RDoc::Options
|
|
58
|
+
#
|
|
59
|
+
# ##
|
|
60
|
+
# # The spell dictionary used by the spell-checking plugin.
|
|
61
|
+
#
|
|
62
|
+
# attr_accessor :spell_dictionary
|
|
63
|
+
#
|
|
64
|
+
# end
|
|
65
|
+
#
|
|
66
|
+
# ## Option Validators
|
|
67
|
+
#
|
|
68
|
+
# OptionParser validators will validate and cast user input values. In addition
|
|
69
|
+
# to the validators that ship with OptionParser (String, Integer, Float,
|
|
70
|
+
# TrueClass, FalseClass, Array, Regexp, Date, Time, URI, etc.), RDoc::Options
|
|
71
|
+
# adds Path, PathArray and Template.
|
|
72
|
+
#
|
|
73
|
+
class Options
|
|
74
|
+
def initialize: (?untyped loaded_options) -> void
|
|
75
|
+
end
|
|
76
|
+
end
|
data/stdlib/rdoc/0/rdoc.rbs
CHANGED
|
@@ -84,7 +84,7 @@ module RDoc
|
|
|
84
84
|
# -->
|
|
85
85
|
# Starts collecting tokens
|
|
86
86
|
#
|
|
87
|
-
def collect_tokens: () -> void
|
|
87
|
+
def collect_tokens: (Symbol) -> void
|
|
88
88
|
|
|
89
89
|
# <!--
|
|
90
90
|
# rdoc-file=lib/rdoc/token_stream.rb
|
|
@@ -190,7 +190,7 @@ module RDoc
|
|
|
190
190
|
#
|
|
191
191
|
# Usually this is called by super from a subclass.
|
|
192
192
|
#
|
|
193
|
-
def initialize: (String text, String name) -> void
|
|
193
|
+
def initialize: (String text, String name, ?singleton: bool) -> void
|
|
194
194
|
|
|
195
195
|
# <!--
|
|
196
196
|
# rdoc-file=lib/rdoc/method_attr.rb
|
|
@@ -267,7 +267,7 @@ module RDoc
|
|
|
267
267
|
# -->
|
|
268
268
|
# Creates a new AnyMethod with a token stream `text` and `name`
|
|
269
269
|
#
|
|
270
|
-
def initialize: (String? text, String name) -> void
|
|
270
|
+
def initialize: (String? text, String name, ?singleton: bool) -> void
|
|
271
271
|
end
|
|
272
272
|
|
|
273
273
|
# <!-- rdoc-file=lib/rdoc/attr.rb -->
|
|
@@ -286,7 +286,7 @@ module RDoc
|
|
|
286
286
|
# Creates a new Attr with body `text`, `name`, read/write status `rw` and
|
|
287
287
|
# `comment`. `singleton` marks this as a class attribute.
|
|
288
288
|
#
|
|
289
|
-
def initialize: (String? text, String name, String rw, RDoc::Comment? comment, ?bool
|
|
289
|
+
def initialize: (String? text, String name, String rw, RDoc::Comment? comment, ?singleton: bool) -> void
|
|
290
290
|
end
|
|
291
291
|
|
|
292
292
|
# <!-- rdoc-file=lib/rdoc/constant.rb -->
|
|
@@ -372,6 +372,8 @@ module RDoc
|
|
|
372
372
|
#
|
|
373
373
|
attr_accessor old_name: String
|
|
374
374
|
|
|
375
|
+
attr_reader singleton: bool
|
|
376
|
+
|
|
375
377
|
# <!--
|
|
376
378
|
# rdoc-file=lib/rdoc/alias.rb
|
|
377
379
|
# - new(text, old_name, new_name, comment, singleton = false)
|
|
@@ -379,7 +381,7 @@ module RDoc
|
|
|
379
381
|
# Creates a new Alias with a token stream of `text` that aliases `old_name` to
|
|
380
382
|
# `new_name`, has `comment` and is a `singleton` context.
|
|
381
383
|
#
|
|
382
|
-
def initialize: (String? text, String name, String old_name, RDoc::Comment? comment, ?bool
|
|
384
|
+
def initialize: (String? text, String name, String old_name, RDoc::Comment? comment, ?singleton: bool) -> void
|
|
383
385
|
end
|
|
384
386
|
|
|
385
387
|
# <!-- rdoc-file=lib/rdoc/stats.rb -->
|
data/stdlib/rdoc/0/store.rbs
CHANGED
|
@@ -26,7 +26,7 @@ module RDoc
|
|
|
26
26
|
# -->
|
|
27
27
|
# Creates a new Store of `type` that will load or save to `path`
|
|
28
28
|
#
|
|
29
|
-
def initialize: (?String?
|
|
29
|
+
def initialize: (Options, ?path: String? , ?type: Symbol?) -> void
|
|
30
30
|
|
|
31
31
|
# <!--
|
|
32
32
|
# rdoc-file=lib/rdoc/store.rb
|
data/stdlib/resolv/0/resolv.rbs
CHANGED
|
@@ -427,15 +427,9 @@ end
|
|
|
427
427
|
class Resolv::DNS::Config::OtherResolvError < Resolv::ResolvError
|
|
428
428
|
end
|
|
429
429
|
|
|
430
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
431
|
-
# Indicates that the DNS response was unable to be decoded.
|
|
432
|
-
#
|
|
433
430
|
class Resolv::DNS::DecodeError < StandardError
|
|
434
431
|
end
|
|
435
432
|
|
|
436
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
437
|
-
# Indicates that the DNS request was unable to be encoded.
|
|
438
|
-
#
|
|
439
433
|
class Resolv::DNS::EncodeError < StandardError
|
|
440
434
|
end
|
|
441
435
|
|
|
@@ -585,9 +579,6 @@ class Resolv::DNS::Message::MessageEncoder
|
|
|
585
579
|
def initialize: () -> untyped
|
|
586
580
|
end
|
|
587
581
|
|
|
588
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
589
|
-
# A representation of a DNS name.
|
|
590
|
-
#
|
|
591
582
|
class Resolv::DNS::Name
|
|
592
583
|
# <!--
|
|
593
584
|
# rdoc-file=lib/resolv.rb
|
|
@@ -677,9 +668,6 @@ Resolv::DNS::OpCode::Status: Integer
|
|
|
677
668
|
|
|
678
669
|
Resolv::DNS::OpCode::Update: Integer
|
|
679
670
|
|
|
680
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
681
|
-
# A DNS query abstract class.
|
|
682
|
-
#
|
|
683
671
|
class Resolv::DNS::Query
|
|
684
672
|
def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
|
|
685
673
|
|
|
@@ -817,9 +805,6 @@ class Resolv::DNS::Requester::UnconnectedUDP::Sender < Resolv::DNS::Requester::S
|
|
|
817
805
|
def initialize: (Resolv::DNS::Message msg, String data, UDPSocket sock, String host, Integer port) -> untyped
|
|
818
806
|
end
|
|
819
807
|
|
|
820
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
821
|
-
# A DNS resource abstract class.
|
|
822
|
-
#
|
|
823
808
|
class Resolv::DNS::Resource < Resolv::DNS::Query
|
|
824
809
|
def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
|
|
825
810
|
|
|
@@ -845,25 +830,16 @@ Resolv::DNS::Resource::ClassInsensitiveTypes: Array[singleton(Resolv::DNS::Resou
|
|
|
845
830
|
|
|
846
831
|
Resolv::DNS::Resource::ClassValue: Integer?
|
|
847
832
|
|
|
848
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
849
|
-
# A Query type requesting any RR.
|
|
850
|
-
#
|
|
851
833
|
class Resolv::DNS::Resource::ANY < Resolv::DNS::Query
|
|
852
834
|
end
|
|
853
835
|
|
|
854
836
|
Resolv::DNS::Resource::ANY::TypeValue: Integer
|
|
855
837
|
|
|
856
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
857
|
-
# The canonical name for an alias.
|
|
858
|
-
#
|
|
859
838
|
class Resolv::DNS::Resource::CNAME < Resolv::DNS::Resource::DomainName
|
|
860
839
|
end
|
|
861
840
|
|
|
862
841
|
Resolv::DNS::Resource::CNAME::TypeValue: Integer
|
|
863
842
|
|
|
864
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
865
|
-
# Domain Name resource abstract class.
|
|
866
|
-
#
|
|
867
843
|
class Resolv::DNS::Resource::DomainName < Resolv::DNS::Resource
|
|
868
844
|
def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
|
|
869
845
|
|
|
@@ -885,9 +861,6 @@ class Resolv::DNS::Resource::DomainName < Resolv::DNS::Resource
|
|
|
885
861
|
def initialize: (String name) -> untyped
|
|
886
862
|
end
|
|
887
863
|
|
|
888
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
889
|
-
# A generic resource abstract class.
|
|
890
|
-
#
|
|
891
864
|
class Resolv::DNS::Resource::Generic < Resolv::DNS::Resource
|
|
892
865
|
def self.create: (Integer type_value, Integer class_value) -> Class
|
|
893
866
|
|
|
@@ -911,9 +884,6 @@ class Resolv::DNS::Resource::Generic < Resolv::DNS::Resource
|
|
|
911
884
|
def initialize: (String data) -> untyped
|
|
912
885
|
end
|
|
913
886
|
|
|
914
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
915
|
-
# Host Information resource.
|
|
916
|
-
#
|
|
917
887
|
class Resolv::DNS::Resource::HINFO < Resolv::DNS::Resource
|
|
918
888
|
def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
|
|
919
889
|
|
|
@@ -942,17 +912,11 @@ end
|
|
|
942
912
|
|
|
943
913
|
Resolv::DNS::Resource::HINFO::TypeValue: Integer
|
|
944
914
|
|
|
945
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
946
|
-
# module IN contains ARPA Internet specific RRs.
|
|
947
|
-
#
|
|
948
915
|
module Resolv::DNS::Resource::IN
|
|
949
916
|
end
|
|
950
917
|
|
|
951
918
|
Resolv::DNS::Resource::IN::ClassValue: Integer
|
|
952
919
|
|
|
953
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
954
|
-
# IPv4 Address resource
|
|
955
|
-
#
|
|
956
920
|
class Resolv::DNS::Resource::IN::A < Resolv::DNS::Resource
|
|
957
921
|
def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
|
|
958
922
|
|
|
@@ -978,9 +942,6 @@ Resolv::DNS::Resource::IN::A::ClassValue: Integer
|
|
|
978
942
|
|
|
979
943
|
Resolv::DNS::Resource::IN::A::TypeValue: Integer
|
|
980
944
|
|
|
981
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
982
|
-
# An IPv6 address record.
|
|
983
|
-
#
|
|
984
945
|
class Resolv::DNS::Resource::IN::AAAA < Resolv::DNS::Resource
|
|
985
946
|
def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
|
|
986
947
|
|
|
@@ -1069,11 +1030,6 @@ Resolv::DNS::Resource::IN::SOA::ClassValue: Integer
|
|
|
1069
1030
|
|
|
1070
1031
|
Resolv::DNS::Resource::IN::SOA::TypeValue: Integer
|
|
1071
1032
|
|
|
1072
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
1073
|
-
# SRV resource record defined in RFC 2782
|
|
1074
|
-
#
|
|
1075
|
-
# These records identify the hostname and port that a service is available at.
|
|
1076
|
-
#
|
|
1077
1033
|
class Resolv::DNS::Resource::IN::SRV < Resolv::DNS::Resource
|
|
1078
1034
|
def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
|
|
1079
1035
|
|
|
@@ -1141,9 +1097,6 @@ Resolv::DNS::Resource::IN::TXT::ClassValue: Integer
|
|
|
1141
1097
|
|
|
1142
1098
|
Resolv::DNS::Resource::IN::TXT::TypeValue: Integer
|
|
1143
1099
|
|
|
1144
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
1145
|
-
# Well Known Service resource.
|
|
1146
|
-
#
|
|
1147
1100
|
class Resolv::DNS::Resource::IN::WKS < Resolv::DNS::Resource
|
|
1148
1101
|
def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
|
|
1149
1102
|
|
|
@@ -1182,9 +1135,6 @@ Resolv::DNS::Resource::IN::WKS::ClassValue: Integer
|
|
|
1182
1135
|
|
|
1183
1136
|
Resolv::DNS::Resource::IN::WKS::TypeValue: Integer
|
|
1184
1137
|
|
|
1185
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
1186
|
-
# Location resource
|
|
1187
|
-
#
|
|
1188
1138
|
class Resolv::DNS::Resource::LOC < Resolv::DNS::Resource
|
|
1189
1139
|
def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
|
|
1190
1140
|
|
|
@@ -1243,9 +1193,6 @@ end
|
|
|
1243
1193
|
|
|
1244
1194
|
Resolv::DNS::Resource::LOC::TypeValue: Integer
|
|
1245
1195
|
|
|
1246
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
1247
|
-
# Mailing list or mailbox information.
|
|
1248
|
-
#
|
|
1249
1196
|
class Resolv::DNS::Resource::MINFO < Resolv::DNS::Resource
|
|
1250
1197
|
def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
|
|
1251
1198
|
|
|
@@ -1273,9 +1220,6 @@ end
|
|
|
1273
1220
|
|
|
1274
1221
|
Resolv::DNS::Resource::MINFO::TypeValue: Integer
|
|
1275
1222
|
|
|
1276
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
1277
|
-
# Mail Exchanger resource.
|
|
1278
|
-
#
|
|
1279
1223
|
class Resolv::DNS::Resource::MX < Resolv::DNS::Resource
|
|
1280
1224
|
def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
|
|
1281
1225
|
|
|
@@ -1304,25 +1248,16 @@ end
|
|
|
1304
1248
|
|
|
1305
1249
|
Resolv::DNS::Resource::MX::TypeValue: Integer
|
|
1306
1250
|
|
|
1307
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
1308
|
-
# An authoritative name server.
|
|
1309
|
-
#
|
|
1310
1251
|
class Resolv::DNS::Resource::NS < Resolv::DNS::Resource::DomainName
|
|
1311
1252
|
end
|
|
1312
1253
|
|
|
1313
1254
|
Resolv::DNS::Resource::NS::TypeValue: Integer
|
|
1314
1255
|
|
|
1315
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
1316
|
-
# A Pointer to another DNS name.
|
|
1317
|
-
#
|
|
1318
1256
|
class Resolv::DNS::Resource::PTR < Resolv::DNS::Resource::DomainName
|
|
1319
1257
|
end
|
|
1320
1258
|
|
|
1321
1259
|
Resolv::DNS::Resource::PTR::TypeValue: Integer
|
|
1322
1260
|
|
|
1323
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
1324
|
-
# Start Of Authority resource.
|
|
1325
|
-
#
|
|
1326
1261
|
class Resolv::DNS::Resource::SOA < Resolv::DNS::Resource
|
|
1327
1262
|
def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
|
|
1328
1263
|
|
|
@@ -1380,9 +1315,6 @@ end
|
|
|
1380
1315
|
|
|
1381
1316
|
Resolv::DNS::Resource::SOA::TypeValue: Integer
|
|
1382
1317
|
|
|
1383
|
-
# <!-- rdoc-file=lib/resolv.rb -->
|
|
1384
|
-
# Unstructured text resource.
|
|
1385
|
-
#
|
|
1386
1318
|
class Resolv::DNS::Resource::TXT < Resolv::DNS::Resource
|
|
1387
1319
|
def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
|
|
1388
1320
|
|
|
@@ -1478,6 +1410,9 @@ class Resolv::Hosts
|
|
|
1478
1410
|
def initialize: (?String filename) -> untyped
|
|
1479
1411
|
end
|
|
1480
1412
|
|
|
1413
|
+
# <!-- rdoc-file=lib/resolv.rb -->
|
|
1414
|
+
# The default file name for host names
|
|
1415
|
+
#
|
|
1481
1416
|
Resolv::Hosts::DefaultFileName: String
|
|
1482
1417
|
|
|
1483
1418
|
# <!-- rdoc-file=lib/resolv.rb -->
|
|
@@ -1488,6 +1423,13 @@ class Resolv::IPv4
|
|
|
1488
1423
|
# rdoc-file=lib/resolv.rb
|
|
1489
1424
|
# - create(arg)
|
|
1490
1425
|
# -->
|
|
1426
|
+
# Creates a new IPv4 address from `arg` which may be:
|
|
1427
|
+
#
|
|
1428
|
+
# IPv4
|
|
1429
|
+
# : returns `arg`.
|
|
1430
|
+
#
|
|
1431
|
+
# String
|
|
1432
|
+
# : `arg` must match the IPv4::Regex constant
|
|
1491
1433
|
#
|
|
1492
1434
|
def self.create: (String | instance arg) -> instance
|
|
1493
1435
|
|
|
@@ -1519,6 +1461,9 @@ class Resolv::IPv4
|
|
|
1519
1461
|
def initialize: (String address) -> untyped
|
|
1520
1462
|
end
|
|
1521
1463
|
|
|
1464
|
+
# <!-- rdoc-file=lib/resolv.rb -->
|
|
1465
|
+
# Regular expression IPv4 addresses must match.
|
|
1466
|
+
#
|
|
1522
1467
|
Resolv::IPv4::Regex: Regexp
|
|
1523
1468
|
|
|
1524
1469
|
# <!-- rdoc-file=lib/resolv.rb -->
|
|
@@ -1649,10 +1594,14 @@ class Resolv::LOC::Alt
|
|
|
1649
1594
|
# rdoc-file=lib/resolv.rb
|
|
1650
1595
|
# - new(altitude)
|
|
1651
1596
|
# -->
|
|
1597
|
+
# Internal use; use self.create.
|
|
1652
1598
|
#
|
|
1653
1599
|
def initialize: (Integer altitude) -> untyped
|
|
1654
1600
|
end
|
|
1655
1601
|
|
|
1602
|
+
# <!-- rdoc-file=lib/resolv.rb -->
|
|
1603
|
+
# Regular expression LOC Alt must match.
|
|
1604
|
+
#
|
|
1656
1605
|
Resolv::LOC::Alt::Regex: Regexp
|
|
1657
1606
|
|
|
1658
1607
|
# <!-- rdoc-file=lib/resolv.rb -->
|
|
@@ -1701,10 +1650,14 @@ class Resolv::LOC::Coord
|
|
|
1701
1650
|
# rdoc-file=lib/resolv.rb
|
|
1702
1651
|
# - new(coordinates,orientation)
|
|
1703
1652
|
# -->
|
|
1653
|
+
# Internal use; use self.create.
|
|
1704
1654
|
#
|
|
1705
1655
|
def initialize: (String coordinates, orientation orientation) -> untyped
|
|
1706
1656
|
end
|
|
1707
1657
|
|
|
1658
|
+
# <!-- rdoc-file=lib/resolv.rb -->
|
|
1659
|
+
# Regular expression LOC Coord must match.
|
|
1660
|
+
#
|
|
1708
1661
|
Resolv::LOC::Coord::Regex: Regexp
|
|
1709
1662
|
|
|
1710
1663
|
# <!-- rdoc-file=lib/resolv.rb -->
|
|
@@ -1746,10 +1699,14 @@ class Resolv::LOC::Size
|
|
|
1746
1699
|
# rdoc-file=lib/resolv.rb
|
|
1747
1700
|
# - new(scalar)
|
|
1748
1701
|
# -->
|
|
1702
|
+
# Internal use; use self.create.
|
|
1749
1703
|
#
|
|
1750
1704
|
def initialize: (String scalar) -> untyped
|
|
1751
1705
|
end
|
|
1752
1706
|
|
|
1707
|
+
# <!-- rdoc-file=lib/resolv.rb -->
|
|
1708
|
+
# Regular expression LOC size must match.
|
|
1709
|
+
#
|
|
1753
1710
|
Resolv::LOC::Size::Regex: Regexp
|
|
1754
1711
|
|
|
1755
1712
|
# <!-- rdoc-file=lib/resolv.rb -->
|
data/stdlib/ripper/0/ripper.rbs
CHANGED
|
@@ -247,8 +247,8 @@ class Ripper
|
|
|
247
247
|
# - to_a()
|
|
248
248
|
# -->
|
|
249
249
|
#
|
|
250
|
-
def to_a: () -> [ [ Integer, Integer ], Symbol, String, Ripper::Lexer::State, String ]
|
|
251
|
-
|
|
250
|
+
def to_a: () -> ( [ [ Integer, Integer ], Symbol, String, Ripper::Lexer::State, String ]
|
|
251
|
+
| [ [ Integer, Integer ], Symbol, String, Ripper::Lexer::State ] )
|
|
252
252
|
end
|
|
253
253
|
|
|
254
254
|
class State
|
|
@@ -911,6 +911,7 @@ class Ripper
|
|
|
911
911
|
|
|
912
912
|
class CompileError < Error
|
|
913
913
|
end
|
|
914
|
+
|
|
914
915
|
class Error < StandardError
|
|
915
916
|
end
|
|
916
917
|
|
|
@@ -927,6 +928,7 @@ class Ripper
|
|
|
927
928
|
|
|
928
929
|
def match: (?untyped n) -> untyped
|
|
929
930
|
end
|
|
931
|
+
|
|
930
932
|
class MatchError < Error
|
|
931
933
|
end
|
|
932
934
|
alias self.compile self.new
|
|
@@ -949,6 +951,7 @@ class Ripper
|
|
|
949
951
|
|
|
950
952
|
def map_tokens: (untyped tokens) -> untyped
|
|
951
953
|
end
|
|
954
|
+
|
|
952
955
|
interface _Gets
|
|
953
956
|
def gets: (?String sep, ?Integer limit) -> String?
|
|
954
957
|
end
|
data/stdlib/socket/0/socket.rbs
CHANGED
|
@@ -488,6 +488,13 @@ class Socket < BasicSocket
|
|
|
488
488
|
# a timeout is set for each connection attempt and any connection attempt
|
|
489
489
|
# that exceeds its timeout will be canceled.
|
|
490
490
|
#
|
|
491
|
+
# :open_timeout
|
|
492
|
+
# : Specifies the timeout in seconds from the start of the method execution.
|
|
493
|
+
# If this timeout is reached while there are still addresses that have not
|
|
494
|
+
# yet been attempted for connection, no further attempts will be made.
|
|
495
|
+
# If this option is specified together with other timeout options, an
|
|
496
|
+
# `ArgumentError` will be raised.
|
|
497
|
+
#
|
|
491
498
|
# :fast_fallback
|
|
492
499
|
# : Enables the Happy Eyeballs Version 2 algorithm (enabled by default).
|
|
493
500
|
#
|
|
@@ -504,7 +511,9 @@ class Socket < BasicSocket
|
|
|
504
511
|
# }
|
|
505
512
|
#
|
|
506
513
|
def self.tcp: (String host, Integer port, ?String local_host, ?Integer local_port, ?resolv_timeout: Time::_Timeout, ?connect_timeout: Time::_Timeout) -> instance
|
|
507
|
-
| (String host, Integer port, ?String local_host, ?Integer local_port, ?
|
|
514
|
+
| (String host, Integer port, ?String local_host, ?Integer local_port, ?open_timeout: Time::_Timeout) -> instance
|
|
515
|
+
| [T] (String host, Integer port, ?String local_host, ?Integer local_port, ?resolv_timeout: Time::_Timeout, ?connect_timeout: Time::_Timeout) { (instance) -> T } -> T
|
|
516
|
+
| [T] (String host, Integer port, ?String local_host, ?Integer local_port, ?open_timeout: Time::_Timeout) { (instance) -> T } -> T
|
|
508
517
|
|
|
509
518
|
# <!--
|
|
510
519
|
# rdoc-file=ext/socket/lib/socket.rb
|
|
@@ -3769,6 +3778,9 @@ class Socket::Ifaddr
|
|
|
3769
3778
|
# -->
|
|
3770
3779
|
# Returns the flags of *ifaddr*.
|
|
3771
3780
|
#
|
|
3781
|
+
# The value is bitwise-or of Socket::IFF_* constants such as
|
|
3782
|
+
# Socket::IFF_LOOPBACK.
|
|
3783
|
+
#
|
|
3772
3784
|
def flags: () -> Integer
|
|
3773
3785
|
|
|
3774
3786
|
# <!--
|
|
@@ -38,7 +38,7 @@ class TCPSocket < IPSocket
|
|
|
38
38
|
|
|
39
39
|
# <!--
|
|
40
40
|
# rdoc-file=ext/socket/tcpsocket.c
|
|
41
|
-
# - TCPSocket.new(remote_host, remote_port, local_host=nil, local_port=nil, resolv_timeout: nil, connect_timeout: nil, fast_fallback: true)
|
|
41
|
+
# - TCPSocket.new(remote_host, remote_port, local_host=nil, local_port=nil, resolv_timeout: nil, connect_timeout: nil, open_timeout: nil, fast_fallback: true)
|
|
42
42
|
# -->
|
|
43
43
|
# Opens a TCP connection to `remote_host` on `remote_port`. If `local_host` and
|
|
44
44
|
# `local_port` are specified, then those parameters are used on the local end to
|
|
@@ -72,8 +72,16 @@ class TCPSocket < IPSocket
|
|
|
72
72
|
# a timeout is set for each connection attempt and any connection attempt
|
|
73
73
|
# that exceeds its timeout will be canceled.
|
|
74
74
|
#
|
|
75
|
+
# :open_timeout
|
|
76
|
+
# : Specifies the timeout in seconds from the start of the method execution.
|
|
77
|
+
# If this timeout is reached while there are still addresses that have not
|
|
78
|
+
# yet been attempted for connection, no further attempts will be made.
|
|
79
|
+
# If this option is specified together with other timeout options, an
|
|
80
|
+
# `ArgumentError` will be raised.
|
|
81
|
+
#
|
|
75
82
|
# :fast_fallback
|
|
76
83
|
# : Enables the Happy Eyeballs Version 2 algorithm (enabled by default).
|
|
77
84
|
#
|
|
78
|
-
def initialize: (String remote_host, Integer remote_port, ?String local_host, ?Integer local_port) ->
|
|
85
|
+
def initialize: (String remote_host, Integer remote_port, ?String local_host, ?Integer local_port, ?fast_fallback: boolish, ?resolv_timeout: Integer, ?connect_timeout: Integer) -> void
|
|
86
|
+
| (String remote_host, Integer remote_port, ?String local_host, ?Integer local_port, ?fast_fallback: boolish, ?open_timeout: Integer) -> void
|
|
79
87
|
end
|