rbs 3.5.3 → 3.6.0.pre.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/dependabot.yml +5 -1
  3. data/.github/workflows/ruby.yml +2 -18
  4. data/.github/workflows/windows.yml +26 -0
  5. data/.rubocop.yml +28 -1
  6. data/CHANGELOG.md +58 -0
  7. data/Rakefile +8 -2
  8. data/core/array.rbs +10 -10
  9. data/core/basic_object.rbs +4 -4
  10. data/core/builtin.rbs +4 -4
  11. data/core/dir.rbs +1 -1
  12. data/core/enumerable.rbs +17 -11
  13. data/core/enumerator/product.rbs +1 -1
  14. data/core/enumerator.rbs +9 -2
  15. data/core/errors.rbs +1 -1
  16. data/core/exception.rbs +1 -1
  17. data/core/fiber.rbs +1 -1
  18. data/core/file.rbs +1 -1
  19. data/core/global_variables.rbs +2 -2
  20. data/core/integer.rbs +4 -4
  21. data/core/kernel.rbs +69 -40
  22. data/core/method.rbs +98 -7
  23. data/core/module.rbs +3 -3
  24. data/core/proc.rbs +184 -23
  25. data/core/ractor.rbs +1 -1
  26. data/core/random.rbs +1 -1
  27. data/core/range.rbs +30 -0
  28. data/core/rbs/unnamed/env_class.rbs +7 -7
  29. data/core/rbs/unnamed/random.rbs +14 -14
  30. data/core/refinement.rbs +16 -26
  31. data/core/regexp.rbs +2 -2
  32. data/core/symbol.rbs +34 -26
  33. data/core/thread.rbs +8 -7
  34. data/core/trace_point.rbs +12 -12
  35. data/core/unbound_method.rbs +1 -1
  36. data/docs/syntax.md +26 -12
  37. data/ext/rbs_extension/lexer.c +1 -1
  38. data/ext/rbs_extension/lexer.h +5 -0
  39. data/ext/rbs_extension/lexer.re +1 -1
  40. data/ext/rbs_extension/lexstate.c +16 -0
  41. data/ext/rbs_extension/location.c +27 -39
  42. data/ext/rbs_extension/location.h +7 -2
  43. data/ext/rbs_extension/parser.c +119 -51
  44. data/ext/rbs_extension/ruby_objs.c +2 -1
  45. data/ext/rbs_extension/ruby_objs.h +1 -1
  46. data/lib/rbs/ast/declarations.rb +36 -0
  47. data/lib/rbs/ast/type_param.rb +71 -15
  48. data/lib/rbs/ast/visitor.rb +137 -0
  49. data/lib/rbs/buffer.rb +5 -0
  50. data/lib/rbs/cli/validate.rb +81 -7
  51. data/lib/rbs/cli.rb +3 -3
  52. data/lib/rbs/definition.rb +2 -1
  53. data/lib/rbs/definition_builder/ancestor_builder.rb +30 -4
  54. data/lib/rbs/definition_builder.rb +21 -6
  55. data/lib/rbs/environment_loader.rb +1 -1
  56. data/lib/rbs/errors.rb +8 -3
  57. data/lib/rbs/file_finder.rb +9 -12
  58. data/lib/rbs/location_aux.rb +2 -6
  59. data/lib/rbs/locator.rb +8 -5
  60. data/lib/rbs/prototype/rbi.rb +2 -1
  61. data/lib/rbs/prototype/runtime.rb +3 -2
  62. data/lib/rbs/sorter.rb +9 -6
  63. data/lib/rbs/test/type_check.rb +13 -0
  64. data/lib/rbs/types.rb +11 -0
  65. data/lib/rbs/validator.rb +2 -2
  66. data/lib/rbs/vendorer.rb +3 -3
  67. data/lib/rbs/version.rb +1 -1
  68. data/lib/rbs.rb +1 -0
  69. data/sig/declarations.rbs +6 -0
  70. data/sig/definition.rbs +1 -1
  71. data/sig/definition_builder.rbs +3 -1
  72. data/sig/errors.rbs +3 -2
  73. data/sig/file_finder.rbs +24 -2
  74. data/sig/location.rbs +0 -3
  75. data/sig/method_types.rbs +1 -1
  76. data/sig/sorter.rbs +1 -1
  77. data/sig/type_param.rbs +41 -9
  78. data/sig/types.rbs +12 -0
  79. data/sig/visitor.rbs +47 -0
  80. data/stdlib/csv/0/csv.rbs +44 -6
  81. data/stdlib/digest/0/digest.rbs +22 -28
  82. data/stdlib/ipaddr/0/ipaddr.rbs +1 -1
  83. data/stdlib/kconv/0/kconv.rbs +166 -0
  84. data/stdlib/net-http/0/net-http.rbs +2 -2
  85. data/stdlib/psych/0/store.rbs +1 -1
  86. data/stdlib/uri/0/ldap.rbs +1 -1
  87. data/stdlib/zlib/0/deflate.rbs +1 -1
  88. data/stdlib/zlib/0/gzip_reader.rbs +5 -1
  89. metadata +6 -2
data/stdlib/csv/0/csv.rbs CHANGED
@@ -1722,8 +1722,8 @@ class CSV < Object
1722
1722
  # would read `UTF-32BE` data from the file but transcode it to `UTF-8`
1723
1723
  # before parsing.
1724
1724
  #
1725
- def self.foreach: (String | IO path, ?String mode, headers: true, **untyped options) { (::CSV::Row arg0) -> void } -> void
1726
- | (String | IO path, ?String mode, headers: true, **untyped options) -> Enumerator[::CSV::Row, void]
1725
+ def self.foreach: (String | IO path, ?String mode, headers: true | :first_row | Array[untyped] | String, **untyped options) { (::CSV::Row arg0) -> void } -> void
1726
+ | (String | IO path, ?String mode, headers: true | :first_row | Array[untyped] | String, **untyped options) -> Enumerator[::CSV::Row, void]
1727
1727
  | (String | IO path, ?String mode, **untyped options) { (::Array[String?] arg0) -> void } -> void
1728
1728
  | (String | IO path, ?String mode, **untyped options) -> Enumerator[::Array[String?], void]
1729
1729
 
@@ -2031,7 +2031,8 @@ class CSV < Object
2031
2031
  # File.write(path, string)
2032
2032
  # CSV.read(path, headers: true) # => #<CSV::Table mode:col_or_row row_count:4>
2033
2033
  #
2034
- def self.read: (String path, ?::Hash[Symbol, untyped] options) -> ::Array[::Array[String?]]
2034
+ def self.read: (String | IO path, headers: true | :first_row | Array[untyped] | String, **untyped options) -> ::CSV::Table[CSV::Row]
2035
+ | (String | IO path, ?::Hash[Symbol, untyped] options) -> ::Array[::Array[String?]]
2035
2036
 
2036
2037
  # <!--
2037
2038
  # rdoc-file=lib/csv.rb
@@ -2195,6 +2196,16 @@ class CSV < Object
2195
2196
  #
2196
2197
  def each: () -> Enumerator[untyped, Integer]
2197
2198
  | () { (untyped) -> void } -> Integer
2199
+
2200
+ # <!--
2201
+ # rdoc-file=lib/csv.rb
2202
+ # - csv.headers -> object
2203
+ # -->
2204
+ # Returns the value that determines whether headers are used; used for parsing;
2205
+ # see {Option `headers`[}](#class-CSV-label-Option+headers):
2206
+ # CSV.new('').headers # => nil
2207
+ #
2208
+ def headers: () -> (Array[String] | true | nil)
2198
2209
  end
2199
2210
 
2200
2211
  # <!-- rdoc-file=lib/csv.rb -->
@@ -2287,6 +2298,33 @@ class CSV::Row < Object
2287
2298
  include Enumerable[Array[String]]
2288
2299
  extend Forwardable
2289
2300
 
2301
+ # <!--
2302
+ # rdoc-file=lib/csv/row.rb
2303
+ # - CSV::Row.new(headers, fields, header_row = false) -> csv_row
2304
+ # -->
2305
+ # Returns the new CSV::Row instance constructed from arguments `headers` and
2306
+ # `fields`; both should be Arrays; note that the fields need not be Strings:
2307
+ # row = CSV::Row.new(['Name', 'Value'], ['foo', 0])
2308
+ # row # => #<CSV::Row "Name":"foo" "Value":0>
2309
+ #
2310
+ # If the Array lengths are different, the shorter is `nil`-filled:
2311
+ # row = CSV::Row.new(['Name', 'Value', 'Date', 'Size'], ['foo', 0])
2312
+ # row # => #<CSV::Row "Name":"foo" "Value":0 "Date":nil "Size":nil>
2313
+ #
2314
+ # Each CSV::Row object is either a *field row* or a *header row*; by default, a
2315
+ # new row is a field row; for the row created above:
2316
+ # row.field_row? # => true
2317
+ # row.header_row? # => false
2318
+ #
2319
+ # If the optional argument `header_row` is given as `true`, the created row is a
2320
+ # header row:
2321
+ # row = CSV::Row.new(['Name', 'Value'], ['foo', 0], header_row = true)
2322
+ # row # => #<CSV::Row "Name":"foo" "Value":0>
2323
+ # row.field_row? # => false
2324
+ # row.header_row? # => true
2325
+ #
2326
+ def initialize: (Array[untyped] headers, Array[untyped] fields, ?header_row: bool) -> void
2327
+
2290
2328
  # <!--
2291
2329
  # rdoc-file=lib/csv/row.rb
2292
2330
  # - row << [header, value] -> self
@@ -2975,7 +3013,7 @@ end
2975
3013
  # table['Name'] # => ["Foo", "Bar", "Baz"]
2976
3014
  #
2977
3015
  class CSV::Table[out Elem] < Object
2978
- include Enumerable[untyped]
3016
+ include Enumerable[Elem]
2979
3017
  extend Forwardable
2980
3018
 
2981
3019
  # <!--
@@ -3606,8 +3644,8 @@ class CSV::Table[out Elem] < Object
3606
3644
  # Returns a new Enumerator if no block is given:
3607
3645
  # table.each # => #<Enumerator: #<CSV::Table mode:col row_count:4>:each>
3608
3646
  #
3609
- def each: () -> Enumerator[untyped, self]
3610
- | () { (untyped) -> void } -> self
3647
+ def each: () -> Enumerator[Elem, self]
3648
+ | () { (Elem) -> void } -> self
3611
3649
  | () { (*untyped) -> void } -> self
3612
3650
 
3613
3651
  def empty?: (*untyped args) { (*untyped) -> untyped } -> untyped
@@ -74,7 +74,7 @@ module Digest
74
74
  # -->
75
75
  # Returns a BubbleBabble encoded version of a given *string*.
76
76
  #
77
- def self.bubblebabble: (String) -> String
77
+ def self.bubblebabble: (string) -> String
78
78
 
79
79
  def self.const_missing: (Symbol name) -> singleton(::Digest::Base)
80
80
 
@@ -84,13 +84,13 @@ module Digest
84
84
  # -->
85
85
  # Generates a hex-encoded version of a given *string*.
86
86
  #
87
- def self.hexencode: (String) -> String
87
+ def self.hexencode: (string) -> String
88
88
 
89
89
  private
90
90
 
91
- def bubblebabble: (String) -> String
91
+ def bubblebabble: (string) -> String
92
92
 
93
- def hexencode: (String) -> String
93
+ def hexencode: (string) -> String
94
94
  end
95
95
 
96
96
  # <!-- rdoc-file=ext/digest/lib/digest.rb -->
@@ -111,7 +111,7 @@ module Digest::Instance
111
111
  # The update() method and the left-shift operator are overridden by each
112
112
  # implementation subclass. (One should be an alias for the other)
113
113
  #
114
- def <<: (String) -> self
114
+ def <<: (string) -> self
115
115
 
116
116
  # <!--
117
117
  # rdoc-file=ext/digest/digest.c
@@ -122,7 +122,7 @@ module Digest::Instance
122
122
  # of the digest object. If another digest instance is given, checks whether
123
123
  # they have the same hash value. Otherwise returns false.
124
124
  #
125
- def ==: (::Digest::Instance | String) -> bool
125
+ def ==: (instance | string) -> bool
126
126
 
127
127
  # <!--
128
128
  # rdoc-file=ext/digest/lib/digest.rb
@@ -138,7 +138,7 @@ module Digest::Instance
138
138
  # In either case, the return value is properly padded with '=' and contains no
139
139
  # line feeds.
140
140
  #
141
- def base64digest: (?String? str) -> String
141
+ def base64digest: (?string? str) -> String
142
142
 
143
143
  # <!--
144
144
  # rdoc-file=ext/digest/lib/digest.rb
@@ -177,7 +177,7 @@ module Digest::Instance
177
177
  # If a *string* is given, returns the hash value for the given *string*,
178
178
  # resetting the digest to the initial state before and after the process.
179
179
  #
180
- def digest: (?String) -> String
180
+ def digest: (?string) -> String
181
181
 
182
182
  # <!--
183
183
  # rdoc-file=ext/digest/digest.c
@@ -204,7 +204,7 @@ module Digest::Instance
204
204
  # -->
205
205
  # Updates the digest with the contents of a given file *name* and returns self.
206
206
  #
207
- def file: (String name) -> self
207
+ def file: (string name) -> instance
208
208
 
209
209
  # <!--
210
210
  # rdoc-file=ext/digest/digest.c
@@ -218,7 +218,7 @@ module Digest::Instance
218
218
  # hex-encoded form, resetting the digest to the initial state before and after
219
219
  # the process.
220
220
  #
221
- def hexdigest: (?String) -> String
221
+ def hexdigest: (?string) -> String
222
222
 
223
223
  # <!--
224
224
  # rdoc-file=ext/digest/digest.c
@@ -253,7 +253,7 @@ module Digest::Instance
253
253
  # Returns a new, initialized copy of the digest object. Equivalent to
254
254
  # digest_obj.clone().reset().
255
255
  #
256
- def new: () -> ::Digest::Base
256
+ def new: () -> instance
257
257
 
258
258
  # <!--
259
259
  # rdoc-file=ext/digest/digest.c
@@ -288,7 +288,7 @@ module Digest::Instance
288
288
  # The update() method and the left-shift operator are overridden by each
289
289
  # implementation subclass. (One should be an alias for the other)
290
290
  #
291
- def update: (String) -> self
291
+ def update: (string) -> self
292
292
 
293
293
  private
294
294
 
@@ -319,7 +319,7 @@ class Digest::Class
319
319
  # Returns the base64 encoded hash value of a given *string*. The return value
320
320
  # is properly padded with '=' and contains no line feeds.
321
321
  #
322
- def self.base64digest: (String str, *untyped) -> String
322
+ def self.base64digest: (string str) -> String
323
323
 
324
324
  # <!--
325
325
  # rdoc-file=ext/digest/bubblebabble/bubblebabble.c
@@ -327,7 +327,7 @@ class Digest::Class
327
327
  # -->
328
328
  # Returns the BubbleBabble encoded hash value of a given *string*.
329
329
  #
330
- def self.bubblebabble: (String, *untyped) -> String
330
+ def self.bubblebabble: (string) -> String
331
331
 
332
332
  # <!--
333
333
  # rdoc-file=ext/digest/digest.c
@@ -338,7 +338,7 @@ class Digest::Class
338
338
  # any, are passed through to the constructor and the *string* is passed to
339
339
  # #digest().
340
340
  #
341
- def self.digest: (String, *untyped) -> String
341
+ def self.digest: (string) -> String
342
342
 
343
343
  # <!--
344
344
  # rdoc-file=ext/digest/lib/digest.rb
@@ -350,7 +350,7 @@ class Digest::Class
350
350
  # p Digest::SHA256.file("X11R6.8.2-src.tar.bz2").hexdigest
351
351
  # # => "f02e3c85572dc9ad7cb77c2a638e3be24cc1b5bea9fdbb0b0299c9668475c534"
352
352
  #
353
- def self.file: (String name, *untyped) -> ::Digest::Class
353
+ def self.file: (string name) -> instance
354
354
 
355
355
  # <!--
356
356
  # rdoc-file=ext/digest/digest.c
@@ -359,11 +359,11 @@ class Digest::Class
359
359
  # Returns the hex-encoded hash value of a given *string*. This is almost
360
360
  # equivalent to Digest.hexencode(Digest::Class.new(*parameters).digest(string)).
361
361
  #
362
- def self.hexdigest: (String, *untyped) -> String
362
+ def self.hexdigest: (string) -> String
363
363
 
364
364
  private
365
365
 
366
- def initialize: () -> self
366
+ def initialize: () -> void
367
367
  end
368
368
 
369
369
  # <!-- rdoc-file=ext/digest/digest.c -->
@@ -408,7 +408,7 @@ class Digest::Base < Digest::Class
408
408
  # <!-- rdoc-file=ext/digest/digest.c -->
409
409
  # Update the digest using given *string* and return `self`.
410
410
  #
411
- def <<: (String) -> self
411
+ def <<: (string) -> self
412
412
 
413
413
  # <!--
414
414
  # rdoc-file=ext/digest/digest.c
@@ -434,20 +434,14 @@ class Digest::Base < Digest::Class
434
434
  #
435
435
  def reset: () -> self
436
436
 
437
- # <!--
438
- # rdoc-file=ext/digest/digest.c
439
- # - digest_base.update(string) -> digest_base
440
- # - digest_base << string -> digest_base
441
- # -->
442
- # Update the digest using given *string* and return `self`.
443
- #
444
- def update: (String) -> self
437
+ %a{annotate:rdoc:skip}
438
+ alias update <<
445
439
 
446
440
  private
447
441
 
448
442
  def finish: () -> String
449
443
 
450
- def initialize_copy: (::Digest::Base) -> self
444
+ def initialize_copy: (self) -> self
451
445
  end
452
446
 
453
447
  # <!-- rdoc-file=ext/digest/sha1/sha1init.c -->
@@ -63,7 +63,7 @@ class IPAddr
63
63
  # as &, |, include? and ==, accept a string, or a packed in_addr value instead
64
64
  # of an IPAddr object.
65
65
  #
66
- def initialize: (?String addr, ?untyped family) -> IPAddr
66
+ def initialize: (?String addr, ?untyped family) -> void
67
67
 
68
68
  # <!--
69
69
  # rdoc-file=lib/ipaddr.rb
@@ -0,0 +1,166 @@
1
+ # <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
2
+ # Kanji Converter for Ruby.
3
+ #
4
+ module Kconv
5
+ # <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
6
+ # ASCII
7
+ #
8
+ ASCII: Encoding
9
+
10
+ # <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
11
+ # Auto-Detect
12
+ #
13
+ AUTO: nil
14
+
15
+ # <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
16
+ # BINARY
17
+ #
18
+ BINARY: Encoding
19
+
20
+ # <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
21
+ # EUC-JP
22
+ #
23
+ EUC: Encoding
24
+
25
+ # <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
26
+ # ISO-2022-JP
27
+ #
28
+ JIS: Encoding
29
+
30
+ # <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
31
+ # NOCONV
32
+ #
33
+ NOCONV: nil
34
+
35
+ # <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
36
+ # Shift_JIS
37
+ #
38
+ SJIS: Encoding
39
+
40
+ # <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
41
+ # UNKNOWN
42
+ #
43
+ UNKNOWN: nil
44
+
45
+ # <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
46
+ # UTF-16
47
+ #
48
+ UTF16: Encoding
49
+
50
+ # <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
51
+ # UTF-32
52
+ #
53
+ UTF32: Encoding
54
+
55
+ # <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
56
+ # UTF-8
57
+ #
58
+ UTF8: Encoding
59
+
60
+ # <!--
61
+ # rdoc-file=ext/nkf/lib/kconv.rb
62
+ # - Kconv.guess(str) => encoding
63
+ # -->
64
+ # Guess input encoding by NKF.guess
65
+ #
66
+ def self.guess: (String str) -> Encoding
67
+
68
+ # <!--
69
+ # rdoc-file=ext/nkf/lib/kconv.rb
70
+ # - Kconv.iseuc(str) => true or false
71
+ # -->
72
+ # Returns whether input encoding is EUC-JP or not.
73
+ #
74
+ # **Note** don't expect this return value is MatchData.
75
+ #
76
+ def self.iseuc: (String str) -> bool
77
+
78
+ # <!--
79
+ # rdoc-file=ext/nkf/lib/kconv.rb
80
+ # - Kconv.isjis(str) => true or false
81
+ # -->
82
+ # Returns whether input encoding is ISO-2022-JP or not.
83
+ #
84
+ def self.isjis: (String str) -> bool
85
+
86
+ # <!--
87
+ # rdoc-file=ext/nkf/lib/kconv.rb
88
+ # - Kconv.issjis(str) => true or false
89
+ # -->
90
+ # Returns whether input encoding is Shift_JIS or not.
91
+ #
92
+ def self.issjis: (String str) -> bool
93
+
94
+ # <!--
95
+ # rdoc-file=ext/nkf/lib/kconv.rb
96
+ # - Kconv.isutf8(str) => true or false
97
+ # -->
98
+ # Returns whether input encoding is UTF-8 or not.
99
+ #
100
+ def self.isutf8: (String str) -> bool
101
+
102
+ # <!--
103
+ # rdoc-file=ext/nkf/lib/kconv.rb
104
+ # - Kconv.kconv(str, to_enc, from_enc=nil)
105
+ # -->
106
+ # Convert `str` to `to_enc`. `to_enc` and `from_enc` are given as constants of
107
+ # Kconv or Encoding objects.
108
+ #
109
+ def self.kconv: (String str, Encoding? out_code, ?Encoding? in_code) -> String
110
+
111
+ # <!--
112
+ # rdoc-file=ext/nkf/lib/kconv.rb
113
+ # - Kconv.toeuc(str) => string
114
+ # -->
115
+ # Convert `str` to EUC-JP
116
+ #
117
+ def self.toeuc: (String str) -> String
118
+
119
+ # <!--
120
+ # rdoc-file=ext/nkf/lib/kconv.rb
121
+ # - Kconv.tojis(str) => string
122
+ # -->
123
+ # Convert `str` to ISO-2022-JP
124
+ #
125
+ def self.tojis: (String str) -> String
126
+
127
+ # <!--
128
+ # rdoc-file=ext/nkf/lib/kconv.rb
129
+ # - Kconv.tolocale => string
130
+ # -->
131
+ # Convert `self` to locale encoding
132
+ #
133
+ def self.tolocale: (String str) -> String
134
+
135
+ # <!--
136
+ # rdoc-file=ext/nkf/lib/kconv.rb
137
+ # - Kconv.tosjis(str) => string
138
+ # -->
139
+ # Convert `str` to Shift_JIS
140
+ #
141
+ def self.tosjis: (String str) -> String
142
+
143
+ # <!--
144
+ # rdoc-file=ext/nkf/lib/kconv.rb
145
+ # - Kconv.toutf16(str) => string
146
+ # -->
147
+ # Convert `str` to UTF-16
148
+ #
149
+ def self.toutf16: (String str) -> String
150
+
151
+ # <!--
152
+ # rdoc-file=ext/nkf/lib/kconv.rb
153
+ # - Kconv.toutf32(str) => string
154
+ # -->
155
+ # Convert `str` to UTF-32
156
+ #
157
+ def self.toutf32: (String str) -> String
158
+
159
+ # <!--
160
+ # rdoc-file=ext/nkf/lib/kconv.rb
161
+ # - Kconv.toutf8(str) => string
162
+ # -->
163
+ # Convert `str` to UTF-8
164
+ #
165
+ def self.toutf8: (String str) -> String
166
+ end
@@ -2078,7 +2078,7 @@ module Net
2078
2078
  # - new(m, reqbody, resbody, uri_or_path, initheader = nil)
2079
2079
  # -->
2080
2080
  #
2081
- def initialize: (String m, boolish reqbody, boolish resbody, URI::Generic | String uri_or_path, ?headers initheader) -> Net::HTTP
2081
+ def initialize: (String m, boolish reqbody, boolish resbody, URI::Generic | String uri_or_path, ?headers initheader) -> void
2082
2082
 
2083
2083
  # <!-- rdoc-file=lib/net/http/generic_request.rb -->
2084
2084
  # Returns the string method name for the request:
@@ -2437,7 +2437,7 @@ module Net
2437
2437
  # * #each_name: Passes each field name to the block.
2438
2438
  # * #each_value: Passes each string field value to the block.
2439
2439
  #
2440
- module HTTPHeader
2440
+ module HTTPHeader : BasicObject
2441
2441
  # <!--
2442
2442
  # rdoc-file=lib/net/http/header.rb
2443
2443
  # - initialize_http_header(initheader)
@@ -45,7 +45,7 @@ class Psych::Store < ::PStore
45
45
  # Options passed in through `yaml_opts` will be used when converting the store
46
46
  # to YAML via Hash#to_yaml().
47
47
  #
48
- def initialize: (*untyped o) -> Psych::Store
48
+ def initialize: (*untyped o) -> void
49
49
 
50
50
  def dump: (untyped table) -> String
51
51
 
@@ -71,7 +71,7 @@ module URI
71
71
  #
72
72
  # See also URI::Generic.new.
73
73
  #
74
- def initialize: (String schema, String? userinfo, String host, Integer? port, String? registry, String? path, String? opaque, String query, String? fragment) -> URI::LDAP
74
+ def initialize: (String schema, String? userinfo, String host, Integer? port, String? registry, String? path, String? opaque, String query, String? fragment) -> void
75
75
 
76
76
  # <!--
77
77
  # rdoc-file=lib/uri/ldap.rb
@@ -154,7 +154,7 @@ module Zlib
154
154
  # SYNC_FLUSH, FULL_FLUSH and FINISH.
155
155
  #
156
156
  def flush: (?Integer flush) -> String
157
- | (?Integer flush) {(String chunk) -> nil } -> nil
157
+ | (?Integer flush) { (String chunk) -> nil } -> nil
158
158
 
159
159
  # <!--
160
160
  # rdoc-file=ext/zlib/zlib.c
@@ -122,6 +122,9 @@ module Zlib
122
122
  class GzipReader < Zlib::GzipFile
123
123
  include Enumerable[String]
124
124
 
125
+ def self.wrap: (IO io) -> instance
126
+ | (IO io) { (instance gz) -> void } -> void
127
+
125
128
  # <!--
126
129
  # rdoc-file=ext/zlib/zlib.c
127
130
  # - Zlib::GzipReader.open(filename) {|gz| ... }
@@ -130,7 +133,8 @@ module Zlib
130
133
  # GzipReader object associated with that file. Further details of this method
131
134
  # are in Zlib::GzipReader.new and ZLib::GzipFile.wrap.
132
135
  #
133
- def self.open: (String filename) { (instance gz) -> void } -> instance
136
+ def self.open: (String | _ToPath filename) -> instance
137
+ | (String | _ToPath filename) { (instance gz) -> void } -> void
134
138
 
135
139
  # <!--
136
140
  # rdoc-file=ext/zlib/zlib.c
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.3
4
+ version: 3.6.0.pre.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soutaro Matsumoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-23 00:00:00.000000000 Z
11
+ date: 2024-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logger
@@ -39,6 +39,7 @@ files:
39
39
  - ".github/workflows/dependabot.yml"
40
40
  - ".github/workflows/ruby.yml"
41
41
  - ".github/workflows/typecheck.yml"
42
+ - ".github/workflows/windows.yml"
42
43
  - ".gitignore"
43
44
  - ".rubocop.yml"
44
45
  - BSDL
@@ -174,6 +175,7 @@ files:
174
175
  - lib/rbs/ast/directives.rb
175
176
  - lib/rbs/ast/members.rb
176
177
  - lib/rbs/ast/type_param.rb
178
+ - lib/rbs/ast/visitor.rb
177
179
  - lib/rbs/buffer.rb
178
180
  - lib/rbs/builtin_names.rb
179
181
  - lib/rbs/cli.rb
@@ -338,6 +340,7 @@ files:
338
340
  - sig/variance_calculator.rbs
339
341
  - sig/vendorer.rbs
340
342
  - sig/version.rbs
343
+ - sig/visitor.rbs
341
344
  - sig/writer.rbs
342
345
  - stdlib/abbrev/0/abbrev.rbs
343
346
  - stdlib/abbrev/0/array.rbs
@@ -368,6 +371,7 @@ files:
368
371
  - stdlib/io-console/0/io-console.rbs
369
372
  - stdlib/ipaddr/0/ipaddr.rbs
370
373
  - stdlib/json/0/json.rbs
374
+ - stdlib/kconv/0/kconv.rbs
371
375
  - stdlib/logger/0/formatter.rbs
372
376
  - stdlib/logger/0/log_device.rbs
373
377
  - stdlib/logger/0/logger.rbs