rbs 0.13.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +9 -5
  3. data/.gitignore +0 -1
  4. data/CHANGELOG.md +33 -1
  5. data/Gemfile +4 -0
  6. data/README.md +9 -3
  7. data/Rakefile +14 -1
  8. data/Steepfile +1 -1
  9. data/bin/annotate-with-rdoc +1 -1
  10. data/bin/setup +0 -2
  11. data/bin/test_runner.rb +15 -1
  12. data/{stdlib/builtin → core}/array.rbs +124 -120
  13. data/{stdlib/builtin → core}/basic_object.rbs +54 -54
  14. data/{stdlib/builtin → core}/binding.rbs +42 -42
  15. data/core/builtin.rbs +70 -0
  16. data/{stdlib/builtin → core}/class.rbs +33 -33
  17. data/{stdlib/builtin → core}/comparable.rbs +0 -0
  18. data/{stdlib/builtin → core}/complex.rbs +90 -90
  19. data/{stdlib/builtin → core}/constants.rbs +0 -0
  20. data/{stdlib/builtin → core}/data.rbs +0 -0
  21. data/{stdlib/builtin → core}/deprecated.rbs +0 -0
  22. data/{stdlib/builtin → core}/dir.rbs +1 -1
  23. data/{stdlib/builtin → core}/encoding.rbs +33 -33
  24. data/{stdlib/builtin → core}/enumerable.rbs +99 -92
  25. data/{stdlib/builtin → core}/enumerator.rbs +40 -40
  26. data/{stdlib/builtin → core}/errno.rbs +0 -0
  27. data/{stdlib/builtin → core}/errors.rbs +2 -2
  28. data/{stdlib/builtin → core}/exception.rbs +50 -50
  29. data/{stdlib/builtin → core}/false_class.rbs +6 -6
  30. data/{stdlib/builtin → core}/fiber.rbs +14 -14
  31. data/{stdlib/builtin → core}/fiber_error.rbs +1 -1
  32. data/{stdlib/builtin → core}/file.rbs +0 -0
  33. data/{stdlib/builtin → core}/file_test.rbs +0 -0
  34. data/{stdlib/builtin → core}/float.rbs +161 -161
  35. data/{stdlib/builtin → core}/gc.rbs +3 -3
  36. data/{stdlib/builtin → core}/hash.rbs +15 -15
  37. data/{stdlib/builtin → core}/integer.rbs +0 -0
  38. data/{stdlib/builtin → core}/io.rbs +89 -89
  39. data/{stdlib/builtin → core}/kernel.rbs +70 -154
  40. data/{stdlib/builtin → core}/marshal.rbs +0 -0
  41. data/{stdlib/builtin → core}/match_data.rbs +1 -1
  42. data/{stdlib/builtin → core}/math.rbs +0 -0
  43. data/{stdlib/builtin → core}/method.rbs +19 -19
  44. data/{stdlib/builtin → core}/module.rbs +13 -13
  45. data/{stdlib/builtin → core}/nil_class.rbs +20 -20
  46. data/{stdlib/builtin → core}/numeric.rbs +101 -101
  47. data/{stdlib/builtin → core}/object.rbs +173 -173
  48. data/{stdlib/builtin → core}/proc.rbs +91 -91
  49. data/{stdlib/builtin → core}/process.rbs +0 -0
  50. data/{stdlib/builtin → core}/random.rbs +1 -1
  51. data/{stdlib/builtin → core}/range.rbs +4 -6
  52. data/{stdlib/builtin → core}/rational.rbs +83 -83
  53. data/{stdlib/builtin → core}/rb_config.rbs +0 -0
  54. data/{stdlib/builtin → core}/regexp.rbs +0 -0
  55. data/{stdlib/builtin → core}/ruby_vm.rbs +0 -0
  56. data/{stdlib/builtin → core}/signal.rbs +7 -7
  57. data/{stdlib/builtin → core}/string.rbs +10 -10
  58. data/{stdlib/builtin → core}/string_io.rbs +8 -8
  59. data/{stdlib/builtin → core}/struct.rbs +2 -2
  60. data/{stdlib/builtin → core}/symbol.rbs +1 -1
  61. data/{stdlib/builtin → core}/thread.rbs +189 -189
  62. data/{stdlib/builtin → core}/thread_group.rbs +2 -2
  63. data/{stdlib/builtin → core}/time.rbs +0 -0
  64. data/{stdlib/builtin → core}/trace_point.rbs +0 -0
  65. data/{stdlib/builtin → core}/true_class.rbs +10 -10
  66. data/{stdlib/builtin → core}/unbound_method.rbs +0 -0
  67. data/{stdlib/builtin → core}/warning.rbs +1 -1
  68. data/docs/CONTRIBUTING.md +1 -0
  69. data/docs/repo.md +125 -0
  70. data/docs/syntax.md +50 -6
  71. data/goodcheck.yml +22 -5
  72. data/lib/rbs.rb +1 -0
  73. data/lib/rbs/ast/comment.rb +1 -1
  74. data/lib/rbs/cli.rb +105 -103
  75. data/lib/rbs/definition.rb +9 -4
  76. data/lib/rbs/definition_builder.rb +54 -22
  77. data/lib/rbs/environment.rb +1 -1
  78. data/lib/rbs/environment_loader.rb +79 -105
  79. data/lib/rbs/namespace.rb +1 -1
  80. data/lib/rbs/parser.rb +3153 -0
  81. data/lib/rbs/parser.y +25 -11
  82. data/lib/rbs/prototype/rb.rb +47 -9
  83. data/lib/rbs/prototype/runtime.rb +17 -7
  84. data/lib/rbs/repository.rb +121 -0
  85. data/lib/rbs/test/hook.rb +2 -0
  86. data/lib/rbs/test/setup.rb +5 -3
  87. data/lib/rbs/test/setup_helper.rb +4 -4
  88. data/lib/rbs/test/tester.rb +4 -1
  89. data/lib/rbs/test/type_check.rb +12 -6
  90. data/lib/rbs/type_name.rb +3 -2
  91. data/lib/rbs/variance_calculator.rb +1 -1
  92. data/lib/rbs/vendorer.rb +38 -16
  93. data/lib/rbs/version.rb +1 -1
  94. data/lib/rbs/writer.rb +1 -1
  95. data/sig/cli.rbs +58 -0
  96. data/sig/constant.rbs +2 -2
  97. data/sig/constant_table.rbs +11 -11
  98. data/sig/declarations.rbs +2 -2
  99. data/sig/definition.rbs +10 -5
  100. data/sig/definition_builder.rbs +4 -1
  101. data/sig/environment_loader.rbs +92 -46
  102. data/sig/members.rbs +2 -2
  103. data/sig/method_types.rbs +1 -1
  104. data/sig/namespace.rbs +4 -4
  105. data/sig/parser.rbs +25 -0
  106. data/sig/polyfill.rbs +42 -0
  107. data/sig/rbs.rbs +8 -0
  108. data/sig/repository.rbs +79 -0
  109. data/sig/substitution.rbs +3 -3
  110. data/sig/typename.rbs +1 -1
  111. data/sig/types.rbs +1 -1
  112. data/sig/vendorer.rbs +44 -0
  113. data/sig/writer.rbs +15 -15
  114. data/stdlib/abbrev/{abbrev.rbs → 0/abbrev.rbs} +0 -0
  115. data/stdlib/base64/{base64.rbs → 0/base64.rbs} +1 -1
  116. data/stdlib/benchmark/{benchmark.rbs → 0/benchmark.rbs} +2 -2
  117. data/stdlib/{bigdecimal/math → bigdecimal-math/0}/big_math.rbs +0 -0
  118. data/stdlib/bigdecimal/{big_decimal.rbs → 0/big_decimal.rbs} +0 -0
  119. data/stdlib/coverage/{coverage.rbs → 0/coverage.rbs} +2 -2
  120. data/stdlib/csv/{csv.rbs → 0/csv.rbs} +4 -4
  121. data/stdlib/date/{date.rbs → 0/date.rbs} +4 -4
  122. data/stdlib/date/{date_time.rbs → 0/date_time.rbs} +1 -1
  123. data/stdlib/dbm/0/dbm.rbs +277 -0
  124. data/stdlib/erb/{erb.rbs → 0/erb.rbs} +0 -0
  125. data/stdlib/fiber/{fiber.rbs → 0/fiber.rbs} +0 -0
  126. data/stdlib/find/{find.rbs → 0/find.rbs} +12 -12
  127. data/stdlib/forwardable/{forwardable.rbs → 0/forwardable.rbs} +0 -0
  128. data/stdlib/ipaddr/{ipaddr.rbs → 0/ipaddr.rbs} +0 -0
  129. data/stdlib/json/{json.rbs → 0/json.rbs} +0 -0
  130. data/stdlib/logger/{formatter.rbs → 0/formatter.rbs} +0 -0
  131. data/stdlib/logger/{log_device.rbs → 0/log_device.rbs} +1 -1
  132. data/stdlib/logger/{logger.rbs → 0/logger.rbs} +1 -1
  133. data/stdlib/logger/{period.rbs → 0/period.rbs} +0 -0
  134. data/stdlib/logger/{severity.rbs → 0/severity.rbs} +0 -0
  135. data/stdlib/mutex_m/{mutex_m.rbs → 0/mutex_m.rbs} +0 -0
  136. data/stdlib/pathname/{pathname.rbs → 0/pathname.rbs} +40 -40
  137. data/stdlib/prime/{integer-extension.rbs → 0/integer-extension.rbs} +0 -0
  138. data/stdlib/prime/{prime.rbs → 0/prime.rbs} +1 -1
  139. data/stdlib/pstore/0/pstore.rbs +287 -0
  140. data/stdlib/pty/{pty.rbs → 0/pty.rbs} +1 -1
  141. data/stdlib/securerandom/{securerandom.rbs → 0/securerandom.rbs} +0 -0
  142. data/stdlib/set/{set.rbs → 0/set.rbs} +10 -10
  143. data/stdlib/tmpdir/{tmpdir.rbs → 0/tmpdir.rbs} +12 -12
  144. data/stdlib/tsort/0/cyclic.rbs +4 -0
  145. data/stdlib/tsort/0/interfaces.rbs +19 -0
  146. data/stdlib/tsort/0/tsort.rbs +363 -0
  147. data/stdlib/uri/{file.rbs → 0/file.rbs} +0 -0
  148. data/stdlib/uri/{generic.rbs → 0/generic.rbs} +1 -1
  149. data/stdlib/uri/{http.rbs → 0/http.rbs} +0 -0
  150. data/stdlib/uri/{https.rbs → 0/https.rbs} +0 -0
  151. data/stdlib/uri/{ldap.rbs → 0/ldap.rbs} +0 -0
  152. data/stdlib/uri/{ldaps.rbs → 0/ldaps.rbs} +0 -0
  153. data/stdlib/zlib/{zlib.rbs → 0/zlib.rbs} +0 -0
  154. data/steep/Gemfile.lock +9 -9
  155. metadata +104 -93
  156. data/stdlib/builtin/builtin.rbs +0 -42
@@ -236,7 +236,7 @@ class DateTime < Date
236
236
  # DateTime.parse('3rd Feb 2001 04:05:06 PM')
237
237
  # #=> #<DateTime: 2001-02-03T16:05:06+00:00 ...>
238
238
  #
239
- def self.parse: (String str, ?bool complete, ?Integer start) -> DateTime
239
+ def self.parse: (String str, ?boolish complete, ?Integer start) -> DateTime
240
240
 
241
241
  # Creates a new DateTime object by parsing from a string according to some
242
242
  # typical RFC 2822 formats.
@@ -0,0 +1,277 @@
1
+ # ## Introduction
2
+ #
3
+ # The DBM class provides a wrapper to a Unix-style
4
+ # [dbm](http://en.wikipedia.org/wiki/Dbm) or Database Manager library.
5
+ #
6
+ # Dbm databases do not have tables or columns; they are simple key-value data
7
+ # stores, like a Ruby Hash except not resident in RAM. Keys and values must be
8
+ # strings.
9
+ #
10
+ # The exact library used depends on how Ruby was compiled. It could be any of
11
+ # the following:
12
+ #
13
+ # * The original ndbm library is released in 4.3BSD. It is based on dbm
14
+ # library in Unix Version 7 but has different API to support multiple
15
+ # databases in a process.
16
+ # * [Berkeley DB](http://en.wikipedia.org/wiki/Berkeley_DB) versions 1 thru 6,
17
+ # also known as BDB and Sleepycat DB, now owned by Oracle Corporation.
18
+ # * Berkeley DB 1.x, still found in 4.4BSD derivatives (FreeBSD, OpenBSD,
19
+ # etc).
20
+ # * [gdbm](http://www.gnu.org/software/gdbm/), the GNU implementation of dbm.
21
+ # * [qdbm](http://fallabs.com/qdbm/index.html), another open source
22
+ # reimplementation of dbm.
23
+ #
24
+ #
25
+ # All of these dbm implementations have their own Ruby interfaces available,
26
+ # which provide richer (but varying) APIs.
27
+ #
28
+ # ## Cautions
29
+ #
30
+ # Before you decide to use DBM, there are some issues you should consider:
31
+ #
32
+ # * Each implementation of dbm has its own file format. Generally, dbm
33
+ # libraries will not read each other's files. This makes dbm files a bad
34
+ # choice for data exchange.
35
+ #
36
+ # * Even running the same OS and the same dbm implementation, the database
37
+ # file format may depend on the CPU architecture. For example, files may not
38
+ # be portable between PowerPC and 386, or between 32 and 64 bit Linux.
39
+ #
40
+ # * Different versions of Berkeley DB use different file formats. A change to
41
+ # the OS may therefore break DBM access to existing files.
42
+ #
43
+ # * Data size limits vary between implementations. Original Berkeley DB was
44
+ # limited to 2GB of data. Dbm libraries also sometimes limit the total size
45
+ # of a key/value pair, and the total size of all the keys that hash to the
46
+ # same value. These limits can be as little as 512 bytes. That said, gdbm
47
+ # and recent versions of Berkeley DB do away with these limits.
48
+ #
49
+ #
50
+ # Given the above cautions, DBM is not a good choice for long term storage of
51
+ # important data. It is probably best used as a fast and easy alternative to a
52
+ # Hash for processing large amounts of data.
53
+ #
54
+ # ## Example
55
+ #
56
+ # require 'dbm'
57
+ # db = DBM.open('rfcs', 0666, DBM::WRCREAT)
58
+ # db['822'] = 'Standard for the Format of ARPA Internet Text Messages'
59
+ # db['1123'] = 'Requirements for Internet Hosts - Application and Support'
60
+ # db['3068'] = 'An Anycast Prefix for 6to4 Relay Routers'
61
+ # puts db['822']
62
+ #
63
+ class DBM
64
+ include Enumerable[untyped]
65
+
66
+ # Open a dbm database and yields it if a block is given. See also `DBM.new`.
67
+ #
68
+ def self.open: (*untyped) -> ::DBM
69
+
70
+ public
71
+
72
+ # Return a value from the database by locating the key string provided. If the
73
+ # key is not found, returns nil.
74
+ #
75
+ def []: (untyped) -> untyped
76
+
77
+ # Stores the specified string value in the database, indexed via the string key
78
+ # provided.
79
+ #
80
+ def []=: (untyped, untyped) -> untyped
81
+
82
+ # Deletes all data from the database.
83
+ #
84
+ def clear: () -> self
85
+
86
+ # Closes the database.
87
+ #
88
+ def close: () -> NilClass
89
+
90
+ # Returns true if the database is closed, false otherwise.
91
+ #
92
+ def closed?: () -> bool
93
+
94
+ # Deletes an entry from the database.
95
+ #
96
+ def delete: (untyped) -> untyped
97
+
98
+ # Deletes all entries for which the code block returns true. Returns self.
99
+ #
100
+ def delete_if: () ?{ (untyped) -> bool } -> self
101
+
102
+ # Calls the block once for each [key, value] pair in the database. Returns self.
103
+ #
104
+ def each: (?untyped, ?untyped) -> Enumerator[untyped, ::DBM]
105
+
106
+ # Calls the block once for each key string in the database. Returns self.
107
+ #
108
+ def each_key: () -> Enumerator[String, ::DBM]
109
+
110
+ # Calls the block once for each [key, value] pair in the database. Returns self.
111
+ #
112
+ def each_pair: (?untyped, ?untyped) -> Enumerator[untyped, ::DBM]
113
+
114
+ # Calls the block once for each value string in the database. Returns self.
115
+ #
116
+ def each_value: () -> Enumerator[untyped, ::DBM]
117
+
118
+ # Returns true if the database is empty, false otherwise.
119
+ #
120
+ def empty?: () -> bool
121
+
122
+ # Return a value from the database by locating the key string provided. If the
123
+ # key is not found, returns `ifnone`. If `ifnone` is not given, raises
124
+ # IndexError.
125
+ #
126
+ def fetch: (*String) -> untyped
127
+
128
+ # Returns true if the database contains the specified key, false otherwise.
129
+ #
130
+ def has_key?: (String) -> bool
131
+
132
+ # Returns true if the database contains the specified string value, false
133
+ # otherwise.
134
+ #
135
+ def has_value?: (untyped) -> bool
136
+
137
+ # Returns true if the database contains the specified key, false otherwise.
138
+ #
139
+ def include?: (String) -> bool
140
+
141
+ def index: (untyped) -> (String | NilClass)
142
+
143
+ # Returns a Hash (not a DBM database) created by using each value in the
144
+ # database as a key, with the corresponding key as its value.
145
+ #
146
+ def invert: () -> Hash[untyped, String]
147
+
148
+ # Returns the key for the specified value.
149
+ #
150
+ def key: (untyped) -> (String | NilClass)
151
+
152
+ # Returns true if the database contains the specified key, false otherwise.
153
+ #
154
+ def key?: (untyped) -> bool
155
+
156
+ # Returns an array of all the string keys in the database.
157
+ #
158
+ def keys: () -> Array[String]
159
+
160
+ # Returns the number of entries in the database.
161
+ #
162
+ def length: () -> Integer
163
+
164
+ # Returns true if the database contains the specified key, false otherwise.
165
+ #
166
+ def member?: (untyped) -> bool
167
+
168
+ # Converts the contents of the database to an in-memory Hash, then calls
169
+ # Hash#reject with the specified code block, returning a new Hash.
170
+ #
171
+ def reject: () -> Hash[untyped, untyped]
172
+
173
+ # Deletes all entries for which the code block returns true. Returns self.
174
+ #
175
+ def reject!: () { (String, untyped) -> untyped } -> self
176
+
177
+ # Replaces the contents of the database with the contents of the specified
178
+ # object. Takes any object which implements the each_pair method, including Hash
179
+ # and DBM objects.
180
+ #
181
+ def replace: (untyped) -> ::DBM
182
+
183
+ # Returns a new array consisting of the [key, value] pairs for which the code
184
+ # block returns true.
185
+ #
186
+ def select: () { () -> untyped } -> Array[untyped]
187
+
188
+ # Removes a [key, value] pair from the database, and returns it. If the database
189
+ # is empty, returns nil. The order in which values are removed/returned is not
190
+ # guaranteed.
191
+ #
192
+ def shift: () -> Array[untyped]
193
+
194
+ # Returns the number of entries in the database.
195
+ #
196
+ def size: () -> Integer
197
+
198
+ # Stores the specified string value in the database, indexed via the string key
199
+ # provided.
200
+ #
201
+ def store: (String, untyped) -> String
202
+
203
+ # Converts the contents of the database to an array of [key, value] arrays, and
204
+ # returns it.
205
+ #
206
+ def to_a: () -> Array[untyped]
207
+
208
+ # Converts the contents of the database to an in-memory Hash object, and returns
209
+ # it.
210
+ #
211
+ def to_hash: () -> Hash[String, untyped]
212
+
213
+ # Updates the database with multiple values from the specified object. Takes any
214
+ # object which implements the each_pair method, including Hash and DBM objects.
215
+ #
216
+ def update: (untyped) -> ::DBM
217
+
218
+ # Returns true if the database contains the specified string value, false
219
+ # otherwise.
220
+ #
221
+ def value?: (untyped) -> bool
222
+
223
+ # Returns an array of all the string values in the database.
224
+ #
225
+ def values: () -> Array[untyped]
226
+
227
+ # Returns an array containing the values associated with the given keys.
228
+ #
229
+ def values_at: (*String) -> Array[untyped]
230
+
231
+ private
232
+
233
+ # Open a dbm database with the specified name, which can include a directory
234
+ # path. Any file extensions needed will be supplied automatically by the dbm
235
+ # library. For example, Berkeley DB appends '.db', and GNU gdbm uses two
236
+ # physical files with extensions '.dir' and '.pag'.
237
+ #
238
+ # The mode should be an integer, as for Unix chmod.
239
+ #
240
+ # Flags should be one of READER, WRITER, WRCREAT or NEWDB.
241
+ #
242
+ def initialize: (*untyped) -> self
243
+ end
244
+
245
+ # Indicates that dbm_open() should open the database in read/write mode, create
246
+ # it if it does not already exist, and delete all contents if it does already
247
+ # exist.
248
+ #
249
+ DBM::NEWDB: Integer
250
+
251
+ # Indicates that dbm_open() should open the database in read-only mode
252
+ #
253
+ #
254
+ DBM::READER: Integer
255
+
256
+ # Identifies ndbm library version.
257
+ #
258
+ # Examples:
259
+ #
260
+ # * "ndbm (4.3BSD)"
261
+ # * "Berkeley DB 4.8.30: (April 9, 2010)"
262
+ # * "Berkeley DB (unknown)" (4.4BSD, maybe)
263
+ # * "GDBM version 1.8.3. 10/15/2002 (built Jul 1 2011 12:32:45)"
264
+ # * "QDBM 1.8.78"
265
+ #
266
+ #
267
+ DBM::VERSION: String
268
+
269
+ # Indicates that dbm_open() should open the database in read/write mode, and
270
+ # create it if it does not already exist
271
+ #
272
+ DBM::WRCREAT: Integer
273
+
274
+ # Indicates that dbm_open() should open the database in read/write mode
275
+ #
276
+ #
277
+ DBM::WRITER: Integer
File without changes
File without changes
@@ -1,12 +1,12 @@
1
1
  # The `Find` module supports the top-down traversal of a set of file paths.
2
- #
2
+ #
3
3
  # For example, to total the size of all files under your home directory,
4
4
  # ignoring anything in a "dot" directory (e.g. $HOME/.ssh):
5
- #
5
+ #
6
6
  # require 'find'
7
- #
7
+ #
8
8
  # total_size = 0
9
- #
9
+ #
10
10
  # Find.find(ENV["HOME"]) do |path|
11
11
  # if FileTest.directory?(path)
12
12
  # if File.basename(path).start_with?('.')
@@ -18,23 +18,23 @@
18
18
  # total_size += FileTest.size(path)
19
19
  # end
20
20
  # end
21
- #
21
+ #
22
22
  module Find
23
23
  # Calls the associated block with the name of every file and directory listed as
24
24
  # arguments, then recursively on their subdirectories, and so on.
25
- #
25
+ #
26
26
  # Returns an enumerator if no block is given.
27
- #
27
+ #
28
28
  # See the `Find` module documentation for an example.
29
- #
30
- def self?.find: (*String | _ToPath paths, ?ignore_error: bool) -> Enumerator[String, nil]
31
- | (*String | _ToPath paths, ?ignore_error: bool) { (String arg0) -> void } -> nil
29
+ #
30
+ def self?.find: (*String | _ToPath paths, ?ignore_error: boolish) -> Enumerator[String, nil]
31
+ | (*String | _ToPath paths, ?ignore_error: boolish) { (String) -> void } -> nil
32
32
 
33
33
  # Skips the current file or directory, restarting the loop with the next entry.
34
34
  # If the current file is a directory, that directory will not be recursively
35
35
  # entered. Meaningful only within the block associated with Find::find.
36
- #
36
+ #
37
37
  # See the `Find` module documentation for an example.
38
- #
38
+ #
39
39
  def self?.prune: () -> void
40
40
  end
File without changes
@@ -24,7 +24,7 @@ class Logger
24
24
 
25
25
  def create_logfile: (String filename) -> File
26
26
 
27
- def initialize: (?untyped logdev, ?binmode: bool, ?shift_period_suffix: String, ?shift_size: Integer, ?shift_age: Numeric | String) -> void
27
+ def initialize: (?untyped logdev, ?binmode: boolish, ?shift_period_suffix: String, ?shift_size: Integer, ?shift_age: Numeric | String) -> void
28
28
 
29
29
  def lock_shift_log: () { () -> untyped } -> untyped
30
30
 
@@ -495,7 +495,7 @@ class Logger
495
495
  #
496
496
  # Create an instance.
497
497
  #
498
- def initialize: (logdev logdev, ?Numeric | String shift_age, ?Integer shift_size, ?shift_period_suffix: String, ?binmode: bool, ?datetime_format: String, ?formatter: _Formatter, ?progname: String, ?level: Integer) -> void
498
+ def initialize: (logdev logdev, ?Numeric | String shift_age, ?Integer shift_size, ?shift_period_suffix: String, ?binmode: boolish, ?datetime_format: String, ?formatter: _Formatter, ?progname: String, ?level: Integer) -> void
499
499
  end
500
500
 
501
501
  Logger::ProgName: String
@@ -324,9 +324,9 @@ class Pathname
324
324
  ?external_encoding: encoding,
325
325
  ?internal_encoding: encoding,
326
326
  ?encoding: encoding,
327
- ?textmode: bool,
328
- ?binmode: bool,
329
- ?autoclose: bool,
327
+ ?textmode: boolish,
328
+ ?binmode: boolish,
329
+ ?autoclose: boolish,
330
330
 
331
331
  # From String#encode
332
332
  ?invalid: :replace ?,
@@ -373,7 +373,7 @@ class Pathname
373
373
  # Note that the results never contain the entries `.` and `..` in the directory
374
374
  # because they are not children.
375
375
  #
376
- def children: (?bool with_directory) -> untyped
376
+ def children: (?boolish with_directory) -> untyped
377
377
 
378
378
  # Changes file permissions.
379
379
  #
@@ -397,7 +397,7 @@ class Pathname
397
397
  #
398
398
  # See Pathname#realpath.
399
399
  #
400
- def cleanpath: (?bool consider_symlink) -> Pathname
400
+ def cleanpath: (?boolish consider_symlink) -> Pathname
401
401
 
402
402
  # Returns the last change time, using directory information, not the file
403
403
  # itself.
@@ -485,8 +485,8 @@ class Pathname
485
485
  #
486
486
  # See Pathname#children
487
487
  #
488
- def each_child: (?bool with_directory) { (Pathname) -> void } -> Array[Pathname]
489
- | (?bool with_directory) -> Enumerator[Pathname, Array[Pathname]]
488
+ def each_child: (?boolish with_directory) { (Pathname) -> void } -> Array[Pathname]
489
+ | (?boolish with_directory) -> Enumerator[Pathname, Array[Pathname]]
490
490
 
491
491
  # Iterates over the entries (files and subdirectories) in the directory,
492
492
  # yielding a Pathname object for each entry.
@@ -517,11 +517,11 @@ class Pathname
517
517
  ?external_encoding: encoding,
518
518
  ?internal_encoding: encoding,
519
519
  ?encoding: encoding,
520
- ?textmode: bool,
521
- ?binmode: bool,
522
- ?autoclose: bool,
520
+ ?textmode: boolish,
521
+ ?binmode: boolish,
522
+ ?autoclose: boolish,
523
523
  # getline_args
524
- ?chomp: bool,
524
+ ?chomp: boolish,
525
525
  ) { (String) -> untyped } -> nil
526
526
  | (Integer limit,
527
527
  # open_args
@@ -530,11 +530,11 @@ class Pathname
530
530
  ?external_encoding: encoding,
531
531
  ?internal_encoding: encoding,
532
532
  ?encoding: encoding,
533
- ?textmode: bool,
534
- ?binmode: bool,
535
- ?autoclose: bool,
533
+ ?textmode: boolish,
534
+ ?binmode: boolish,
535
+ ?autoclose: boolish,
536
536
  # getline_args
537
- ?chomp: bool,
537
+ ?chomp: boolish,
538
538
  ) { (String) -> untyped } -> nil
539
539
  | (?String sep, ?Integer limit,
540
540
  # open_args
@@ -543,11 +543,11 @@ class Pathname
543
543
  ?external_encoding: encoding,
544
544
  ?internal_encoding: encoding,
545
545
  ?encoding: encoding,
546
- ?textmode: bool,
547
- ?binmode: bool,
548
- ?autoclose: bool,
546
+ ?textmode: boolish,
547
+ ?binmode: boolish,
548
+ ?autoclose: boolish,
549
549
  # getline_args
550
- ?chomp: bool,
550
+ ?chomp: boolish,
551
551
  ) -> Enumerator[String, nil]
552
552
  | (Integer limit,
553
553
  # open_args
@@ -556,11 +556,11 @@ class Pathname
556
556
  ?external_encoding: encoding,
557
557
  ?internal_encoding: encoding,
558
558
  ?encoding: encoding,
559
- ?textmode: bool,
560
- ?binmode: bool,
561
- ?autoclose: bool,
559
+ ?textmode: boolish,
560
+ ?binmode: boolish,
561
+ ?autoclose: boolish,
562
562
  # getline_args
563
- ?chomp: bool,
563
+ ?chomp: boolish,
564
564
  ) -> Enumerator[String, nil]
565
565
 
566
566
  # Tests the file is empty.
@@ -643,8 +643,8 @@ class Pathname
643
643
  #
644
644
  # See Find.find
645
645
  #
646
- def find: (?ignore_error: bool) { (Pathname) -> untyped } -> nil
647
- | (?ignore_error: bool) -> Enumerator[Pathname, nil]
646
+ def find: (?ignore_error: boolish) { (Pathname) -> untyped } -> nil
647
+ | (?ignore_error: boolish) -> Enumerator[Pathname, nil]
648
648
 
649
649
  # Return `true` if the receiver matches the given pattern.
650
650
  #
@@ -789,9 +789,9 @@ class Pathname
789
789
  ?external_encoding: encoding,
790
790
  ?internal_encoding: encoding,
791
791
  ?encoding: encoding,
792
- ?textmode: bool,
793
- ?binmode: bool,
794
- ?autoclose: bool,
792
+ ?textmode: boolish,
793
+ ?binmode: boolish,
794
+ ?autoclose: boolish,
795
795
  ) -> String
796
796
 
797
797
  # See FileTest.readable?.
@@ -813,11 +813,11 @@ class Pathname
813
813
  ?external_encoding: encoding,
814
814
  ?internal_encoding: encoding,
815
815
  ?encoding: encoding,
816
- ?textmode: bool,
817
- ?binmode: bool,
818
- ?autoclose: bool,
816
+ ?textmode: boolish,
817
+ ?binmode: boolish,
818
+ ?autoclose: boolish,
819
819
  # getline_args
820
- ?chomp: bool,
820
+ ?chomp: boolish,
821
821
  ) -> Array[String]
822
822
  | (Integer limit,
823
823
  # open_args
@@ -826,11 +826,11 @@ class Pathname
826
826
  ?external_encoding: encoding,
827
827
  ?internal_encoding: encoding,
828
828
  ?encoding: encoding,
829
- ?textmode: bool,
830
- ?binmode: bool,
831
- ?autoclose: bool,
829
+ ?textmode: boolish,
830
+ ?binmode: boolish,
831
+ ?autoclose: boolish,
832
832
  # getline_args
833
- ?chomp: bool,
833
+ ?chomp: boolish,
834
834
  ) -> Array[String]
835
835
 
836
836
  # Read symbolic link.
@@ -1033,9 +1033,9 @@ class Pathname
1033
1033
  ?external_encoding: encoding,
1034
1034
  ?internal_encoding: encoding,
1035
1035
  ?encoding: encoding,
1036
- ?textmode: bool,
1037
- ?binmode: bool,
1038
- ?autoclose: bool,
1036
+ ?textmode: boolish,
1037
+ ?binmode: boolish,
1038
+ ?autoclose: boolish,
1039
1039
  ) -> Integer
1040
1040
 
1041
1041
  # See FileTest.zero?.
@@ -1078,7 +1078,7 @@ end
1078
1078
 
1079
1079
  module Kernel
1080
1080
  private
1081
-
1081
+
1082
1082
  # Creates a new Pathname object from the given string, `path`, and returns
1083
1083
  # pathname object.
1084
1084
  #