rbs 3.10.2 → 4.0.0.dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/comments.yml +2 -2
  3. data/.github/workflows/ruby.yml +24 -34
  4. data/.github/workflows/typecheck.yml +3 -1
  5. data/.github/workflows/windows.yml +2 -2
  6. data/.gitignore +0 -4
  7. data/CHANGELOG.md +0 -107
  8. data/README.md +1 -38
  9. data/Rakefile +20 -142
  10. data/Steepfile +1 -0
  11. data/config.yml +43 -1
  12. data/core/array.rbs +46 -96
  13. data/core/comparable.rbs +6 -13
  14. data/core/complex.rbs +25 -40
  15. data/core/dir.rbs +4 -4
  16. data/core/encoding.rbs +9 -6
  17. data/core/enumerable.rbs +3 -90
  18. data/core/enumerator.rbs +1 -43
  19. data/core/errno.rbs +0 -8
  20. data/core/errors.rbs +1 -28
  21. data/core/exception.rbs +2 -2
  22. data/core/fiber.rbs +20 -29
  23. data/core/file.rbs +19 -49
  24. data/core/file_test.rbs +1 -1
  25. data/core/float.rbs +33 -224
  26. data/core/gc.rbs +281 -417
  27. data/core/hash.rbs +727 -1023
  28. data/core/integer.rbs +63 -104
  29. data/core/io/buffer.rbs +10 -21
  30. data/core/io/wait.rbs +33 -11
  31. data/core/io.rbs +12 -14
  32. data/core/kernel.rbs +51 -61
  33. data/core/marshal.rbs +1 -1
  34. data/core/match_data.rbs +1 -1
  35. data/core/math.rbs +3 -42
  36. data/core/method.rbs +25 -63
  37. data/core/module.rbs +23 -101
  38. data/core/nil_class.rbs +3 -3
  39. data/core/numeric.rbs +17 -25
  40. data/core/object.rbs +3 -3
  41. data/core/object_space.rbs +15 -21
  42. data/core/proc.rbs +24 -30
  43. data/core/process.rbs +2 -2
  44. data/core/ractor.rbs +509 -361
  45. data/core/range.rbs +8 -7
  46. data/core/rational.rbs +34 -56
  47. data/core/rbs/unnamed/argf.rbs +2 -2
  48. data/core/rbs/unnamed/env_class.rbs +1 -1
  49. data/core/rbs/unnamed/random.rbs +2 -4
  50. data/core/regexp.rbs +20 -25
  51. data/core/ruby_vm.rbs +4 -6
  52. data/core/rubygems/errors.rbs +70 -3
  53. data/core/rubygems/rubygems.rbs +79 -11
  54. data/core/rubygems/version.rbs +3 -2
  55. data/core/set.rbs +359 -488
  56. data/core/signal.rbs +14 -24
  57. data/core/string.rbs +1236 -3165
  58. data/core/struct.rbs +1 -1
  59. data/core/symbol.rbs +11 -17
  60. data/core/thread.rbs +33 -95
  61. data/core/time.rbs +9 -35
  62. data/core/trace_point.rbs +4 -7
  63. data/core/unbound_method.rbs +6 -14
  64. data/docs/collection.md +2 -2
  65. data/docs/gem.md +1 -0
  66. data/docs/sigs.md +3 -3
  67. data/ext/rbs_extension/ast_translation.c +1077 -944
  68. data/ext/rbs_extension/ast_translation.h +0 -7
  69. data/ext/rbs_extension/class_constants.c +83 -71
  70. data/ext/rbs_extension/class_constants.h +7 -4
  71. data/ext/rbs_extension/extconf.rb +2 -24
  72. data/ext/rbs_extension/legacy_location.c +172 -173
  73. data/ext/rbs_extension/legacy_location.h +3 -8
  74. data/ext/rbs_extension/main.c +289 -239
  75. data/ext/rbs_extension/rbs_extension.h +0 -3
  76. data/ext/rbs_extension/rbs_string_bridging.h +0 -4
  77. data/include/rbs/ast.h +98 -37
  78. data/include/rbs/defines.h +12 -38
  79. data/include/rbs/lexer.h +114 -126
  80. data/include/rbs/location.h +14 -14
  81. data/include/rbs/parser.h +37 -21
  82. data/include/rbs/string.h +5 -3
  83. data/include/rbs/util/rbs_allocator.h +19 -40
  84. data/include/rbs/util/rbs_assert.h +1 -12
  85. data/include/rbs/util/rbs_constant_pool.h +3 -3
  86. data/include/rbs/util/rbs_encoding.h +1 -3
  87. data/include/rbs/util/rbs_unescape.h +1 -2
  88. data/lib/rbs/ast/ruby/annotations.rb +119 -0
  89. data/lib/rbs/ast/ruby/comment_block.rb +221 -0
  90. data/lib/rbs/ast/ruby/declarations.rb +86 -0
  91. data/lib/rbs/ast/ruby/helpers/constant_helper.rb +24 -0
  92. data/lib/rbs/ast/ruby/helpers/location_helper.rb +15 -0
  93. data/lib/rbs/ast/ruby/members.rb +213 -0
  94. data/lib/rbs/buffer.rb +104 -24
  95. data/lib/rbs/cli/validate.rb +40 -35
  96. data/lib/rbs/cli.rb +5 -6
  97. data/lib/rbs/collection/config/lockfile_generator.rb +0 -8
  98. data/lib/rbs/collection.rb +0 -1
  99. data/lib/rbs/definition.rb +6 -1
  100. data/lib/rbs/definition_builder/ancestor_builder.rb +65 -62
  101. data/lib/rbs/definition_builder/method_builder.rb +45 -30
  102. data/lib/rbs/definition_builder.rb +44 -9
  103. data/lib/rbs/environment/class_entry.rb +69 -0
  104. data/lib/rbs/environment/module_entry.rb +66 -0
  105. data/lib/rbs/environment.rb +244 -218
  106. data/lib/rbs/environment_loader.rb +8 -2
  107. data/lib/rbs/errors.rb +5 -4
  108. data/lib/rbs/inline_parser/comment_association.rb +117 -0
  109. data/lib/rbs/inline_parser.rb +206 -0
  110. data/lib/rbs/location_aux.rb +35 -3
  111. data/lib/rbs/parser_aux.rb +11 -6
  112. data/lib/rbs/prototype/runtime.rb +2 -2
  113. data/lib/rbs/resolver/constant_resolver.rb +2 -2
  114. data/lib/rbs/resolver/type_name_resolver.rb +38 -124
  115. data/lib/rbs/source.rb +99 -0
  116. data/lib/rbs/subtractor.rb +5 -6
  117. data/lib/rbs/test/type_check.rb +0 -14
  118. data/lib/rbs/types.rb +1 -3
  119. data/lib/rbs/version.rb +1 -1
  120. data/lib/rbs.rb +13 -1
  121. data/lib/rdoc/discover.rb +1 -1
  122. data/lib/rdoc_plugin/parser.rb +1 -1
  123. data/rbs.gemspec +1 -0
  124. data/sig/ancestor_builder.rbs +1 -1
  125. data/sig/ast/ruby/annotations.rbs +110 -0
  126. data/sig/ast/ruby/comment_block.rbs +119 -0
  127. data/sig/ast/ruby/declarations.rbs +60 -0
  128. data/sig/ast/ruby/helpers/constant_helper.rbs +11 -0
  129. data/sig/ast/ruby/helpers/location_helper.rbs +15 -0
  130. data/sig/ast/ruby/members.rbs +72 -0
  131. data/sig/buffer.rbs +63 -5
  132. data/sig/definition.rbs +1 -0
  133. data/sig/definition_builder.rbs +1 -1
  134. data/sig/environment/class_entry.rbs +50 -0
  135. data/sig/environment/module_entry.rbs +50 -0
  136. data/sig/environment.rbs +28 -133
  137. data/sig/errors.rbs +13 -6
  138. data/sig/inline_parser/comment_association.rbs +71 -0
  139. data/sig/inline_parser.rbs +87 -0
  140. data/sig/location.rbs +32 -7
  141. data/sig/manifest.yaml +1 -0
  142. data/sig/method_builder.rbs +7 -4
  143. data/sig/parser.rbs +16 -20
  144. data/sig/resolver/type_name_resolver.rbs +7 -38
  145. data/sig/source.rbs +48 -0
  146. data/sig/types.rbs +1 -4
  147. data/src/ast.c +290 -201
  148. data/src/lexer.c +2813 -2902
  149. data/src/lexer.re +4 -0
  150. data/src/lexstate.c +155 -169
  151. data/src/location.c +40 -40
  152. data/src/parser.c +2665 -2433
  153. data/src/string.c +48 -0
  154. data/src/util/rbs_allocator.c +76 -92
  155. data/src/util/rbs_assert.c +10 -10
  156. data/src/util/rbs_buffer.c +2 -2
  157. data/src/util/rbs_constant_pool.c +15 -13
  158. data/src/util/rbs_encoding.c +4062 -20097
  159. data/src/util/rbs_unescape.c +48 -85
  160. data/stdlib/bigdecimal/0/big_decimal.rbs +82 -100
  161. data/stdlib/bigdecimal-math/0/big_math.rbs +8 -169
  162. data/stdlib/cgi/0/core.rbs +393 -9
  163. data/stdlib/cgi/0/manifest.yaml +0 -1
  164. data/stdlib/coverage/0/coverage.rbs +1 -3
  165. data/stdlib/date/0/date.rbs +59 -67
  166. data/stdlib/date/0/date_time.rbs +1 -1
  167. data/stdlib/delegate/0/delegator.rbs +7 -10
  168. data/stdlib/erb/0/erb.rbs +347 -737
  169. data/stdlib/fileutils/0/fileutils.rbs +13 -18
  170. data/stdlib/forwardable/0/forwardable.rbs +0 -3
  171. data/stdlib/json/0/json.rbs +48 -68
  172. data/stdlib/net-http/0/net-http.rbs +0 -3
  173. data/stdlib/objspace/0/objspace.rbs +4 -9
  174. data/stdlib/open-uri/0/open-uri.rbs +0 -40
  175. data/stdlib/openssl/0/openssl.rbs +228 -331
  176. data/stdlib/optparse/0/optparse.rbs +3 -3
  177. data/stdlib/pathname/0/pathname.rbs +1380 -10
  178. data/stdlib/psych/0/psych.rbs +3 -3
  179. data/stdlib/rdoc/0/rdoc.rbs +1 -1
  180. data/stdlib/resolv/0/resolv.rbs +68 -25
  181. data/stdlib/ripper/0/ripper.rbs +2 -5
  182. data/stdlib/singleton/0/singleton.rbs +0 -3
  183. data/stdlib/socket/0/socket.rbs +1 -13
  184. data/stdlib/socket/0/tcp_socket.rbs +2 -10
  185. data/stdlib/stringio/0/stringio.rbs +85 -1176
  186. data/stdlib/strscan/0/string_scanner.rbs +31 -31
  187. data/stdlib/tempfile/0/tempfile.rbs +3 -3
  188. data/stdlib/time/0/time.rbs +1 -1
  189. data/stdlib/timeout/0/timeout.rbs +7 -63
  190. data/stdlib/tsort/0/cyclic.rbs +0 -3
  191. data/stdlib/uri/0/common.rbs +2 -11
  192. data/stdlib/uri/0/file.rbs +1 -1
  193. data/stdlib/uri/0/generic.rbs +16 -17
  194. data/stdlib/uri/0/rfc2396_parser.rbs +7 -6
  195. data/stdlib/zlib/0/zstream.rbs +0 -1
  196. metadata +39 -12
  197. data/.clang-format +0 -74
  198. data/.clangd +0 -2
  199. data/.github/workflows/c-check.yml +0 -54
  200. data/core/pathname.rbs +0 -1272
  201. data/core/ruby.rbs +0 -53
  202. data/docs/aliases.md +0 -79
  203. data/docs/encoding.md +0 -56
  204. data/ext/rbs_extension/compat.h +0 -10
  205. data/stdlib/cgi-escape/0/escape.rbs +0 -171
data/core/nil_class.rbs CHANGED
@@ -112,7 +112,7 @@ class NilClass
112
112
  def nil?: () -> true
113
113
 
114
114
  # <!--
115
- # rdoc-file=nilclass.rb
115
+ # rdoc-file=rational.c
116
116
  # - rationalize(eps = nil) -> (0/1)
117
117
  # -->
118
118
  # Returns zero as a Rational:
@@ -134,7 +134,7 @@ class NilClass
134
134
  def to_a: () -> []
135
135
 
136
136
  # <!--
137
- # rdoc-file=nilclass.rb
137
+ # rdoc-file=complex.c
138
138
  # - to_c -> (0+0i)
139
139
  # -->
140
140
  # Returns zero as a Complex:
@@ -174,7 +174,7 @@ class NilClass
174
174
  def to_i: () -> 0
175
175
 
176
176
  # <!--
177
- # rdoc-file=nilclass.rb
177
+ # rdoc-file=rational.c
178
178
  # - to_r -> (0/1)
179
179
  # -->
180
180
  # Returns zero as a Rational:
data/core/numeric.rbs CHANGED
@@ -160,7 +160,7 @@ class Numeric
160
160
  # rdoc-file=numeric.c
161
161
  # - self % other -> real_numeric
162
162
  # -->
163
- # Returns `self` modulo `other` as a real numeric (Integer, Float, or Rational).
163
+ # Returns `self` modulo `other` as a real number.
164
164
  #
165
165
  # Of the Core and Standard Library classes, only Rational uses this
166
166
  # implementation.
@@ -212,7 +212,7 @@ class Numeric
212
212
  # rdoc-file=numeric.c
213
213
  # - -self -> numeric
214
214
  # -->
215
- # Returns `self`, negated.
215
+ # Unary Minus---Returns the receiver, negated.
216
216
  #
217
217
  def -@: () -> Numeric
218
218
 
@@ -220,15 +220,7 @@ class Numeric
220
220
  # rdoc-file=numeric.c
221
221
  # - self <=> other -> zero or nil
222
222
  # -->
223
- # Compares `self` and `other`.
224
- #
225
- # Returns:
226
- #
227
- # * Zero, if `self` is the same as `other`.
228
- # * `nil`, otherwise.
229
- #
230
- # Class Numeric includes module Comparable, each of whose methods uses
231
- # Numeric#<=> for comparison.
223
+ # Returns zero if `self` is the same as `other`, `nil` otherwise.
232
224
  #
233
225
  # No subclass in the Ruby Core or Standard Library uses this implementation.
234
226
  #
@@ -344,7 +336,7 @@ class Numeric
344
336
  # - div(other) -> integer
345
337
  # -->
346
338
  # Returns the quotient `self/other` as an integer (via `floor`), using method
347
- # `/` as defined in the subclass of Numeric. (Numeric itself does not define
339
+ # `/` in the derived class of `self`. (Numeric itself does not define method
348
340
  # `/`.)
349
341
  #
350
342
  # Of the Core and Standard Library classes, Only Float and Rational use this
@@ -406,8 +398,8 @@ class Numeric
406
398
  # rdoc-file=numeric.c
407
399
  # - fdiv(other) -> float
408
400
  # -->
409
- # Returns the quotient `self/other` as a float, using method `/` as defined in
410
- # the subclass of Numeric. (Numeric itself does not define `/`.)
401
+ # Returns the quotient `self/other` as a float, using method `/` in the derived
402
+ # class of `self`. (Numeric itself does not define method `/`.)
411
403
  #
412
404
  # Of the Core and Standard Library classes, only BigDecimal uses this
413
405
  # implementation.
@@ -496,7 +488,7 @@ class Numeric
496
488
  alias magnitude abs
497
489
 
498
490
  # <!-- rdoc-file=numeric.c -->
499
- # Returns `self` modulo `other` as a real numeric (Integer, Float, or Rational).
491
+ # Returns `self` modulo `other` as a real number.
500
492
  #
501
493
  # Of the Core and Standard Library classes, only Rational uses this
502
494
  # implementation.
@@ -538,17 +530,17 @@ class Numeric
538
530
  # rdoc-file=numeric.c
539
531
  # - nonzero? -> self or nil
540
532
  # -->
541
- # Returns `self` if `self` is not a zero value, `nil` otherwise; uses method
542
- # `zero?` for the evaluation.
533
+ # Returns +self+ if +self+ is not a zero value, +nil+ otherwise;
534
+ # uses method <tt>zero?</tt> for the evaluation.
543
535
  #
544
- # The returned `self` allows the method to be chained:
536
+ # The returned +self+ allows the method to be chained:
545
537
  #
546
- # a = %w[z Bb bB bb BB a aA Aa AA A]
547
- # a.sort {|a, b| (a.downcase <=> b.downcase).nonzero? || a <=> b }
548
- # # => ["A", "a", "AA", "Aa", "aA", "BB", "Bb", "bB", "bb", "z"]
538
+ # a = %w[z Bb bB bb BB a aA Aa AA A]
539
+ # a.sort {|a, b| (a.downcase <=> b.downcase).nonzero? || a <=> b }
540
+ # # => ["A", "a", "AA", "Aa", "aA", "BB", "Bb", "bB", "bb", "z"]
549
541
  #
550
- # Of the Core and Standard Library classes, Integer, Float, Rational, and
551
- # Complex use this implementation.
542
+ # Of the Core and Standard Library classes,
543
+ # Integer, Float, Rational, and Complex use this implementation.
552
544
  #
553
545
  # Related: #zero?
554
546
  #
@@ -773,8 +765,8 @@ class Numeric
773
765
  # rdoc-file=numeric.c
774
766
  # - to_int -> integer
775
767
  # -->
776
- # Returns `self` as an integer; converts using method `to_i` in the subclass of
777
- # Numeric. (Numeric itself does not define `to_i`.)
768
+ # Returns `self` as an integer; converts using method `to_i` in the derived
769
+ # class.
778
770
  #
779
771
  # Of the Core and Standard Library classes, only Rational and Complex use this
780
772
  # implementation.
data/core/object.rbs CHANGED
@@ -40,7 +40,7 @@
40
40
  # * #instance_of?: Returns whether `self` is an instance of the given class.
41
41
  # * #instance_variable_defined?: Returns whether the given instance variable
42
42
  # is defined in `self`.
43
- # * #method: Returns the `Method` object for the given method in `self`.
43
+ # * #method: Returns the Method object for the given method in `self`.
44
44
  # * #methods: Returns an array of symbol names of public and protected methods
45
45
  # in `self`.
46
46
  # * #nil?: Returns `false`. (Only `nil` responds `true` to method `nil?`.)
@@ -50,13 +50,13 @@
50
50
  # methods in `self`.
51
51
  # * #protected_methods: Returns an array of the symbol names of the protected
52
52
  # methods in `self`.
53
- # * #public_method: Returns the `Method` object for the given public method in
53
+ # * #public_method: Returns the Method object for the given public method in
54
54
  # `self`.
55
55
  # * #public_methods: Returns an array of the symbol names of the public
56
56
  # methods in `self`.
57
57
  # * #respond_to?: Returns whether `self` responds to the given method.
58
58
  # * #singleton_class: Returns the singleton class of `self`.
59
- # * #singleton_method: Returns the `Method` object for the given singleton
59
+ # * #singleton_method: Returns the Method object for the given singleton
60
60
  # method in `self`.
61
61
  # * #singleton_methods: Returns an array of the symbol names of the singleton
62
62
  # methods in `self`.
@@ -29,7 +29,6 @@ module ObjectSpace
29
29
  # - _id2ref(p1)
30
30
  # -->
31
31
  #
32
- %a{deprecated}
33
32
  def self._id2ref: (Integer id) -> untyped
34
33
 
35
34
  # <!--
@@ -137,33 +136,28 @@ module ObjectSpace
137
136
  # Calls the block once for each living, nonimmediate object in this Ruby
138
137
  # process. If *module* is specified, calls the block for only those classes or
139
138
  # modules that match (or are a subclass of) *module*. Returns the number of
140
- # objects found. Immediate objects (such as `Fixnum`s, static `Symbol`s `true`,
141
- # `false` and `nil`) are never returned.
139
+ # objects found. Immediate objects (`Fixnum`s, `Symbol`s `true`, `false`, and
140
+ # `nil`) are never returned. In the example below, #each_object returns both the
141
+ # numbers we defined and several constants defined in the Math module.
142
142
  #
143
143
  # If no block is given, an enumerator is returned instead.
144
144
  #
145
- # Job = Class.new
146
- # jobs = [Job.new, Job.new]
147
- # count = ObjectSpace.each_object(Job) {|x| p x }
145
+ # a = 102.7
146
+ # b = 95 # Won't be returned
147
+ # c = 12345678987654321
148
+ # count = ObjectSpace.each_object(Numeric) {|x| p x }
148
149
  # puts "Total count: #{count}"
149
150
  #
150
151
  # *produces:*
151
152
  #
152
- # #<Job:0x000000011d6cbbf0>
153
- # #<Job:0x000000011d6cbc68>
154
- # Total count: 2
155
- #
156
- # Due to a current Ractor implementation issue, this method does not yield
157
- # Ractor-unshareable objects when the process is in multi-Ractor mode.
158
- # Multi-ractor mode is enabled when `Ractor.new` has been called for the first
159
- # time. See https://bugs.ruby-lang.org/issues/19387 for more information.
160
- #
161
- # a = 12345678987654321 # shareable
162
- # b = [].freeze # shareable
163
- # c = {} # not shareable
164
- # ObjectSpace.each_object {|x| x } # yields a, b, and c
165
- # Ractor.new {} # enter multi-Ractor mode
166
- # ObjectSpace.each_object {|x| x } # does not yield c
153
+ # 12345678987654321
154
+ # 102.7
155
+ # 2.71828182845905
156
+ # 3.14159265358979
157
+ # 2.22044604925031e-16
158
+ # 1.7976931348623157e+308
159
+ # 2.2250738585072e-308
160
+ # Total count: 7
167
161
  #
168
162
  def self.each_object: (?Module `module`) -> Enumerator[untyped, Integer]
169
163
  | (?Module `module`) { (untyped obj) -> void } -> Integer
data/core/proc.rbs CHANGED
@@ -201,8 +201,8 @@
201
201
  # ["Bob", "Jane"].map(&hi) #=> ["Hi, Bob!", "Hi, Jane!"]
202
202
  # ["Bob", "Jane"].map(&hey) #=> ["Hey, Bob!", "Hey, Jane!"]
203
203
  #
204
- # Of the Ruby core classes, this method is implemented by `Symbol`, `Method`,
205
- # and `Hash`.
204
+ # Of the Ruby core classes, this method is implemented by Symbol, Method, and
205
+ # Hash.
206
206
  #
207
207
  # :to_s.to_proc.call(1) #=> "1"
208
208
  # [1, 2].map(&:to_s) #=> ["1", "2"]
@@ -285,7 +285,7 @@
285
285
  # [1, 2, 3].each { |x| p it }
286
286
  # # syntax error found (SyntaxError)
287
287
  # # [1, 2, 3].each { |x| p it }
288
- # # ^~ 'it' is not allowed when an ordinary parameter is defined
288
+ # # ^~ `it` is not allowed when an ordinary parameter is defined
289
289
  #
290
290
  # But if a local name (variable or method) is available, it would be used:
291
291
  #
@@ -302,7 +302,7 @@
302
302
  #
303
303
  # p = proc { it**2 }
304
304
  # l = lambda { it**2 }
305
- # p.parameters # => [[:opt]]
305
+ # p.parameters # => [[:opt, nil]]
306
306
  # p.arity # => 1
307
307
  # l.parameters # => [[:req]]
308
308
  # l.arity # => 1
@@ -332,7 +332,7 @@
332
332
  # Numbered parameters can't be mixed with `it` either:
333
333
  #
334
334
  # [10, 20, 30].map { _1 + it }
335
- # # SyntaxError: 'it' is not allowed when a numbered parameter is already used
335
+ # # SyntaxError: `it` is not allowed when a numbered parameter is already used
336
336
  #
337
337
  # To avoid conflicts, naming local variables or method arguments `_1`, `_2` and
338
338
  # so on, causes an error.
@@ -380,9 +380,9 @@ class Proc
380
380
  def dup: () -> self
381
381
 
382
382
  # <!-- rdoc-file=proc.c -->
383
- # Invokes the block, setting the block's parameters to the arguments using
384
- # something close to method calling semantics. Returns the value of the last
385
- # expression evaluated in the block.
383
+ # Invokes the block, setting the block's parameters to the values in *params*
384
+ # using something close to method calling semantics. Returns the value of the
385
+ # last expression evaluated in the block.
386
386
  #
387
387
  # a_proc = Proc.new {|scalar, *values| values.map {|value| value*scalar } }
388
388
  # a_proc.call(9, 1, 2, 3) #=> [9, 18, 27]
@@ -409,9 +409,9 @@ class Proc
409
409
  alias === call
410
410
 
411
411
  # <!-- rdoc-file=proc.c -->
412
- # Invokes the block, setting the block's parameters to the arguments using
413
- # something close to method calling semantics. Returns the value of the last
414
- # expression evaluated in the block.
412
+ # Invokes the block, setting the block's parameters to the values in *params*
413
+ # using something close to method calling semantics. Returns the value of the
414
+ # last expression evaluated in the block.
415
415
  #
416
416
  # a_proc = Proc.new {|scalar, *values| values.map {|value| value*scalar } }
417
417
  # a_proc.call(9, 1, 2, 3) #=> [9, 18, 27]
@@ -592,13 +592,14 @@ class Proc
592
592
 
593
593
  # <!--
594
594
  # rdoc-file=proc.c
595
- # - call(...) -> obj
596
- # - self[...] -> obj
597
- # - yield(...) -> obj
595
+ # - prc.call(params,...) -> obj
596
+ # - prc[params,...] -> obj
597
+ # - prc.(params,...) -> obj
598
+ # - prc.yield(params,...) -> obj
598
599
  # -->
599
- # Invokes the block, setting the block's parameters to the arguments using
600
- # something close to method calling semantics. Returns the value of the last
601
- # expression evaluated in the block.
600
+ # Invokes the block, setting the block's parameters to the values in *params*
601
+ # using something close to method calling semantics. Returns the value of the
602
+ # last expression evaluated in the block.
602
603
  #
603
604
  # a_proc = Proc.new {|scalar, *values| values.map {|value| value*scalar } }
604
605
  # a_proc.call(9, 1, 2, 3) #=> [9, 18, 27]
@@ -625,9 +626,9 @@ class Proc
625
626
  def call: (?) -> untyped
626
627
 
627
628
  # <!-- rdoc-file=proc.c -->
628
- # Invokes the block, setting the block's parameters to the arguments using
629
- # something close to method calling semantics. Returns the value of the last
630
- # expression evaluated in the block.
629
+ # Invokes the block, setting the block's parameters to the values in *params*
630
+ # using something close to method calling semantics. Returns the value of the
631
+ # last expression evaluated in the block.
631
632
  #
632
633
  # a_proc = Proc.new {|scalar, *values| values.map {|value| value*scalar } }
633
634
  # a_proc.call(9, 1, 2, 3) #=> [9, 18, 27]
@@ -834,17 +835,10 @@ class Proc
834
835
 
835
836
  # <!--
836
837
  # rdoc-file=proc.c
837
- # - prc.source_location -> [String, Integer, Integer, Integer, Integer]
838
+ # - prc.source_location -> [String, Integer]
838
839
  # -->
839
- # Returns the location where the Proc was defined. The returned Array contains:
840
- # (1) the Ruby source filename
841
- # (2) the line number where the definition starts
842
- # (3) the column number where the definition starts
843
- # (4) the line number where the definition ends
844
- # (5) the column number where the definitions ends
845
- #
846
- # This method will return `nil` if the Proc was not defined in Ruby (i.e.
847
- # native).
840
+ # Returns the Ruby source filename and line number containing this proc or `nil`
841
+ # if this proc was not defined in Ruby (i.e. native).
848
842
  #
849
843
  def source_location: () -> [String, Integer]?
850
844
 
data/core/process.rbs CHANGED
@@ -590,7 +590,7 @@ module Process
590
590
  # * `:microsecond`: Number of microseconds as an integer.
591
591
  # * `:millisecond`: Number of milliseconds as an integer.
592
592
  # * `:nanosecond`: Number of nanoseconds as an integer.
593
- # * `:second`: Number of seconds as an integer.
593
+ # * `::second`: Number of seconds as an integer.
594
594
  #
595
595
  # Examples:
596
596
  #
@@ -2023,7 +2023,7 @@ end
2023
2023
  # <!-- rdoc-file=process.c -->
2024
2024
  # The Process::Sys module contains UID and GID functions which provide direct
2025
2025
  # bindings to the system calls of the same names instead of the more-portable
2026
- # versions of the same functionality found in the `Process`, Process::UID, and
2026
+ # versions of the same functionality found in the Process, Process::UID, and
2027
2027
  # Process::GID modules.
2028
2028
  #
2029
2029
  module Process::Sys