rbs 3.0.0.dev.2 → 3.0.0.dev.3

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.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/comments.yml +2 -1
  3. data/.github/workflows/ruby.yml +4 -0
  4. data/Gemfile.lock +11 -11
  5. data/Rakefile +2 -2
  6. data/Steepfile +1 -1
  7. data/core/array.rbs +573 -423
  8. data/core/basic_object.rbs +11 -39
  9. data/core/binding.rbs +1 -1
  10. data/core/builtin.rbs +8 -0
  11. data/core/class.rbs +37 -0
  12. data/core/comparable.rbs +7 -18
  13. data/core/complex.rbs +2 -2
  14. data/core/data.rbs +419 -0
  15. data/core/dir.rbs +52 -104
  16. data/core/encoding.rbs +22 -181
  17. data/core/enumerable.rbs +212 -175
  18. data/core/enumerator/product.rbs +96 -0
  19. data/core/enumerator.rbs +57 -8
  20. data/core/errors.rbs +8 -2
  21. data/core/exception.rbs +41 -0
  22. data/core/fiber.rbs +95 -12
  23. data/core/file.rbs +840 -275
  24. data/core/file_test.rbs +34 -19
  25. data/core/float.rbs +40 -96
  26. data/core/gc.rbs +15 -3
  27. data/core/hash.rbs +113 -175
  28. data/core/integer.rbs +85 -145
  29. data/core/io/buffer.rbs +187 -60
  30. data/core/io/wait.rbs +28 -16
  31. data/core/io.rbs +1859 -1389
  32. data/core/kernel.rbs +525 -961
  33. data/core/match_data.rbs +306 -142
  34. data/core/math.rbs +506 -234
  35. data/core/method.rbs +0 -24
  36. data/core/module.rbs +110 -17
  37. data/core/nil_class.rbs +2 -0
  38. data/core/numeric.rbs +76 -144
  39. data/core/object.rbs +88 -212
  40. data/core/proc.rbs +17 -5
  41. data/core/process.rbs +22 -5
  42. data/core/ractor.rbs +1 -1
  43. data/core/random.rbs +20 -3
  44. data/core/range.rbs +91 -89
  45. data/core/rational.rbs +2 -3
  46. data/core/rbs/unnamed/argf.rbs +177 -120
  47. data/core/rbs/unnamed/env_class.rbs +89 -163
  48. data/core/rbs/unnamed/random.rbs +36 -12
  49. data/core/refinement.rbs +8 -0
  50. data/core/regexp.rbs +462 -272
  51. data/core/ruby_vm.rbs +210 -0
  52. data/{stdlib/set/0 → core}/set.rbs +43 -47
  53. data/core/string.rbs +1403 -1332
  54. data/core/string_io.rbs +191 -107
  55. data/core/struct.rbs +67 -63
  56. data/core/symbol.rbs +187 -201
  57. data/core/thread.rbs +40 -35
  58. data/core/time.rbs +902 -826
  59. data/core/trace_point.rbs +55 -6
  60. data/core/unbound_method.rbs +48 -24
  61. data/docs/collection.md +4 -0
  62. data/docs/syntax.md +55 -0
  63. data/ext/rbs_extension/parser.c +5 -6
  64. data/lib/rbs/cli.rb +6 -1
  65. data/lib/rbs/collection/cleaner.rb +8 -1
  66. data/lib/rbs/collection/config/lockfile.rb +3 -1
  67. data/lib/rbs/collection/config/lockfile_generator.rb +16 -14
  68. data/lib/rbs/collection/config.rb +1 -1
  69. data/lib/rbs/collection/sources/git.rb +9 -2
  70. data/lib/rbs/collection/sources/local.rb +79 -0
  71. data/lib/rbs/collection/sources.rb +8 -1
  72. data/lib/rbs/environment.rb +6 -5
  73. data/lib/rbs/environment_loader.rb +3 -2
  74. data/lib/rbs/errors.rb +18 -0
  75. data/lib/rbs/locator.rb +26 -7
  76. data/lib/rbs/sorter.rb +2 -2
  77. data/lib/rbs/version.rb +1 -1
  78. data/sig/collection/sources.rbs +32 -3
  79. data/sig/environment.rbs +2 -3
  80. data/sig/locator.rbs +14 -2
  81. data/sig/shims/{abstract_syntax_tree.rbs → _abstract_syntax_tree.rbs} +0 -0
  82. data/stdlib/bigdecimal/0/big_decimal.rbs +16 -13
  83. data/stdlib/cgi/0/core.rbs +16 -0
  84. data/stdlib/coverage/0/coverage.rbs +50 -8
  85. data/stdlib/csv/0/csv.rbs +1 -1
  86. data/stdlib/date/0/date.rbs +856 -726
  87. data/stdlib/date/0/date_time.rbs +83 -210
  88. data/stdlib/erb/0/erb.rbs +13 -36
  89. data/stdlib/etc/0/etc.rbs +127 -20
  90. data/stdlib/fileutils/0/fileutils.rbs +1290 -381
  91. data/stdlib/logger/0/logger.rbs +466 -316
  92. data/stdlib/net-http/0/net-http.rbs +2211 -534
  93. data/stdlib/nkf/0/nkf.rbs +5 -5
  94. data/stdlib/objspace/0/objspace.rbs +31 -14
  95. data/stdlib/openssl/0/openssl.rbs +11 -7
  96. data/stdlib/optparse/0/optparse.rbs +20 -17
  97. data/stdlib/pathname/0/pathname.rbs +21 -4
  98. data/stdlib/pstore/0/pstore.rbs +378 -154
  99. data/stdlib/pty/0/pty.rbs +24 -8
  100. data/stdlib/ripper/0/ripper.rbs +1650 -0
  101. data/stdlib/socket/0/addrinfo.rbs +9 -15
  102. data/stdlib/socket/0/socket.rbs +36 -3
  103. data/stdlib/strscan/0/string_scanner.rbs +7 -5
  104. data/stdlib/tempfile/0/tempfile.rbs +104 -44
  105. data/stdlib/time/0/time.rbs +2 -2
  106. data/stdlib/uri/0/file.rbs +5 -0
  107. data/stdlib/uri/0/generic.rbs +2 -2
  108. data/stdlib/yaml/0/yaml.rbs +2 -2
  109. data/stdlib/zlib/0/zlib.rbs +1 -1
  110. metadata +8 -6
  111. data/core/deprecated.rbs +0 -9
  112. data/sig/shims/ripper.rbs +0 -8
@@ -403,7 +403,7 @@ class Addrinfo
403
403
  # rdoc-file=ext/socket/raddrinfo.c
404
404
  # - ipv6_linklocal?()
405
405
  # -->
406
- # Returns true for IPv6 link local address (ff80::/10). It returns false
406
+ # Returns true for IPv6 link local address (fe80::/10). It returns false
407
407
  # otherwise.
408
408
  #
409
409
  def ipv6_linklocal?: () -> bool
@@ -474,7 +474,7 @@ class Addrinfo
474
474
  # rdoc-file=ext/socket/raddrinfo.c
475
475
  # - ipv6_sitelocal?()
476
476
  # -->
477
- # Returns true for IPv6 site local address (ffc0::/10). It returns false
477
+ # Returns true for IPv6 site local address (fec0::/10). It returns false
478
478
  # otherwise.
479
479
  #
480
480
  def ipv6_sitelocal?: () -> bool
@@ -632,19 +632,13 @@ class Addrinfo
632
632
  # sockaddr as generated by Socket.sockaddr_in or Socket.unpack_sockaddr_un.
633
633
  #
634
634
  # sockaddr examples:
635
- #
636
- # "AF_INET", 46102, "localhost.localdomain", "127.0.0.1"
637
- # :
638
- #
639
- # "AF_INET6", 42304, "ip6-localhost", "::1"
640
- # :
641
- #
642
- # "AF_UNIX", "/tmp/sock"
643
- # :
644
- # * Socket.sockaddr_in("smtp", "2001:DB8::1")
645
- # * Socket.sockaddr_in(80, "172.18.22.42")
646
- # * Socket.sockaddr_in(80, "www.ruby-lang.org")
647
- # * Socket.sockaddr_un("/tmp/sock")
635
+ # * `["AF_INET", 46102, "localhost.localdomain", "127.0.0.1"]`
636
+ # * `["AF_INET6", 42304, "ip6-localhost", "::1"]`
637
+ # * `["AF_UNIX", "/tmp/sock"]`
638
+ # * `Socket.sockaddr_in("smtp", "2001:DB8::1")`
639
+ # * `Socket.sockaddr_in(80, "172.18.22.42")`
640
+ # * `Socket.sockaddr_in(80, "www.ruby-lang.org")`
641
+ # * `Socket.sockaddr_un("/tmp/sock")`
648
642
  #
649
643
  #
650
644
  # In an AF_INET/AF_INET6 sockaddr array, the 4th element, numeric IP address, is
@@ -469,8 +469,6 @@ class Socket < BasicSocket
469
469
  #
470
470
  # :connect_timeout
471
471
  # : specify the timeout in seconds.
472
- # :resolv_timeout
473
- # : specify the name resolution timeout in seconds.
474
472
  #
475
473
  #
476
474
  # If a block is given, the block is called with the socket. The value of the
@@ -1416,7 +1414,7 @@ class Socket < BasicSocket
1416
1414
  # Socket.new(:UNIX, :STREAM) # UNIX stream socket
1417
1415
  # Socket.new(:UNIX, :DGRAM) # UNIX datagram socket
1418
1416
  #
1419
- def initialize: (Symbol domain, Symbol socktype, ?Integer protocol) -> untyped
1417
+ def initialize: (Symbol | Integer domain, Symbol | Integer socktype, ?Integer protocol) -> untyped
1420
1418
  end
1421
1419
 
1422
1420
  # <!-- rdoc-file=ext/socket/constdefs.c -->
@@ -3346,6 +3344,16 @@ Socket::SO_ERROR: Integer
3346
3344
  #
3347
3345
  Socket::SO_GET_FILTER: Integer
3348
3346
 
3347
+ # <!-- rdoc-file=ext/socket/constdefs.c -->
3348
+ # Receive the cpu attached to the socket (Linux 3.19)
3349
+ #
3350
+ Socket::SO_INCOMING_CPU: Integer
3351
+
3352
+ # <!-- rdoc-file=ext/socket/constdefs.c -->
3353
+ # Receive the napi ID attached to a RX queue (Linux 4.12)
3354
+ #
3355
+ Socket::SO_INCOMING_NAPI_ID: Integer
3356
+
3349
3357
  # <!-- rdoc-file=ext/socket/constdefs.c -->
3350
3358
  # Keep connections alive
3351
3359
  #
@@ -3481,6 +3489,11 @@ Socket::SO_REUSEADDR: Integer
3481
3489
  #
3482
3490
  Socket::SO_REUSEPORT: Integer
3483
3491
 
3492
+ # <!-- rdoc-file=ext/socket/constdefs.c -->
3493
+ # Set the routing table for this socket (OpenBSD)
3494
+ #
3495
+ Socket::SO_RTABLE: Integer
3496
+
3484
3497
  # <!-- rdoc-file=ext/socket/constdefs.c -->
3485
3498
  # Toggle cmsg for number of packets dropped (Linux 2.6.33)
3486
3499
  #
@@ -3494,6 +3507,11 @@ Socket::SO_SECURITY_ENCRYPTION_TRANSPORT: Integer
3494
3507
  #
3495
3508
  Socket::SO_SELECT_ERR_QUEUE: Integer
3496
3509
 
3510
+ # <!-- rdoc-file=ext/socket/constdefs.c -->
3511
+ # Set the associated routing table for the socket (FreeBSD)
3512
+ #
3513
+ Socket::SO_SETFIB: Integer
3514
+
3497
3515
  # <!-- rdoc-file=ext/socket/constdefs.c -->
3498
3516
  # Send buffer size
3499
3517
  #
@@ -3539,6 +3557,11 @@ Socket::SO_TYPE: Integer
3539
3557
  #
3540
3558
  Socket::SO_USELOOPBACK: Integer
3541
3559
 
3560
+ # <!-- rdoc-file=ext/socket/constdefs.c -->
3561
+ # Setting an identifier for ipfw purpose mainly
3562
+ #
3563
+ Socket::SO_USER_COOKIE: Integer
3564
+
3542
3565
  # <!-- rdoc-file=ext/socket/constdefs.c -->
3543
3566
  # Give a hint when more data is ready
3544
3567
  #
@@ -3554,6 +3577,11 @@ Socket::SO_WANTOOBFLAG: Integer
3554
3577
  #
3555
3578
  Socket::SO_WIFI_STATUS: Integer
3556
3579
 
3580
+ # <!-- rdoc-file=ext/socket/constdefs.c -->
3581
+ # Retrieve information about this socket (macOS)
3582
+ #
3583
+ Socket::TCP_CONNECTION_INFO: Integer
3584
+
3557
3585
  # <!-- rdoc-file=ext/socket/constdefs.c -->
3558
3586
  # TCP congestion control algorithm (Linux 2.6.13, glibc 2.6)
3559
3587
  #
@@ -3584,6 +3612,11 @@ Socket::TCP_FASTOPEN: Integer
3584
3612
  #
3585
3613
  Socket::TCP_INFO: Integer
3586
3614
 
3615
+ # <!-- rdoc-file=ext/socket/constdefs.c -->
3616
+ # Idle time before keepalive probes are sent (macOS)
3617
+ #
3618
+ Socket::TCP_KEEPALIVE: Integer
3619
+
3587
3620
  # <!-- rdoc-file=ext/socket/constdefs.c -->
3588
3621
  # Maximum number of keepalive probes allowed before dropping a connection (Linux
3589
3622
  # 2.4, glibc 2.2)
@@ -2,6 +2,8 @@
2
2
  # StringScanner provides for lexical scanning operations on a String. Here is
3
3
  # an example of its usage:
4
4
  #
5
+ # require 'strscan'
6
+ #
5
7
  # s = StringScanner.new('This is an example string')
6
8
  # s.eos? # -> false
7
9
  #
@@ -199,11 +201,11 @@ class StringScanner
199
201
  #
200
202
  # In short, it's a 0-based index into the string.
201
203
  #
202
- # s = StringScanner.new("abcädeföghi")
203
- # s.charpos # -> 0
204
- # s.scan_until(/ä/) # -> "abcä"
205
- # s.pos # -> 5
206
- # s.charpos # -> 4
204
+ # s = StringScanner.new("abc\u00e4def\u00f6ghi")
205
+ # s.charpos # -> 0
206
+ # s.scan_until(/\u00e4/) # -> "abc\u00E4"
207
+ # s.pos # -> 5
208
+ # s.charpos # -> 4
207
209
  #
208
210
  def charpos: () -> Integer
209
211
 
@@ -82,24 +82,65 @@ class Tempfile < File
82
82
  # rdoc-file=lib/tempfile.rb
83
83
  # - create(basename="", tmpdir=nil, mode: 0, **options) { |tmpfile| ... }
84
84
  # -->
85
- # Creates a temporary file as a usual File object (not a Tempfile). It does not
86
- # use finalizer and delegation, which makes it more efficient and reliable.
85
+ # Creates a file in the underlying file system; returns a new File object based
86
+ # on that file.
87
87
  #
88
- # If no block is given, this is similar to Tempfile.new except creating File
89
- # instead of Tempfile. In that case, the created file is not removed
90
- # automatically. You should use File.unlink to remove it.
88
+ # With no block given and no arguments, creates and returns file whose:
91
89
  #
92
- # If a block is given, then a File object will be constructed, and the block is
93
- # invoked with the object as the argument. The File object will be automatically
94
- # closed and the temporary file is removed after the block terminates, releasing
95
- # all resources that the block created. The call returns the value of the block.
90
+ # * Class is [File](rdoc-ref:File) (not Tempfile).
91
+ # * Directory is the system temporary directory (system-dependent).
92
+ # * Generated filename is unique in that directory.
93
+ # * Permissions are `0600`; see [File
94
+ # Permissions](rdoc-ref:File@File+Permissions).
95
+ # * Mode is `'w+'` (read/write mode, positioned at the end).
96
96
  #
97
- # In any case, all arguments (`basename`, `tmpdir`, `mode`, and `**options`)
98
- # will be treated the same as for Tempfile.new.
99
97
  #
100
- # Tempfile.create('foo', '/home/temp') do |f|
101
- # # ... do something with f ...
102
- # end
98
+ # With no block, the file is not removed automatically, and so should be
99
+ # explicitly removed.
100
+ #
101
+ # Example:
102
+ #
103
+ # f = Tempfile.create # => #<File:/tmp/20220505-9795-17ky6f6>
104
+ # f.class # => File
105
+ # f.path # => "/tmp/20220505-9795-17ky6f6"
106
+ # f.stat.mode.to_s(8) # => "100600"
107
+ # File.exist?(f.path) # => true
108
+ # File.unlink(f.path)
109
+ # File.exist?(f.path) # => false
110
+ #
111
+ # Argument `basename`, if given, may be one of:
112
+ #
113
+ # * A string: the generated filename begins with `basename`:
114
+ #
115
+ # Tempfile.create('foo') # => #<File:/tmp/foo20220505-9795-1gok8l9>
116
+ #
117
+ # * An array of two strings `[prefix, suffix]`: the generated filename begins
118
+ # with `prefix` and ends with `suffix`:
119
+ #
120
+ # Tempfile.create(%w/foo .jpg/) # => #<File:/tmp/foo20220505-17839-tnjchh.jpg>
121
+ #
122
+ #
123
+ # With arguments `basename` and `tmpdir`, the file is created in directory
124
+ # `tmpdir`:
125
+ #
126
+ # Tempfile.create('foo', '.') # => #<File:./foo20220505-9795-1emu6g8>
127
+ #
128
+ # Keyword arguments `mode` and `options` are passed directly to method
129
+ # [File.open](rdoc-ref:File.open):
130
+ #
131
+ # * The value given with `mode` must be an integer, and may be expressed as
132
+ # the logical OR of constants defined in
133
+ # [File::Constants](rdoc-ref:File::Constants).
134
+ # * For `options`, see [Open Options](rdoc-ref:IO@Open+Options).
135
+ #
136
+ #
137
+ # With a block given, creates the file as above, passes it to the block, and
138
+ # returns the block's value; before the return, the file object is closed and
139
+ # the underlying file is removed:
140
+ #
141
+ # Tempfile.create {|file| file.path } # => "/tmp/20220505-9795-rkists"
142
+ #
143
+ # Related: Tempfile.new.
103
144
  #
104
145
  def self.create: (?String | [ String, String ] basename, ?String? tmpdir, ?mode: Integer, **untyped) -> File
105
146
  | [A] (?String | [ String, String ] basename, ?String? tmpdir, ?mode: Integer, **untyped) { (File) -> A } -> A
@@ -268,48 +309,67 @@ class Tempfile < File
268
309
  # rdoc-file=lib/tempfile.rb
269
310
  # - new(basename="", tmpdir=nil, mode: 0, **options)
270
311
  # -->
271
- # Creates a temporary file with permissions 0600 (= only readable and writable
272
- # by the owner) and opens it with mode "w+".
312
+ # Creates a file in the underlying file system; returns a new Tempfile object
313
+ # based on that file.
314
+ #
315
+ # If possible, consider instead using Tempfile.create, which:
316
+ #
317
+ # * Avoids the performance cost of delegation, incurred when Tempfile.new
318
+ # calls its superclass `DelegateClass(File)`.
319
+ # * Does not rely on a finalizer to close and unlink the file, which can be
320
+ # unreliable.
321
+ #
322
+ #
323
+ # Creates and returns file whose:
324
+ #
325
+ # * Class is Tempfile (not File, as in Tempfile.create).
326
+ # * Directory is the system temporary directory (system-dependent).
327
+ # * Generated filename is unique in that directory.
328
+ # * Permissions are `0600`; see [File
329
+ # Permissions](rdoc-ref:File@File+Permissions).
330
+ # * Mode is `'w+'` (read/write mode, positioned at the end).
331
+ #
332
+ #
333
+ # The underlying file is removed when the Tempfile object dies and is reclaimed
334
+ # by the garbage collector.
335
+ #
336
+ # Example:
337
+ #
338
+ # f = Tempfile.new # => #<Tempfile:/tmp/20220505-17839-1s0kt30>
339
+ # f.class # => Tempfile
340
+ # f.path # => "/tmp/20220505-17839-1s0kt30"
341
+ # f.stat.mode.to_s(8) # => "100600"
342
+ # File.exist?(f.path) # => true
343
+ # File.unlink(f.path) #
344
+ # File.exist?(f.path) # => false
273
345
  #
274
- # It is recommended to use Tempfile.create { ... } instead when possible,
275
- # because that method avoids the cost of delegation and does not rely on a
276
- # finalizer to close and unlink the file, which is unreliable.
346
+ # Argument `basename`, if given, may be one of:
277
347
  #
278
- # The `basename` parameter is used to determine the name of the temporary file.
279
- # You can either pass a String or an Array with 2 String elements. In the former
280
- # form, the temporary file's base name will begin with the given string. In the
281
- # latter form, the temporary file's base name will begin with the array's first
282
- # element, and end with the second element. For example:
348
+ # * A string: the generated filename begins with `basename`:
283
349
  #
284
- # file = Tempfile.new('hello')
285
- # file.path # => something like: "/tmp/hello2843-8392-92849382--0"
350
+ # Tempfile.new('foo') # => #<Tempfile:/tmp/foo20220505-17839-1whk2f>
286
351
  #
287
- # # Use the Array form to enforce an extension in the filename:
288
- # file = Tempfile.new(['hello', '.jpg'])
289
- # file.path # => something like: "/tmp/hello2843-8392-92849382--0.jpg"
352
+ # * An array of two strings `[prefix, suffix]`: the generated filename begins
353
+ # with `prefix` and ends with `suffix`:
290
354
  #
291
- # The temporary file will be placed in the directory as specified by the
292
- # `tmpdir` parameter. By default, this is `Dir.tmpdir`.
355
+ # Tempfile.new(%w/foo .jpg/) # => #<Tempfile:/tmp/foo20220505-17839-58xtfi.jpg>
293
356
  #
294
- # file = Tempfile.new('hello', '/home/aisaka')
295
- # file.path # => something like: "/home/aisaka/hello2843-8392-92849382--0"
296
357
  #
297
- # You can also pass an options hash. Under the hood, Tempfile creates the
298
- # temporary file using `File.open`. These options will be passed to `File.open`.
299
- # This is mostly useful for specifying encoding options, e.g.:
358
+ # With arguments `basename` and `tmpdir`, the file is created in directory
359
+ # `tmpdir`:
300
360
  #
301
- # Tempfile.new('hello', '/home/aisaka', encoding: 'ascii-8bit')
361
+ # Tempfile.new('foo', '.') # => #<Tempfile:./foo20220505-17839-xfstr8>
302
362
  #
303
- # # You can also omit the 'tmpdir' parameter:
304
- # Tempfile.new('hello', encoding: 'ascii-8bit')
363
+ # Keyword arguments `mode` and `options` are passed directly to method
364
+ # [File.open](rdoc-ref:File.open):
305
365
  #
306
- # Note: `mode` keyword argument, as accepted by Tempfile, can only be numeric,
307
- # combination of the modes defined in File::Constants.
366
+ # * The value given with `mode` must be an integer, and may be expressed as
367
+ # the logical OR of constants defined in
368
+ # [File::Constants](rdoc-ref:File::Constants).
369
+ # * For `options`, see [Open Options](rdoc-ref:IO@Open+Options).
308
370
  #
309
- # ### Exceptions
310
371
  #
311
- # If Tempfile.new cannot find a unique filename within a limited number of
312
- # tries, then it will raise an exception.
372
+ # Related: Tempfile.create.
313
373
  #
314
374
  def self.new: (?String | [ String, String ] basename, ?String? tmpdir, ?mode: Integer, **untyped) -> instance
315
375
  | [A] (?String | [ String, String ] basename, ?String? tmpdir, ?mode: Integer, **untyped) { (instance) -> A } -> A
@@ -398,8 +398,8 @@ class Time
398
398
  #
399
399
  # If self is a UTC time, Z is used as TZD. [+-]hh:mm is used otherwise.
400
400
  #
401
- # `fractional_digits` specifies a number of digits to use for fractional
402
- # seconds. Its default value is 0.
401
+ # `fraction_digits` specifies a number of digits to use for fractional seconds.
402
+ # Its default value is 0.
403
403
  #
404
404
  # require 'time'
405
405
  #
@@ -30,6 +30,8 @@ module URI
30
30
  # If an Array is used, the components must be passed in the order `[host,
31
31
  # path]`.
32
32
  #
33
+ # A path from e.g. the File class should be escaped before being passed.
34
+ #
33
35
  # Examples:
34
36
  #
35
37
  # require 'uri'
@@ -41,6 +43,9 @@ module URI
41
43
  # :path => '/ruby/src'})
42
44
  # uri2.to_s # => "file://host.example.com/ruby/src"
43
45
  #
46
+ # uri3 = URI::File.build({:path => URI::escape('/path/my file.txt')})
47
+ # uri3.to_s # => "file:///path/my%20file.txt"
48
+ #
44
49
  def self.build: (Array[String] args) -> URI::File
45
50
  | ({ host: String?, path: String? }) -> URI::File
46
51
 
@@ -510,7 +510,7 @@ module URI
510
510
  # rdoc-file=lib/uri/generic.rb
511
511
  # - user()
512
512
  # -->
513
- # Returns the user component.
513
+ # Returns the user component (without URI decoding).
514
514
  #
515
515
  def user: () -> String?
516
516
 
@@ -518,7 +518,7 @@ module URI
518
518
  # rdoc-file=lib/uri/generic.rb
519
519
  # - password()
520
520
  # -->
521
- # Returns the password component.
521
+ # Returns the password component (without URI decoding).
522
522
  #
523
523
  def password: () -> String?
524
524
 
@@ -182,8 +182,8 @@ module YAML
182
182
  # A Psych::DisallowedClass exception will be raised if the yaml contains a class
183
183
  # that isn't in the `permitted_classes` list.
184
184
  #
185
- # A Psych::BadAlias exception will be raised if the yaml contains aliases but
186
- # the `aliases` keyword argument is set to false.
185
+ # A Psych::AliasesNotEnabled exception will be raised if the yaml contains
186
+ # aliases but the `aliases` keyword argument is set to false.
187
187
  #
188
188
  # `filename` will be used in the exception message if any exception is raised
189
189
  # while parsing.
@@ -95,7 +95,7 @@ module Zlib
95
95
  # rdoc-file=ext/zlib/zlib.c
96
96
  # - Zlib.adler32_combine(adler1, adler2, len2)
97
97
  # -->
98
- # Combine two Adler-32 check values in to one. `alder1` is the first Adler-32
98
+ # Combine two Adler-32 check values in to one. `adler1` is the first Adler-32
99
99
  # value, `adler2` is the second Adler-32 value. `len2` is the length of the
100
100
  # string used to generate `adler2`.
101
101
  #
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.0.0.dev.2
4
+ version: 3.0.0.dev.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soutaro Matsumoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-08 00:00:00.000000000 Z
11
+ date: 2023-02-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: RBS is the language for type signatures for Ruby and standard library
14
14
  definitions.
@@ -41,11 +41,12 @@ files:
41
41
  - core/comparable.rbs
42
42
  - core/complex.rbs
43
43
  - core/constants.rbs
44
- - core/deprecated.rbs
44
+ - core/data.rbs
45
45
  - core/dir.rbs
46
46
  - core/encoding.rbs
47
47
  - core/enumerable.rbs
48
48
  - core/enumerator.rbs
49
+ - core/enumerator/product.rbs
49
50
  - core/env.rbs
50
51
  - core/errno.rbs
51
52
  - core/errors.rbs
@@ -101,6 +102,7 @@ files:
101
102
  - core/rubygems/stream_ui.rbs
102
103
  - core/rubygems/uninstaller.rbs
103
104
  - core/rubygems/version.rbs
105
+ - core/set.rbs
104
106
  - core/signal.rbs
105
107
  - core/string.rbs
106
108
  - core/string_io.rbs
@@ -166,6 +168,7 @@ files:
166
168
  - lib/rbs/collection/sources.rb
167
169
  - lib/rbs/collection/sources/base.rb
168
170
  - lib/rbs/collection/sources/git.rb
171
+ - lib/rbs/collection/sources/local.rb
169
172
  - lib/rbs/collection/sources/rubygems.rb
170
173
  - lib/rbs/collection/sources/stdlib.rb
171
174
  - lib/rbs/constant.rb
@@ -275,11 +278,10 @@ files:
275
278
  - sig/resolver/context.rbs
276
279
  - sig/resolver/type_name_resolver.rbs
277
280
  - sig/shims.rbs
278
- - sig/shims/abstract_syntax_tree.rbs
281
+ - sig/shims/_abstract_syntax_tree.rbs
279
282
  - sig/shims/bundler.rbs
280
283
  - sig/shims/enumerable.rbs
281
284
  - sig/shims/pp.rbs
282
- - sig/shims/ripper.rbs
283
285
  - sig/shims/rubygems.rbs
284
286
  - sig/sorter.rbs
285
287
  - sig/substitution.rbs
@@ -382,8 +384,8 @@ files:
382
384
  - stdlib/rdoc/0/rdoc.rbs
383
385
  - stdlib/resolv/0/manifest.yaml
384
386
  - stdlib/resolv/0/resolv.rbs
387
+ - stdlib/ripper/0/ripper.rbs
385
388
  - stdlib/securerandom/0/securerandom.rbs
386
- - stdlib/set/0/set.rbs
387
389
  - stdlib/shellwords/0/shellwords.rbs
388
390
  - stdlib/singleton/0/singleton.rbs
389
391
  - stdlib/socket/0/addrinfo.rbs
data/core/deprecated.rbs DELETED
@@ -1,9 +0,0 @@
1
- # <!-- rdoc-file=numeric.c -->
2
- # An obsolete class, use Integer
3
- #
4
- Fixnum: singleton(Integer)
5
-
6
- # <!-- rdoc-file=bignum.c -->
7
- # An obsolete class, use Integer
8
- #
9
- Bignum: singleton(Integer)
data/sig/shims/ripper.rbs DELETED
@@ -1,8 +0,0 @@
1
- class Ripper
2
- def self.lex: (String src, ?String filename, ?Integer lineno, ?raise_errors: bool) -> Array[[[Integer, Integer], Symbol, String, Lexer::State]]
3
-
4
- class Lexer
5
- class State
6
- end
7
- end
8
- end