rbs 4.1.0.pre.1 → 4.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.
- checksums.yaml +4 -4
- data/.dockerignore +37 -0
- data/.github/workflows/bundle-update.yml +1 -1
- data/.github/workflows/c-check.yml +14 -6
- data/.github/workflows/comments.yml +2 -2
- data/.github/workflows/dependabot.yml +2 -2
- data/.github/workflows/jruby.yml +79 -0
- data/.github/workflows/milestone.yml +13 -2
- data/.github/workflows/ruby.yml +16 -4
- data/.github/workflows/rust.yml +13 -8
- data/.github/workflows/truffleruby.yml +54 -0
- data/.github/workflows/typecheck.yml +5 -2
- data/.github/workflows/wasm.yml +55 -0
- data/.github/workflows/windows.yml +8 -2
- data/.gitignore +8 -0
- data/CHANGELOG.md +88 -0
- data/Dockerfile.jruby +53 -0
- data/README.md +3 -3
- data/Rakefile +103 -1
- data/Steepfile +9 -0
- data/core/array.rbs +243 -180
- data/core/builtin.rbs +6 -6
- data/core/enumerable.rbs +109 -109
- data/core/enumerator/product.rbs +5 -5
- data/core/enumerator.rbs +28 -28
- data/core/file.rbs +24 -1018
- data/core/file_constants.rbs +463 -0
- data/core/file_stat.rbs +534 -0
- data/core/float.rbs +0 -24
- data/core/hash.rbs +117 -101
- data/core/integer.rbs +21 -58
- data/core/io.rbs +25 -7
- data/core/match_data.rbs +1 -1
- data/core/module.rbs +88 -74
- data/core/numeric.rbs +3 -0
- data/core/object_space/weak_key_map.rbs +7 -7
- data/core/pathname.rbs +0 -10
- data/core/ractor.rbs +0 -10
- data/core/range.rbs +23 -23
- data/core/rbs/ops.rbs +154 -0
- data/core/rbs/unnamed/argf.rbs +3 -3
- data/core/rubygems/errors.rbs +4 -1
- data/core/rubygems/requirement.rbs +0 -10
- data/core/rubygems/rubygems.rbs +4 -1
- data/core/rubygems/specification.rbs +8 -0
- data/core/rubygems/version.rbs +0 -160
- data/core/set.rbs +3 -3
- data/core/struct.rbs +16 -16
- data/core/thread.rbs +9 -14
- data/docs/CONTRIBUTING.md +2 -1
- data/docs/inline.md +36 -6
- data/docs/rbs_by_example.md +20 -20
- data/docs/release.md +69 -0
- data/docs/syntax.md +2 -2
- data/docs/wasm_serialization.md +80 -0
- data/ext/rbs_extension/ast_translation.c +1294 -973
- data/ext/rbs_extension/ast_translation.h +4 -0
- data/ext/rbs_extension/legacy_location.c +11 -6
- data/ext/rbs_extension/main.c +139 -4
- data/include/rbs/ast.h +9 -1
- data/include/rbs/serialize.h +39 -0
- data/lib/rbs/ast/ruby/comment_block.rb +6 -4
- data/lib/rbs/ast/ruby/helpers/location_helper.rb +1 -1
- data/lib/rbs/ast/ruby/members.rb +12 -1
- data/lib/rbs/buffer.rb +48 -11
- data/lib/rbs/collection/sources/git.rb +6 -0
- data/lib/rbs/definition_builder/method_builder.rb +12 -6
- data/lib/rbs/environment.rb +4 -3
- data/lib/rbs/inline_parser.rb +5 -3
- data/lib/rbs/namespace.rb +47 -11
- data/lib/rbs/parser_aux.rb +4 -2
- data/lib/rbs/prototype/rbi.rb +193 -25
- data/lib/rbs/prototype/runtime.rb +2 -0
- data/lib/rbs/resolver/type_name_resolver.rb +12 -14
- data/lib/rbs/type_name.rb +33 -13
- data/lib/rbs/unit_test/type_assertions.rb +9 -0
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs/wasm/deserializer.rb +213 -0
- data/lib/rbs/wasm/location.rb +61 -0
- data/lib/rbs/wasm/parser.rb +137 -0
- data/lib/rbs/wasm/runtime.rb +196 -0
- data/lib/rbs/wasm/serialization_schema.rb +110 -0
- data/lib/rbs.rb +13 -2
- data/lib/rbs_jars.rb +39 -0
- data/lib/rdoc_plugin/parser.rb +5 -0
- data/rbs.gemspec +32 -2
- data/sig/ast/ruby/members.rbs +6 -1
- data/sig/buffer.rbs +19 -1
- data/sig/namespace.rbs +20 -0
- data/sig/parser.rbs +10 -0
- data/sig/prototype/rbi.rbs +33 -4
- data/sig/resolver/type_name_resolver.rbs +2 -4
- data/sig/typename.rbs +15 -0
- data/sig/unit_test/type_assertions.rbs +4 -0
- data/sig/wasm/deserializer.rbs +66 -0
- data/sig/wasm/serialization_schema.rbs +13 -0
- data/src/ast.c +78 -78
- data/src/lexer.c +97 -93
- data/src/lexer.re +1 -1
- data/src/lexstate.c +9 -1
- data/src/serialize.c +958 -0
- data/src/util/rbs_allocator.c +14 -8
- data/stdlib/abbrev/0/array.rbs +1 -1
- data/stdlib/csv/0/csv.rbs +5 -5
- data/stdlib/delegate/0/delegator.rbs +2 -1
- data/stdlib/digest/0/digest.rbs +11 -5
- data/stdlib/erb/0/erb.rbs +1 -1
- data/stdlib/etc/0/etc.rbs +18 -4
- data/stdlib/fileutils/0/fileutils.rbs +21 -21
- data/stdlib/ipaddr/0/ipaddr.rbs +0 -5
- data/stdlib/json/0/json.rbs +6 -6
- data/stdlib/monitor/0/monitor.rbs +2 -2
- data/stdlib/openssl/0/openssl.rbs +44 -38
- data/stdlib/resolv/0/resolv.rbs +1 -1
- data/stdlib/shellwords/0/shellwords.rbs +1 -1
- data/stdlib/stringio/0/stringio.rbs +32 -10
- data/stdlib/strscan/0/string_scanner.rbs +74 -55
- data/stdlib/tempfile/0/manifest.yaml +3 -0
- data/stdlib/timeout/0/timeout.rbs +0 -5
- data/stdlib/tsort/0/cyclic.rbs +1 -1
- data/stdlib/tsort/0/interfaces.rbs +8 -8
- data/stdlib/tsort/0/tsort.rbs +9 -9
- data/stdlib/uri/0/generic.rbs +0 -5
- data/stdlib/zlib/0/gzip_reader.rbs +2 -2
- data/stdlib/zlib/0/zstream.rbs +0 -1
- data/wasm/README.md +60 -0
- data/wasm/rbs_wasm.c +423 -0
- metadata +26 -5
- data/.vscode/extensions.json +0 -5
- data/.vscode/settings.json +0 -19
data/src/util/rbs_allocator.c
CHANGED
|
@@ -25,10 +25,7 @@
|
|
|
25
25
|
#ifdef _WIN32
|
|
26
26
|
#include <windows.h>
|
|
27
27
|
#else
|
|
28
|
-
#include <unistd.h>
|
|
29
|
-
#include <sys/types.h>
|
|
30
|
-
#include <sys/mman.h>
|
|
31
|
-
#include <fcntl.h>
|
|
28
|
+
#include <unistd.h> // for sysconf()
|
|
32
29
|
#endif
|
|
33
30
|
|
|
34
31
|
typedef struct rbs_allocator_page {
|
|
@@ -42,15 +39,24 @@ typedef struct rbs_allocator_page {
|
|
|
42
39
|
size_t used;
|
|
43
40
|
} rbs_allocator_page_t;
|
|
44
41
|
|
|
42
|
+
// Normalize a raw page size to a safe value for payload_size subtraction.
|
|
43
|
+
// Falls back to 4096 when the raw value is <= 0 or smaller than the page
|
|
44
|
+
// header struct, preventing underflow in rbs_allocator_init.
|
|
45
|
+
// Internal API, intentionally omitted from the public header.
|
|
46
|
+
size_t rbs_allocator_normalize_page_size(long raw) {
|
|
47
|
+
if (raw <= 0) return 4096;
|
|
48
|
+
size_t page_size = (size_t) raw;
|
|
49
|
+
if (page_size <= sizeof(rbs_allocator_page_t)) return 4096;
|
|
50
|
+
return page_size;
|
|
51
|
+
}
|
|
52
|
+
|
|
45
53
|
static size_t get_system_page_size(void) {
|
|
46
54
|
#ifdef _WIN32
|
|
47
55
|
SYSTEM_INFO si;
|
|
48
56
|
GetSystemInfo(&si);
|
|
49
|
-
return si.dwPageSize;
|
|
57
|
+
return rbs_allocator_normalize_page_size((long) si.dwPageSize);
|
|
50
58
|
#else
|
|
51
|
-
|
|
52
|
-
if (sz == -1) return 4096; // Fallback to the common 4KB page size
|
|
53
|
-
return (size_t) sz;
|
|
59
|
+
return rbs_allocator_normalize_page_size(sysconf(_SC_PAGESIZE));
|
|
54
60
|
#endif
|
|
55
61
|
}
|
|
56
62
|
|
data/stdlib/abbrev/0/array.rbs
CHANGED
data/stdlib/csv/0/csv.rbs
CHANGED
|
@@ -2964,8 +2964,8 @@ end
|
|
|
2964
2964
|
# table['Name'] = ['Foo', 'Bar', 'Baz']
|
|
2965
2965
|
# table['Name'] # => ["Foo", "Bar", "Baz"]
|
|
2966
2966
|
#
|
|
2967
|
-
class CSV::Table[out
|
|
2968
|
-
include Enumerable[
|
|
2967
|
+
class CSV::Table[out E] < Object
|
|
2968
|
+
include Enumerable[E]
|
|
2969
2969
|
extend Forwardable
|
|
2970
2970
|
|
|
2971
2971
|
# <!--
|
|
@@ -3587,8 +3587,8 @@ class CSV::Table[out Elem] < Object
|
|
|
3587
3587
|
# Returns a new Enumerator if no block is given:
|
|
3588
3588
|
# table.each # => #<Enumerator: #<CSV::Table mode:col row_count:4>:each>
|
|
3589
3589
|
#
|
|
3590
|
-
def each: () -> Enumerator[
|
|
3591
|
-
| () { (
|
|
3590
|
+
def each: () -> Enumerator[E, self]
|
|
3591
|
+
| () { (E) -> void } -> self
|
|
3592
3592
|
| () { (*untyped) -> void } -> self
|
|
3593
3593
|
|
|
3594
3594
|
def empty?: (*untyped args) { (*untyped) -> untyped } -> untyped
|
|
@@ -3758,7 +3758,7 @@ class CSV::Table[out Elem] < Object
|
|
|
3758
3758
|
end
|
|
3759
3759
|
|
|
3760
3760
|
%a{annotate:rdoc:skip}
|
|
3761
|
-
class Array[unchecked out
|
|
3761
|
+
class Array[unchecked out E] < Object
|
|
3762
3762
|
# Equivalent to CSV::generate_line(self, options)
|
|
3763
3763
|
#
|
|
3764
3764
|
# ["CSV", "data"].to_csv
|
|
@@ -94,7 +94,7 @@ class Delegator < BasicObject
|
|
|
94
94
|
# rdoc-file=lib/delegate.rb
|
|
95
95
|
# - freeze()
|
|
96
96
|
# -->
|
|
97
|
-
#
|
|
97
|
+
# Freeze both the object returned by `__getobj__` and self.
|
|
98
98
|
#
|
|
99
99
|
def freeze: () -> self
|
|
100
100
|
|
|
@@ -118,6 +118,7 @@ class Delegator < BasicObject
|
|
|
118
118
|
# rdoc-file=lib/delegate.rb
|
|
119
119
|
# - method_missing(m, *args, &block)
|
|
120
120
|
# -->
|
|
121
|
+
# Handles the magic of delegation through `__getobj__`.
|
|
121
122
|
#
|
|
122
123
|
def method_missing: (Symbol m, *untyped args, **untyped) { (*untyped, **untyped) -> untyped } -> untyped
|
|
123
124
|
|
data/stdlib/digest/0/digest.rbs
CHANGED
|
@@ -303,7 +303,7 @@ module Digest::Instance
|
|
|
303
303
|
# uninitialized. Do not call this method from outside. Use #digest!() instead,
|
|
304
304
|
# which ensures that internal data be reset for security reasons.
|
|
305
305
|
#
|
|
306
|
-
def finish: () ->
|
|
306
|
+
def finish: () -> String
|
|
307
307
|
end
|
|
308
308
|
|
|
309
309
|
# <!-- rdoc-file=ext/digest/digest.c -->
|
|
@@ -536,13 +536,19 @@ class Digest::SHA2 < Digest::Class
|
|
|
536
536
|
#
|
|
537
537
|
def update: (String) -> self
|
|
538
538
|
|
|
539
|
-
private def finish: () -> String
|
|
540
|
-
|
|
541
539
|
# <!--
|
|
542
|
-
# rdoc-file=ext/digest/
|
|
543
|
-
# -
|
|
540
|
+
# rdoc-file=ext/digest/digest.c
|
|
541
|
+
# - digest_obj.instance_eval { finish } -> digest_obj
|
|
544
542
|
# -->
|
|
543
|
+
# Finishes the digest and returns the resulting hash value.
|
|
545
544
|
#
|
|
545
|
+
# This method is overridden by each implementation subclass and often made
|
|
546
|
+
# private, because some of those subclasses may leave internal data
|
|
547
|
+
# uninitialized. Do not call this method from outside. Use #digest!() instead,
|
|
548
|
+
# which ensures that internal data be reset for security reasons.
|
|
549
|
+
#
|
|
550
|
+
private def finish: () -> String
|
|
551
|
+
|
|
546
552
|
alias << update
|
|
547
553
|
|
|
548
554
|
# <!--
|
data/stdlib/erb/0/erb.rbs
CHANGED
data/stdlib/etc/0/etc.rbs
CHANGED
|
@@ -295,7 +295,7 @@ module Etc
|
|
|
295
295
|
# Etc.sysconf(Etc::SC_ARG_MAX) #=> 2097152
|
|
296
296
|
# Etc.sysconf(Etc::SC_LOGIN_NAME_MAX) #=> 256
|
|
297
297
|
#
|
|
298
|
-
def self?.sysconf: (::Integer p1) -> ::Integer
|
|
298
|
+
def self?.sysconf: (::Integer p1) -> ::Integer?
|
|
299
299
|
|
|
300
300
|
# <!--
|
|
301
301
|
# rdoc-file=ext/etc/etc.c
|
|
@@ -318,7 +318,7 @@ module Etc
|
|
|
318
318
|
# -->
|
|
319
319
|
# Returns system temporary directory; typically "/tmp".
|
|
320
320
|
#
|
|
321
|
-
def self?.systmpdir: () -> ::String
|
|
321
|
+
def self?.systmpdir: () -> ::String?
|
|
322
322
|
|
|
323
323
|
# <!--
|
|
324
324
|
# rdoc-file=ext/etc/etc.c
|
|
@@ -709,7 +709,8 @@ module Etc
|
|
|
709
709
|
# Etc::Group.collect {|g| g.name}
|
|
710
710
|
# Etc::Group.select {|g| !g.mem.empty?}
|
|
711
711
|
#
|
|
712
|
-
def self.each: () ->
|
|
712
|
+
def self.each: () { (::Etc::Group) -> void } -> singleton(::Etc::Group)
|
|
713
|
+
| () -> ::Enumerator[::Etc::Group]
|
|
713
714
|
|
|
714
715
|
def self.inspect: () -> untyped
|
|
715
716
|
|
|
@@ -817,7 +818,8 @@ module Etc
|
|
|
817
818
|
# Etc::Passwd.collect {|u| u.gecos}
|
|
818
819
|
# Etc::Passwd.collect {|u| u.gecos}
|
|
819
820
|
#
|
|
820
|
-
def self.each: () ->
|
|
821
|
+
def self.each: () { (::Etc::Passwd) -> void } -> singleton(::Etc::Passwd)
|
|
822
|
+
| () -> ::Enumerator[::Etc::Passwd]
|
|
821
823
|
|
|
822
824
|
def self.inspect: () -> untyped
|
|
823
825
|
|
|
@@ -827,10 +829,18 @@ module Etc
|
|
|
827
829
|
|
|
828
830
|
def self.new: (*untyped) -> untyped
|
|
829
831
|
|
|
832
|
+
def age: () -> Integer
|
|
833
|
+
|
|
834
|
+
def age=: (Integer new_age) -> void
|
|
835
|
+
|
|
830
836
|
def change: () -> Integer
|
|
831
837
|
|
|
832
838
|
def change=: (Integer new_change) -> void
|
|
833
839
|
|
|
840
|
+
def comment: () -> String
|
|
841
|
+
|
|
842
|
+
def comment=: (String new_comment) -> void
|
|
843
|
+
|
|
834
844
|
def dir: () -> String
|
|
835
845
|
|
|
836
846
|
def dir=: (String new_dir) -> void
|
|
@@ -855,6 +865,10 @@ module Etc
|
|
|
855
865
|
|
|
856
866
|
def passwd=: (String new_passwd) -> void
|
|
857
867
|
|
|
868
|
+
def quota: () -> Integer
|
|
869
|
+
|
|
870
|
+
def quota=: (Integer new_quota) -> void
|
|
871
|
+
|
|
858
872
|
def shell: () -> String
|
|
859
873
|
|
|
860
874
|
def shell=: (String new_shell) -> void
|
|
@@ -189,7 +189,7 @@ module FileUtils
|
|
|
189
189
|
%a{deprecated: Use top-level `path` instead}
|
|
190
190
|
type path = ::path
|
|
191
191
|
|
|
192
|
-
type pathlist = path | Array[path]
|
|
192
|
+
type pathlist = ::path | Array[::path]
|
|
193
193
|
|
|
194
194
|
# <!--
|
|
195
195
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -228,8 +228,8 @@ module FileUtils
|
|
|
228
228
|
#
|
|
229
229
|
# Related: FileUtils.pwd.
|
|
230
230
|
#
|
|
231
|
-
def self?.cd: (path dir, ?verbose: boolish) -> void
|
|
232
|
-
| [X] (path dir, ?verbose: boolish) { (String) -> X } -> X
|
|
231
|
+
def self?.cd: (::path dir, ?verbose: boolish) -> void
|
|
232
|
+
| [X] (::path dir, ?verbose: boolish) { (String) -> X } -> X
|
|
233
233
|
|
|
234
234
|
# <!--
|
|
235
235
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -444,7 +444,7 @@ module FileUtils
|
|
|
444
444
|
#
|
|
445
445
|
# Related: FileUtils.compare_stream.
|
|
446
446
|
#
|
|
447
|
-
def self?.compare_file: (path a, path b) -> bool
|
|
447
|
+
def self?.compare_file: (::path a, ::path b) -> bool
|
|
448
448
|
|
|
449
449
|
# <!--
|
|
450
450
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -538,7 +538,7 @@ module FileUtils
|
|
|
538
538
|
#
|
|
539
539
|
# Related: [methods for copying](rdoc-ref:FileUtils@Copying).
|
|
540
540
|
#
|
|
541
|
-
def self?.copy_entry: (path src, path dest, ?boolish preserve, ?boolish dereference_root, ?boolish remove_destination) -> void
|
|
541
|
+
def self?.copy_entry: (::path src, ::path dest, ?boolish preserve, ?boolish dereference_root, ?boolish remove_destination) -> void
|
|
542
542
|
|
|
543
543
|
# <!--
|
|
544
544
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -565,7 +565,7 @@ module FileUtils
|
|
|
565
565
|
#
|
|
566
566
|
# Related: [methods for copying](rdoc-ref:FileUtils@Copying).
|
|
567
567
|
#
|
|
568
|
-
def self?.copy_file: (path src, path dest, ?boolish preserve, ?boolish dereference) -> void
|
|
568
|
+
def self?.copy_file: (::path src, ::path dest, ?boolish preserve, ?boolish dereference) -> void
|
|
569
569
|
|
|
570
570
|
# <!--
|
|
571
571
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -633,7 +633,7 @@ module FileUtils
|
|
|
633
633
|
#
|
|
634
634
|
# Related: [methods for copying](rdoc-ref:FileUtils@Copying).
|
|
635
635
|
#
|
|
636
|
-
def self?.cp: (pathlist src, path dest, ?preserve: boolish, ?noop: boolish, ?verbose: boolish) -> void
|
|
636
|
+
def self?.cp: (pathlist src, ::path dest, ?preserve: boolish, ?noop: boolish, ?verbose: boolish) -> void
|
|
637
637
|
|
|
638
638
|
# <!--
|
|
639
639
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -750,7 +750,7 @@ module FileUtils
|
|
|
750
750
|
#
|
|
751
751
|
# Related: [methods for copying](rdoc-ref:FileUtils@Copying).
|
|
752
752
|
#
|
|
753
|
-
def self?.cp_lr: (pathlist src, path dest, ?noop: boolish, ?verbose: boolish, ?dereference_root: boolish, ?remove_destination: boolish) -> void
|
|
753
|
+
def self?.cp_lr: (pathlist src, ::path dest, ?noop: boolish, ?verbose: boolish, ?dereference_root: boolish, ?remove_destination: boolish) -> void
|
|
754
754
|
|
|
755
755
|
# <!--
|
|
756
756
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -856,7 +856,7 @@ module FileUtils
|
|
|
856
856
|
#
|
|
857
857
|
# Related: [methods for copying](rdoc-ref:FileUtils@Copying).
|
|
858
858
|
#
|
|
859
|
-
def self?.cp_r: (pathlist src, path dest, ?preserve: boolish, ?noop: boolish, ?verbose: boolish, ?dereference_root: boolish, ?remove_destination: boolish) -> void
|
|
859
|
+
def self?.cp_r: (pathlist src, ::path dest, ?preserve: boolish, ?noop: boolish, ?verbose: boolish, ?dereference_root: boolish, ?remove_destination: boolish) -> void
|
|
860
860
|
|
|
861
861
|
# <!--
|
|
862
862
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -937,7 +937,7 @@ module FileUtils
|
|
|
937
937
|
#
|
|
938
938
|
# Related: [methods for copying](rdoc-ref:FileUtils@Copying).
|
|
939
939
|
#
|
|
940
|
-
def self?.install: (path src, path dest, ?mode: mode?, ?owner: String?, ?group: String?, ?preserve: boolish, ?noop: boolish, ?verbose: boolish) -> void
|
|
940
|
+
def self?.install: (::path src, ::path dest, ?mode: mode?, ?owner: String?, ?group: String?, ?preserve: boolish, ?noop: boolish, ?verbose: boolish) -> void
|
|
941
941
|
|
|
942
942
|
# <!--
|
|
943
943
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -986,7 +986,7 @@ module FileUtils
|
|
|
986
986
|
#
|
|
987
987
|
# Related: FileUtils.ln (has different options).
|
|
988
988
|
#
|
|
989
|
-
def self?.link_entry: (path src, path dest, ?boolish dereference_root, ?boolish remove_destination) -> void
|
|
989
|
+
def self?.link_entry: (::path src, ::path dest, ?boolish dereference_root, ?boolish remove_destination) -> void
|
|
990
990
|
|
|
991
991
|
# <!--
|
|
992
992
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -1044,7 +1044,7 @@ module FileUtils
|
|
|
1044
1044
|
#
|
|
1045
1045
|
# Related: FileUtils.link_entry (has different options).
|
|
1046
1046
|
#
|
|
1047
|
-
def self?.ln: (pathlist src, path dest, ?force: boolish, ?noop: boolish, ?verbose: boolish) -> void
|
|
1047
|
+
def self?.ln: (pathlist src, ::path dest, ?force: boolish, ?noop: boolish, ?verbose: boolish) -> void
|
|
1048
1048
|
|
|
1049
1049
|
# <!--
|
|
1050
1050
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -1131,7 +1131,7 @@ module FileUtils
|
|
|
1131
1131
|
#
|
|
1132
1132
|
# Related: FileUtils.ln_sf.
|
|
1133
1133
|
#
|
|
1134
|
-
def self?.ln_s: (pathlist src, path dest, ?force: boolish, ?relative: boolish, ?target_directory: boolish, ?noop: boolish, ?verbose: boolish) -> void
|
|
1134
|
+
def self?.ln_s: (pathlist src, ::path dest, ?force: boolish, ?relative: boolish, ?target_directory: boolish, ?noop: boolish, ?verbose: boolish) -> void
|
|
1135
1135
|
|
|
1136
1136
|
# <!--
|
|
1137
1137
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -1154,7 +1154,7 @@ module FileUtils
|
|
|
1154
1154
|
# Like FileUtils.ln_s, but always with keyword argument <code>force: true</code>
|
|
1155
1155
|
# given.
|
|
1156
1156
|
#
|
|
1157
|
-
def self?.ln_sf: (pathlist src, path dest, ?noop: boolish, ?verbose: boolish) -> void
|
|
1157
|
+
def self?.ln_sf: (pathlist src, ::path dest, ?noop: boolish, ?verbose: boolish) -> void
|
|
1158
1158
|
|
|
1159
1159
|
# <!--
|
|
1160
1160
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -1162,7 +1162,7 @@ module FileUtils
|
|
|
1162
1162
|
# -->
|
|
1163
1163
|
# Like FileUtils.ln_s, but create links relative to `dest`.
|
|
1164
1164
|
#
|
|
1165
|
-
def self?.ln_sr: (pathlist src, path dest, ?target_directory: boolish, ?noop: boolish, ?verbose: boolish) -> void
|
|
1165
|
+
def self?.ln_sr: (pathlist src, ::path dest, ?target_directory: boolish, ?noop: boolish, ?verbose: boolish) -> void
|
|
1166
1166
|
|
|
1167
1167
|
# <!--
|
|
1168
1168
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -1339,7 +1339,7 @@ module FileUtils
|
|
|
1339
1339
|
# mv src0 dest0
|
|
1340
1340
|
# mv src1.txt src1 dest1
|
|
1341
1341
|
#
|
|
1342
|
-
def self?.mv: (pathlist src, path dest, ?force: boolish, ?noop: boolish, ?verbose: boolish, ?secure: boolish) -> void
|
|
1342
|
+
def self?.mv: (pathlist src, ::path dest, ?force: boolish, ?noop: boolish, ?verbose: boolish, ?secure: boolish) -> void
|
|
1343
1343
|
|
|
1344
1344
|
# <!--
|
|
1345
1345
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -1418,7 +1418,7 @@ module FileUtils
|
|
|
1418
1418
|
#
|
|
1419
1419
|
# Related: [methods for deleting](rdoc-ref:FileUtils@Deleting).
|
|
1420
1420
|
#
|
|
1421
|
-
def self?.remove_dir: (path path, ?boolish force) -> void
|
|
1421
|
+
def self?.remove_dir: (::path path, ?boolish force) -> void
|
|
1422
1422
|
|
|
1423
1423
|
# <!--
|
|
1424
1424
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -1435,7 +1435,7 @@ module FileUtils
|
|
|
1435
1435
|
#
|
|
1436
1436
|
# Related: FileUtils.remove_entry_secure.
|
|
1437
1437
|
#
|
|
1438
|
-
def self?.remove_entry: (path path, ?boolish force) -> void
|
|
1438
|
+
def self?.remove_entry: (::path path, ?boolish force) -> void
|
|
1439
1439
|
|
|
1440
1440
|
# <!--
|
|
1441
1441
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -1456,7 +1456,7 @@ module FileUtils
|
|
|
1456
1456
|
#
|
|
1457
1457
|
# Related: [methods for deleting](rdoc-ref:FileUtils@Deleting).
|
|
1458
1458
|
#
|
|
1459
|
-
def self?.remove_entry_secure: (path path, ?boolish force) -> void
|
|
1459
|
+
def self?.remove_entry_secure: (::path path, ?boolish force) -> void
|
|
1460
1460
|
|
|
1461
1461
|
# <!--
|
|
1462
1462
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -1473,7 +1473,7 @@ module FileUtils
|
|
|
1473
1473
|
#
|
|
1474
1474
|
# Related: [methods for deleting](rdoc-ref:FileUtils@Deleting).
|
|
1475
1475
|
#
|
|
1476
|
-
def self?.remove_file: (path path, ?boolish force) -> void
|
|
1476
|
+
def self?.remove_file: (::path path, ?boolish force) -> void
|
|
1477
1477
|
|
|
1478
1478
|
# <!--
|
|
1479
1479
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -1749,5 +1749,5 @@ module FileUtils
|
|
|
1749
1749
|
#
|
|
1750
1750
|
# Related: FileUtils.touch.
|
|
1751
1751
|
#
|
|
1752
|
-
def self?.uptodate?: (path new, _Each[path] old_list) -> bool
|
|
1752
|
+
def self?.uptodate?: (::path new, _Each[::path] old_list) -> bool
|
|
1753
1753
|
end
|
data/stdlib/ipaddr/0/ipaddr.rbs
CHANGED
data/stdlib/json/0/json.rbs
CHANGED
|
@@ -1307,7 +1307,7 @@ class Hash[unchecked out K, unchecked out V]
|
|
|
1307
1307
|
end
|
|
1308
1308
|
|
|
1309
1309
|
%a{annotate:rdoc:skip}
|
|
1310
|
-
class Array[unchecked out
|
|
1310
|
+
class Array[unchecked out E]
|
|
1311
1311
|
# Returns a JSON string containing a JSON array, that is generated from
|
|
1312
1312
|
# this Array instance.
|
|
1313
1313
|
# _state_ is a JSON::State object, that can also be used to configure the
|
|
@@ -1616,7 +1616,7 @@ class OpenStruct
|
|
|
1616
1616
|
end
|
|
1617
1617
|
|
|
1618
1618
|
%a{annotate:rdoc:skip}
|
|
1619
|
-
class Range[out
|
|
1619
|
+
class Range[out E]
|
|
1620
1620
|
# <!--
|
|
1621
1621
|
# rdoc-file=ext/json/lib/json/add/range.rb
|
|
1622
1622
|
# - json_create(object)
|
|
@@ -1648,7 +1648,7 @@ class Range[out Elem]
|
|
|
1648
1648
|
# Range.json_create(y) # => 1...4
|
|
1649
1649
|
# Range.json_create(z) # => "a".."d"
|
|
1650
1650
|
#
|
|
1651
|
-
def as_json: (*untyped) -> Hash[String, String | [
|
|
1651
|
+
def as_json: (*untyped) -> Hash[String, String | [ E, E, bool ]]
|
|
1652
1652
|
|
|
1653
1653
|
# <!--
|
|
1654
1654
|
# rdoc-file=ext/json/lib/json/add/range.rb
|
|
@@ -1815,14 +1815,14 @@ class Set[unchecked out A]
|
|
|
1815
1815
|
end
|
|
1816
1816
|
|
|
1817
1817
|
%a{annotate:rdoc:skip}
|
|
1818
|
-
class Struct[
|
|
1818
|
+
class Struct[E]
|
|
1819
1819
|
# <!--
|
|
1820
1820
|
# rdoc-file=ext/json/lib/json/add/struct.rb
|
|
1821
1821
|
# - json_create(object)
|
|
1822
1822
|
# -->
|
|
1823
1823
|
# See #as_json.
|
|
1824
1824
|
#
|
|
1825
|
-
def self.json_create: [
|
|
1825
|
+
def self.json_create: [E] (Hash[String, String | Array[E]] object) -> Struct[E]
|
|
1826
1826
|
|
|
1827
1827
|
# <!--
|
|
1828
1828
|
# rdoc-file=ext/json/lib/json/add/struct.rb
|
|
@@ -1846,7 +1846,7 @@ class Struct[Elem]
|
|
|
1846
1846
|
# Struct::Customer.json_create(x)
|
|
1847
1847
|
# # => #<struct Struct::Customer name=nil, address=nil, zip=nil>
|
|
1848
1848
|
#
|
|
1849
|
-
def as_json: (*untyped) -> Hash[String, String | Array[
|
|
1849
|
+
def as_json: (*untyped) -> Hash[String, String | Array[E]]
|
|
1850
1850
|
|
|
1851
1851
|
# <!--
|
|
1852
1852
|
# rdoc-file=ext/json/lib/json/add/struct.rb
|
|
@@ -338,7 +338,7 @@ class MonitorMixin::ConditionVariable
|
|
|
338
338
|
|
|
339
339
|
# <!--
|
|
340
340
|
# rdoc-file=ext/monitor/lib/monitor.rb
|
|
341
|
-
# - wait_until()
|
|
341
|
+
# - wait_until() { || ... }
|
|
342
342
|
# -->
|
|
343
343
|
# Calls wait repeatedly until the given block yields a truthy value.
|
|
344
344
|
#
|
|
@@ -346,7 +346,7 @@ class MonitorMixin::ConditionVariable
|
|
|
346
346
|
|
|
347
347
|
# <!--
|
|
348
348
|
# rdoc-file=ext/monitor/lib/monitor.rb
|
|
349
|
-
# - wait_while()
|
|
349
|
+
# - wait_while() { || ... }
|
|
350
350
|
# -->
|
|
351
351
|
# Calls wait repeatedly while the given block yields a truthy value.
|
|
352
352
|
#
|
|
@@ -2100,7 +2100,7 @@ module OpenSSL
|
|
|
2100
2100
|
#
|
|
2101
2101
|
# See IO#read for full details.
|
|
2102
2102
|
#
|
|
2103
|
-
def read: (?Integer? size, ?String buf) -> String?
|
|
2103
|
+
def read: (?Integer? size, ?String? buf) -> String?
|
|
2104
2104
|
|
|
2105
2105
|
# <!--
|
|
2106
2106
|
# rdoc-file=ext/openssl/lib/openssl/buffering.rb
|
|
@@ -2139,8 +2139,8 @@ module OpenSSL
|
|
|
2139
2139
|
# symbol <code>:wait_writable</code> or <code>:wait_readable</code> instead. At
|
|
2140
2140
|
# EOF, it will return `nil` instead of raising EOFError.
|
|
2141
2141
|
#
|
|
2142
|
-
def read_nonblock: (Integer maxlen, ?String buf, ?exception: true) -> String
|
|
2143
|
-
| (Integer maxlen, ?String buf, exception: false) -> (String | :wait_writable | :wait_readable | nil)
|
|
2142
|
+
def read_nonblock: (Integer maxlen, ?String? buf, ?exception: true) -> String
|
|
2143
|
+
| (Integer maxlen, ?String? buf, exception: false) -> (String | :wait_writable | :wait_readable | nil)
|
|
2144
2144
|
|
|
2145
2145
|
# <!--
|
|
2146
2146
|
# rdoc-file=ext/openssl/lib/openssl/buffering.rb
|
|
@@ -2180,7 +2180,7 @@ module OpenSSL
|
|
|
2180
2180
|
#
|
|
2181
2181
|
# See IO#readpartial for full details.
|
|
2182
2182
|
#
|
|
2183
|
-
def readpartial: (Integer maxlen, ?String buf) -> String
|
|
2183
|
+
def readpartial: (Integer maxlen, ?String? buf) -> String
|
|
2184
2184
|
|
|
2185
2185
|
# <!-- rdoc-file=ext/openssl/lib/openssl/buffering.rb -->
|
|
2186
2186
|
# The "sync mode" of the SSLSocket.
|
|
@@ -5913,10 +5913,17 @@ module OpenSSL
|
|
|
5913
5913
|
def initialize_copy: (self) -> void
|
|
5914
5914
|
end
|
|
5915
5915
|
|
|
5916
|
-
# <!-- rdoc-file=ext/openssl/
|
|
5917
|
-
#
|
|
5918
|
-
#
|
|
5919
|
-
#
|
|
5916
|
+
# <!-- rdoc-file=ext/openssl/ossl_pkey.c -->
|
|
5917
|
+
# Raised when errors occur during PKey#sign or PKey#verify.
|
|
5918
|
+
#
|
|
5919
|
+
# Before version 4.0.0, OpenSSL::PKey::PKeyError had the following subclasses.
|
|
5920
|
+
# These subclasses have been removed and the constants are now defined as
|
|
5921
|
+
# aliases of OpenSSL::PKey::PKeyError.
|
|
5922
|
+
#
|
|
5923
|
+
# * OpenSSL::PKey::DHError
|
|
5924
|
+
# * OpenSSL::PKey::DSAError
|
|
5925
|
+
# * OpenSSL::PKey::ECError
|
|
5926
|
+
# * OpenSSL::PKey::RSAError
|
|
5920
5927
|
#
|
|
5921
5928
|
class DHError < OpenSSL::PKey::PKeyError
|
|
5922
5929
|
end
|
|
@@ -6304,10 +6311,17 @@ module OpenSSL
|
|
|
6304
6311
|
def initialize_copy: (self) -> void
|
|
6305
6312
|
end
|
|
6306
6313
|
|
|
6307
|
-
# <!-- rdoc-file=ext/openssl/
|
|
6308
|
-
#
|
|
6309
|
-
#
|
|
6310
|
-
#
|
|
6314
|
+
# <!-- rdoc-file=ext/openssl/ossl_pkey.c -->
|
|
6315
|
+
# Raised when errors occur during PKey#sign or PKey#verify.
|
|
6316
|
+
#
|
|
6317
|
+
# Before version 4.0.0, OpenSSL::PKey::PKeyError had the following subclasses.
|
|
6318
|
+
# These subclasses have been removed and the constants are now defined as
|
|
6319
|
+
# aliases of OpenSSL::PKey::PKeyError.
|
|
6320
|
+
#
|
|
6321
|
+
# * OpenSSL::PKey::DHError
|
|
6322
|
+
# * OpenSSL::PKey::DSAError
|
|
6323
|
+
# * OpenSSL::PKey::ECError
|
|
6324
|
+
# * OpenSSL::PKey::RSAError
|
|
6311
6325
|
#
|
|
6312
6326
|
class DSAError < OpenSSL::PKey::PKeyError
|
|
6313
6327
|
end
|
|
@@ -7011,6 +7025,18 @@ module OpenSSL
|
|
|
7011
7025
|
end
|
|
7012
7026
|
end
|
|
7013
7027
|
|
|
7028
|
+
# <!-- rdoc-file=ext/openssl/ossl_pkey.c -->
|
|
7029
|
+
# Raised when errors occur during PKey#sign or PKey#verify.
|
|
7030
|
+
#
|
|
7031
|
+
# Before version 4.0.0, OpenSSL::PKey::PKeyError had the following subclasses.
|
|
7032
|
+
# These subclasses have been removed and the constants are now defined as
|
|
7033
|
+
# aliases of OpenSSL::PKey::PKeyError.
|
|
7034
|
+
#
|
|
7035
|
+
# * OpenSSL::PKey::DHError
|
|
7036
|
+
# * OpenSSL::PKey::DSAError
|
|
7037
|
+
# * OpenSSL::PKey::ECError
|
|
7038
|
+
# * OpenSSL::PKey::RSAError
|
|
7039
|
+
#
|
|
7014
7040
|
class ECError < OpenSSL::PKey::PKeyError
|
|
7015
7041
|
end
|
|
7016
7042
|
|
|
@@ -9235,7 +9261,7 @@ module OpenSSL
|
|
|
9235
9261
|
# Reads *length* bytes from the SSL connection. If a pre-allocated *buffer* is
|
|
9236
9262
|
# provided the data will be written into it.
|
|
9237
9263
|
#
|
|
9238
|
-
def sysread: (Integer length, ?String buffer) -> String
|
|
9264
|
+
def sysread: (Integer length, ?String? buffer) -> String
|
|
9239
9265
|
|
|
9240
9266
|
# <!--
|
|
9241
9267
|
# rdoc-file=ext/openssl/ossl_ssl.c
|
|
@@ -9282,6 +9308,7 @@ module OpenSSL
|
|
|
9282
9308
|
# rdoc-file=ext/openssl/ossl_ssl.c
|
|
9283
9309
|
# - SSLSocket.new(io) => aSSLSocket
|
|
9284
9310
|
# - SSLSocket.new(io, ctx) => aSSLSocket
|
|
9311
|
+
# - SSLSocket.new(io, ctx, sync_close:) => aSSLSocket
|
|
9285
9312
|
# -->
|
|
9286
9313
|
# Creates a new SSL socket from *io* which must be a real IO object (not an
|
|
9287
9314
|
# IO-like object that responds to read/write).
|
|
@@ -9289,6 +9316,10 @@ module OpenSSL
|
|
|
9289
9316
|
# If *ctx* is provided the SSL Sockets initial params will be taken from the
|
|
9290
9317
|
# context.
|
|
9291
9318
|
#
|
|
9319
|
+
# The optional *sync_close* keyword parameter sets the *sync_close* instance
|
|
9320
|
+
# variable. Setting this to `true` will cause the underlying socket to be closed
|
|
9321
|
+
# when the SSL/TLS connection is shut down.
|
|
9322
|
+
#
|
|
9292
9323
|
# The OpenSSL::Buffering module provides additional IO methods.
|
|
9293
9324
|
#
|
|
9294
9325
|
# This method will freeze the SSLContext if one is provided; however, session
|
|
@@ -10390,11 +10421,6 @@ module OpenSSL
|
|
|
10390
10421
|
|
|
10391
10422
|
extend OpenSSL::Marshal::ClassMethods
|
|
10392
10423
|
|
|
10393
|
-
# <!--
|
|
10394
|
-
# rdoc-file=ext/openssl/lib/openssl/x509.rb
|
|
10395
|
-
# - ==(other)
|
|
10396
|
-
# -->
|
|
10397
|
-
#
|
|
10398
10424
|
def ==: (self other) -> bool
|
|
10399
10425
|
|
|
10400
10426
|
# <!--
|
|
@@ -10462,11 +10488,6 @@ module OpenSSL
|
|
|
10462
10488
|
|
|
10463
10489
|
extend OpenSSL::Marshal::ClassMethods
|
|
10464
10490
|
|
|
10465
|
-
# <!--
|
|
10466
|
-
# rdoc-file=ext/openssl/lib/openssl/x509.rb
|
|
10467
|
-
# - ==(other)
|
|
10468
|
-
# -->
|
|
10469
|
-
#
|
|
10470
10491
|
def ==: (self other) -> bool
|
|
10471
10492
|
|
|
10472
10493
|
# <!--
|
|
@@ -10982,11 +11003,6 @@ module OpenSSL
|
|
|
10982
11003
|
|
|
10983
11004
|
extend OpenSSL::Marshal::ClassMethods
|
|
10984
11005
|
|
|
10985
|
-
# <!--
|
|
10986
|
-
# rdoc-file=ext/openssl/lib/openssl/x509.rb
|
|
10987
|
-
# - ==(other)
|
|
10988
|
-
# -->
|
|
10989
|
-
#
|
|
10990
11006
|
def ==: (self other) -> bool
|
|
10991
11007
|
|
|
10992
11008
|
# <!--
|
|
@@ -11610,11 +11626,6 @@ module OpenSSL
|
|
|
11610
11626
|
|
|
11611
11627
|
extend OpenSSL::Marshal::ClassMethods
|
|
11612
11628
|
|
|
11613
|
-
# <!--
|
|
11614
|
-
# rdoc-file=ext/openssl/lib/openssl/x509.rb
|
|
11615
|
-
# - ==(other)
|
|
11616
|
-
# -->
|
|
11617
|
-
#
|
|
11618
11629
|
def ==: (untyped other) -> bool
|
|
11619
11630
|
|
|
11620
11631
|
# <!--
|
|
@@ -11755,11 +11766,6 @@ module OpenSSL
|
|
|
11755
11766
|
end
|
|
11756
11767
|
|
|
11757
11768
|
class Revoked
|
|
11758
|
-
# <!--
|
|
11759
|
-
# rdoc-file=ext/openssl/lib/openssl/x509.rb
|
|
11760
|
-
# - ==(other)
|
|
11761
|
-
# -->
|
|
11762
|
-
#
|
|
11763
11769
|
def ==: (untyped other) -> bool
|
|
11764
11770
|
|
|
11765
11771
|
# <!--
|
data/stdlib/resolv/0/resolv.rbs
CHANGED
|
@@ -134,7 +134,7 @@ class Resolv
|
|
|
134
134
|
# DNS resolver. If `resolvers` is a hash, uses the hash as configuration for
|
|
135
135
|
# the DNS resolver.
|
|
136
136
|
#
|
|
137
|
-
def initialize: (?Resolv::Hosts | Resolv::DNS resolvers) -> untyped
|
|
137
|
+
def initialize: (?(Array[Resolv::Hosts | Resolv::DNS] | Hash[Symbol, untyped])? resolvers, ?use_ipv6: bool?) -> untyped
|
|
138
138
|
end
|
|
139
139
|
|
|
140
140
|
# <!-- rdoc-file=lib/resolv.rb -->
|