rbs 4.0.0.dev.5 → 4.0.1.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 (194) hide show
  1. checksums.yaml +4 -4
  2. data/.clang-format +1 -0
  3. data/.github/workflows/c-check.yml +8 -4
  4. data/.github/workflows/comments.yml +3 -1
  5. data/.github/workflows/dependabot.yml +1 -1
  6. data/.github/workflows/ruby.yml +10 -0
  7. data/.github/workflows/rust.yml +95 -0
  8. data/CHANGELOG.md +323 -0
  9. data/Rakefile +12 -29
  10. data/Steepfile +1 -0
  11. data/config.yml +393 -37
  12. data/core/array.rbs +218 -188
  13. data/core/basic_object.rbs +9 -8
  14. data/core/class.rbs +6 -5
  15. data/core/comparable.rbs +45 -31
  16. data/core/complex.rbs +52 -40
  17. data/core/dir.rbs +57 -45
  18. data/core/encoding.rbs +5 -5
  19. data/core/enumerable.rbs +96 -91
  20. data/core/enumerator.rbs +4 -3
  21. data/core/errno.rbs +3 -2
  22. data/core/errors.rbs +31 -29
  23. data/core/exception.rbs +12 -12
  24. data/core/fiber.rbs +36 -36
  25. data/core/file.rbs +186 -113
  26. data/core/file_test.rbs +2 -2
  27. data/core/float.rbs +41 -32
  28. data/core/gc.rbs +78 -70
  29. data/core/hash.rbs +70 -60
  30. data/core/integer.rbs +32 -28
  31. data/core/io/buffer.rbs +36 -36
  32. data/core/io/wait.rbs +7 -7
  33. data/core/io.rbs +120 -135
  34. data/core/kernel.rbs +189 -139
  35. data/core/marshal.rbs +3 -3
  36. data/core/match_data.rbs +14 -12
  37. data/core/math.rbs +69 -67
  38. data/core/method.rbs +6 -6
  39. data/core/module.rbs +146 -85
  40. data/core/nil_class.rbs +4 -3
  41. data/core/numeric.rbs +35 -32
  42. data/core/object.rbs +6 -8
  43. data/core/object_space.rbs +11 -10
  44. data/core/pathname.rbs +131 -81
  45. data/core/proc.rbs +65 -33
  46. data/core/process.rbs +219 -201
  47. data/core/ractor.rbs +15 -11
  48. data/core/random.rbs +4 -3
  49. data/core/range.rbs +52 -47
  50. data/core/rational.rbs +5 -5
  51. data/core/rbs/unnamed/argf.rbs +58 -51
  52. data/core/rbs/unnamed/env_class.rbs +18 -13
  53. data/core/rbs/unnamed/main_class.rbs +123 -0
  54. data/core/rbs/unnamed/random.rbs +7 -5
  55. data/core/regexp.rbs +236 -197
  56. data/core/ruby.rbs +1 -1
  57. data/core/ruby_vm.rbs +32 -30
  58. data/core/rubygems/config_file.rbs +5 -5
  59. data/core/rubygems/errors.rbs +1 -1
  60. data/core/rubygems/requirement.rbs +5 -5
  61. data/core/rubygems/rubygems.rbs +5 -3
  62. data/core/set.rbs +17 -16
  63. data/core/signal.rbs +2 -2
  64. data/core/string.rbs +311 -292
  65. data/core/struct.rbs +26 -25
  66. data/core/symbol.rbs +25 -24
  67. data/core/thread.rbs +40 -34
  68. data/core/time.rbs +47 -42
  69. data/core/trace_point.rbs +34 -31
  70. data/core/true_class.rbs +2 -2
  71. data/core/unbound_method.rbs +10 -10
  72. data/core/warning.rbs +7 -7
  73. data/docs/collection.md +1 -1
  74. data/docs/config.md +171 -0
  75. data/docs/inline.md +110 -4
  76. data/docs/syntax.md +13 -12
  77. data/ext/rbs_extension/ast_translation.c +489 -135
  78. data/ext/rbs_extension/class_constants.c +8 -0
  79. data/ext/rbs_extension/class_constants.h +4 -0
  80. data/ext/rbs_extension/legacy_location.c +28 -51
  81. data/ext/rbs_extension/legacy_location.h +37 -0
  82. data/ext/rbs_extension/main.c +12 -20
  83. data/include/rbs/ast.h +423 -195
  84. data/include/rbs/lexer.h +2 -2
  85. data/include/rbs/location.h +25 -44
  86. data/include/rbs/parser.h +2 -2
  87. data/include/rbs/util/rbs_constant_pool.h +0 -3
  88. data/include/rbs.h +8 -0
  89. data/lib/rbs/ast/ruby/annotations.rb +157 -4
  90. data/lib/rbs/ast/ruby/members.rb +374 -22
  91. data/lib/rbs/cli/validate.rb +5 -60
  92. data/lib/rbs/collection/config/lockfile_generator.rb +6 -2
  93. data/lib/rbs/definition_builder.rb +60 -27
  94. data/lib/rbs/errors.rb +0 -11
  95. data/lib/rbs/inline_parser.rb +1 -1
  96. data/lib/rbs/parser_aux.rb +20 -7
  97. data/lib/rbs/prototype/helpers.rb +57 -0
  98. data/lib/rbs/prototype/rb.rb +1 -26
  99. data/lib/rbs/prototype/rbi.rb +1 -20
  100. data/lib/rbs/test/type_check.rb +3 -0
  101. data/lib/rbs/types.rb +62 -52
  102. data/lib/rbs/unit_test/type_assertions.rb +35 -8
  103. data/lib/rbs/version.rb +1 -1
  104. data/lib/rbs.rb +0 -1
  105. data/rbs.gemspec +1 -1
  106. data/rust/.gitignore +1 -0
  107. data/rust/Cargo.lock +378 -0
  108. data/rust/Cargo.toml +7 -0
  109. data/rust/ruby-rbs/Cargo.toml +22 -0
  110. data/rust/ruby-rbs/build.rs +764 -0
  111. data/rust/ruby-rbs/examples/locations.rs +60 -0
  112. data/rust/ruby-rbs/src/lib.rs +1 -0
  113. data/rust/ruby-rbs/src/node/mod.rs +742 -0
  114. data/rust/ruby-rbs/tests/sanity.rs +47 -0
  115. data/rust/ruby-rbs/vendor/rbs/config.yml +1 -0
  116. data/rust/ruby-rbs-sys/Cargo.toml +23 -0
  117. data/rust/ruby-rbs-sys/build.rs +204 -0
  118. data/rust/ruby-rbs-sys/src/lib.rs +50 -0
  119. data/rust/ruby-rbs-sys/vendor/rbs/include +1 -0
  120. data/rust/ruby-rbs-sys/vendor/rbs/src +1 -0
  121. data/rust/ruby-rbs-sys/wrapper.h +1 -0
  122. data/sig/ast/ruby/annotations.rbs +191 -4
  123. data/sig/ast/ruby/members.rbs +21 -1
  124. data/sig/cli/validate.rbs +1 -6
  125. data/sig/definition_builder.rbs +2 -0
  126. data/sig/errors.rbs +0 -8
  127. data/sig/method_types.rbs +1 -1
  128. data/sig/parser.rbs +17 -13
  129. data/sig/prototype/helpers.rbs +2 -0
  130. data/sig/types.rbs +10 -11
  131. data/sig/unit_test/spy.rbs +0 -8
  132. data/sig/unit_test/type_assertions.rbs +11 -0
  133. data/src/ast.c +339 -161
  134. data/src/lexstate.c +1 -1
  135. data/src/location.c +7 -47
  136. data/src/parser.c +674 -480
  137. data/src/util/rbs_constant_pool.c +0 -4
  138. data/stdlib/bigdecimal/0/big_decimal.rbs +16 -16
  139. data/stdlib/cgi-escape/0/escape.rbs +4 -4
  140. data/stdlib/coverage/0/coverage.rbs +4 -3
  141. data/stdlib/date/0/date.rbs +33 -28
  142. data/stdlib/date/0/date_time.rbs +24 -23
  143. data/stdlib/did_you_mean/0/did_you_mean.rbs +17 -16
  144. data/stdlib/erb/0/erb.rbs +64 -53
  145. data/stdlib/etc/0/etc.rbs +55 -50
  146. data/stdlib/fileutils/0/fileutils.rbs +138 -125
  147. data/stdlib/forwardable/0/forwardable.rbs +10 -10
  148. data/stdlib/io-console/0/io-console.rbs +2 -2
  149. data/stdlib/json/0/json.rbs +135 -108
  150. data/stdlib/monitor/0/monitor.rbs +3 -3
  151. data/stdlib/net-http/0/net-http.rbs +159 -134
  152. data/stdlib/objspace/0/objspace.rbs +8 -7
  153. data/stdlib/open-uri/0/open-uri.rbs +8 -8
  154. data/stdlib/open3/0/open3.rbs +36 -35
  155. data/stdlib/openssl/0/openssl.rbs +144 -129
  156. data/stdlib/optparse/0/optparse.rbs +18 -14
  157. data/stdlib/pathname/0/pathname.rbs +2 -2
  158. data/stdlib/pp/0/pp.rbs +9 -8
  159. data/stdlib/prettyprint/0/prettyprint.rbs +7 -7
  160. data/stdlib/pstore/0/pstore.rbs +35 -30
  161. data/stdlib/psych/0/psych.rbs +61 -8
  162. data/stdlib/psych/0/store.rbs +2 -4
  163. data/stdlib/pty/0/pty.rbs +9 -6
  164. data/stdlib/random-formatter/0/random-formatter.rbs +2 -2
  165. data/stdlib/ripper/0/ripper.rbs +20 -17
  166. data/stdlib/securerandom/0/securerandom.rbs +1 -1
  167. data/stdlib/shellwords/0/shellwords.rbs +2 -2
  168. data/stdlib/socket/0/addrinfo.rbs +7 -7
  169. data/stdlib/socket/0/basic_socket.rbs +3 -3
  170. data/stdlib/socket/0/ip_socket.rbs +10 -8
  171. data/stdlib/socket/0/socket.rbs +10 -9
  172. data/stdlib/socket/0/tcp_server.rbs +1 -1
  173. data/stdlib/socket/0/tcp_socket.rbs +1 -1
  174. data/stdlib/socket/0/udp_socket.rbs +1 -1
  175. data/stdlib/socket/0/unix_server.rbs +1 -1
  176. data/stdlib/stringio/0/stringio.rbs +55 -54
  177. data/stdlib/strscan/0/string_scanner.rbs +46 -44
  178. data/stdlib/tempfile/0/tempfile.rbs +24 -20
  179. data/stdlib/time/0/time.rbs +7 -5
  180. data/stdlib/tsort/0/tsort.rbs +7 -6
  181. data/stdlib/uri/0/common.rbs +26 -18
  182. data/stdlib/uri/0/file.rbs +2 -2
  183. data/stdlib/uri/0/generic.rbs +2 -2
  184. data/stdlib/uri/0/http.rbs +2 -2
  185. data/stdlib/uri/0/ldap.rbs +2 -2
  186. data/stdlib/uri/0/mailto.rbs +3 -3
  187. data/stdlib/uri/0/rfc2396_parser.rbs +6 -5
  188. data/stdlib/zlib/0/deflate.rbs +4 -3
  189. data/stdlib/zlib/0/gzip_reader.rbs +4 -4
  190. data/stdlib/zlib/0/gzip_writer.rbs +14 -12
  191. data/stdlib/zlib/0/inflate.rbs +1 -1
  192. data/stdlib/zlib/0/need_dict.rbs +1 -1
  193. metadata +23 -5
  194. data/.github/workflows/valgrind.yml +0 -42
data/core/ruby.rbs CHANGED
@@ -11,7 +11,7 @@ module Ruby
11
11
  COPYRIGHT: ::String
12
12
 
13
13
  # <!-- rdoc-file=version.c -->
14
- # The full ruby version string, like `ruby -v` prints
14
+ # The full ruby version string, like <code>ruby -v</code> prints
15
15
  #
16
16
  DESCRIPTION: ::String
17
17
 
data/core/ruby_vm.rbs CHANGED
@@ -41,8 +41,8 @@ RubyVM::OPTS: Array[String]
41
41
  # you want to learn how YARV works, but it also lets you control various
42
42
  # settings for the Ruby iseq compiler.
43
43
  #
44
- # You can find the source for the VM instructions in `insns.def` in the Ruby
45
- # source.
44
+ # You can find the source for the VM instructions in <code>insns.def</code> in
45
+ # the Ruby source.
46
46
  #
47
47
  # The instruction sequence results will almost certainly change as Ruby changes,
48
48
  # so example output in this documentation may be different from what you see.
@@ -183,8 +183,8 @@ class RubyVM::InstructionSequence < Object
183
183
  # -->
184
184
  # Returns the label of this instruction sequence.
185
185
  #
186
- # `<main>` if it's at the top level, `<compiled>` if it was evaluated from a
187
- # string.
186
+ # <code><main></code> if it's at the top level, <code><compiled></code> if it
187
+ # was evaluated from a string.
188
188
  #
189
189
  # For example, using irb:
190
190
  #
@@ -212,7 +212,7 @@ class RubyVM::InstructionSequence < Object
212
212
  # -->
213
213
  # Returns the path of this instruction sequence.
214
214
  #
215
- # `<compiled>` if the iseq was evaluated from a string.
215
+ # <code><compiled></code> if the iseq was evaluated from a string.
216
216
  #
217
217
  # For example, using irb:
218
218
  #
@@ -254,8 +254,8 @@ class RubyVM::InstructionSequence < Object
254
254
  # the following data:
255
255
  #
256
256
  # magic
257
- # : A string identifying the data format. **Always
258
- # `YARVInstructionSequence/SimpleDataFormat`.**
257
+ # : A string identifying the data format. <strong>Always
258
+ # <code>YARVInstructionSequence/SimpleDataFormat</code>.</strong>
259
259
  #
260
260
  #
261
261
  # major_version
@@ -273,14 +273,14 @@ class RubyVM::InstructionSequence < Object
273
273
  # misc
274
274
  # : A hash containing:
275
275
  #
276
- # `:arg_size`
276
+ # <code>:arg_size</code>
277
277
  # : the total number of arguments taken by the method or the block (0 if
278
278
  # *iseq* doesn't represent a method or block)
279
279
  #
280
- # `:local_size`
280
+ # <code>:local_size</code>
281
281
  # : the number of local variables + 1
282
282
  #
283
- # `:stack_max`
283
+ # <code>:stack_max</code>
284
284
  # : used in calculating the stack depth at which a SystemStackError is
285
285
  # thrown.
286
286
  #
@@ -290,15 +290,15 @@ class RubyVM::InstructionSequence < Object
290
290
  # : The name of the context (block, method, class, module, etc.) that this
291
291
  # instruction sequence belongs to.
292
292
  #
293
- # `<main>` if it's at the top level, `<compiled>` if it was evaluated from a
294
- # string.
293
+ # <code><main></code> if it's at the top level, <code><compiled></code> if
294
+ # it was evaluated from a string.
295
295
  #
296
296
  #
297
297
  # #path
298
298
  # : The relative path to the Ruby file where the instruction sequence was
299
299
  # loaded from.
300
300
  #
301
- # `<compiled>` if the iseq was evaluated from a string.
301
+ # <code><compiled></code> if the iseq was evaluated from a string.
302
302
  #
303
303
  #
304
304
  # #absolute_path
@@ -316,8 +316,9 @@ class RubyVM::InstructionSequence < Object
316
316
  # type
317
317
  # : The type of the instruction sequence.
318
318
  #
319
- # Valid values are `:top`, `:method`, `:block`, `:class`, `:rescue`,
320
- # `:ensure`, `:eval`, `:main`, and `plain`.
319
+ # Valid values are <code>:top</code>, <code>:method</code>,
320
+ # <code>:block</code>, <code>:class</code>, <code>:rescue</code>,
321
+ # <code>:ensure</code>, <code>:eval</code>, <code>:main</code>, and `plain`.
321
322
  #
322
323
  #
323
324
  # locals
@@ -328,7 +329,7 @@ class RubyVM::InstructionSequence < Object
328
329
  # params
329
330
  # : An Hash object containing parameter information.
330
331
  #
331
- # More info about these values can be found in `vm_core.h`.
332
+ # More info about these values can be found in <code>vm_core.h</code>.
332
333
  #
333
334
  #
334
335
  # catch_table
@@ -400,15 +401,16 @@ module RubyVM::AbstractSyntaxTree
400
401
  # RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
401
402
  # # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:9>
402
403
  #
403
- # If `keep_script_lines: true` option is provided, the text of the parsed source
404
- # is associated with nodes and is available via Node#script_lines.
404
+ # If <code>keep_script_lines: true</code> option is provided, the text of the
405
+ # parsed source is associated with nodes and is available via Node#script_lines.
405
406
  #
406
- # If `keep_tokens: true` option is provided, Node#tokens are populated.
407
+ # If <code>keep_tokens: true</code> option is provided, Node#tokens are
408
+ # populated.
407
409
  #
408
410
  # SyntaxError is raised if the given *string* is invalid syntax. To overwrite
409
- # this behavior, `error_tolerant: true` can be provided. In this case, the
410
- # parser will produce a tree where expressions with syntax errors would be
411
- # represented by Node with `type=:ERROR`.
411
+ # this behavior, <code>error_tolerant: true</code> can be provided. In this
412
+ # case, the parser will produce a tree where expressions with syntax errors
413
+ # would be represented by Node with <code>type=:ERROR</code>.
412
414
  #
413
415
  # root = RubyVM::AbstractSyntaxTree.parse("x = 1; p(x; y=2")
414
416
  # # <internal:ast>:33:in `parse': syntax error, unexpected ';', expecting ')' (SyntaxError)
@@ -661,7 +663,7 @@ module RubyVM::YJIT
661
663
  # -->
662
664
  # Marshal dumps exit locations to the given filename.
663
665
  # Usage:
664
- # If `--yjit-exit-locations` is passed, a file named
666
+ # If <code>--yjit-exit-locations</code> is passed, a file named
665
667
  # "yjit_exit_locations.dump" will automatically be generated.
666
668
  # If you want to collect traces manually, call `dump_exit_locations`
667
669
  # directly.
@@ -693,11 +695,11 @@ module RubyVM::YJIT
693
695
  # * `stats`:
694
696
  # * `false`: Don't enable stats.
695
697
  # * `true`: Enable stats. Print stats at exit.
696
- # * `:quiet`: Enable stats. Do not print stats at exit.
698
+ # * <code>:quiet</code>: Enable stats. Do not print stats at exit.
697
699
  # * `log`:
698
700
  # * `false`: Don't enable the log.
699
701
  # * `true`: Enable the log. Print log at exit.
700
- # * `:quiet`: Enable the log. Do not print log at exit.
702
+ # * <code>:quiet</code>: Enable the log. Do not print log at exit.
701
703
  #
702
704
  def self.enable: (?stats: false | true | :quiet) -> void
703
705
 
@@ -729,7 +731,7 @@ module RubyVM::YJIT
729
731
  # rdoc-file=yjit.rb
730
732
  # - reset_stats!()
731
733
  # -->
732
- # Discard statistics collected for `--yjit-stats`.
734
+ # Discard statistics collected for <code>--yjit-stats</code>.
733
735
  #
734
736
  def self.reset_stats!: () -> void
735
737
 
@@ -737,8 +739,8 @@ module RubyVM::YJIT
737
739
  # rdoc-file=yjit.rb
738
740
  # - runtime_stats(key = nil)
739
741
  # -->
740
- # Return a hash for statistics generated for the `--yjit-stats` command line
741
- # option.
742
+ # Return a hash for statistics generated for the <code>--yjit-stats</code>
743
+ # command line option.
742
744
  # Return `nil` when option is not passed or unavailable.
743
745
  # If a symbol argument is provided, return only the value for the named stat.
744
746
  # If any other type is provided, raises TypeError.
@@ -749,7 +751,7 @@ module RubyVM::YJIT
749
751
  # rdoc-file=yjit.rb
750
752
  # - stats_enabled?()
751
753
  # -->
752
- # Check if `--yjit-stats` is used.
754
+ # Check if <code>--yjit-stats</code> is used.
753
755
  #
754
756
  def self.stats_enabled?: () -> bool
755
757
 
@@ -758,7 +760,7 @@ module RubyVM::YJIT
758
760
  # - stats_string()
759
761
  # -->
760
762
  # Format and print out counters as a String. This returns a non-empty
761
- # content only when `--yjit-stats` is enabled.
763
+ # content only when <code>--yjit-stats</code> is enabled.
762
764
  #
763
765
  def self.stats_string: () -> String
764
766
  end
@@ -10,20 +10,20 @@
10
10
  # install: --no-rdoc --no-ri
11
11
  # update: --no-rdoc --no-ri
12
12
  #
13
- # You can use `gem:` to set default arguments for all commands.
13
+ # You can use <code>gem:</code> to set default arguments for all commands.
14
14
  #
15
15
  # RubyGems options use symbol keys. Valid options are:
16
16
  #
17
- # `:backtrace`
17
+ # <code>:backtrace</code>
18
18
  # : See #backtrace
19
19
  #
20
- # `:sources`
20
+ # <code>:sources</code>
21
21
  # : Sets Gem::sources
22
22
  #
23
- # `:verbose`
23
+ # <code>:verbose</code>
24
24
  # : See #verbose
25
25
  #
26
- # `:concurrent_downloads`
26
+ # <code>:concurrent_downloads</code>
27
27
  # : See #concurrent_downloads
28
28
  #
29
29
  #
@@ -4,7 +4,7 @@
4
4
  #
5
5
  # For user documentation, see:
6
6
  #
7
- # * `gem help` and `gem help [command]`
7
+ # * `gem help` and <code>gem help [command]</code>
8
8
  # * [RubyGems User Guide](https://guides.rubygems.org/)
9
9
  # * [Frequently Asked Questions](https://guides.rubygems.org/faqs)
10
10
  #
@@ -2,7 +2,7 @@
2
2
  module Gem
3
3
  # <!-- rdoc-file=lib/rubygems/requirement.rb -->
4
4
  # A Requirement is a set of one or more version restrictions. It supports a few
5
- # (`=, !=, >, <, >=, <=, ~>`) different restriction operators.
5
+ # (<code>=, !=, >, <, >=, <=, ~></code>) different restriction operators.
6
6
  #
7
7
  # See Gem::Version for a description on how versions and requirements work
8
8
  # together in RubyGems.
@@ -60,11 +60,11 @@ module Gem
60
60
  # rdoc-file=lib/rubygems/requirement.rb
61
61
  # - parse(obj)
62
62
  # -->
63
- # Parse `obj`, returning an `[op, version]` pair. `obj` can be a String or a
64
- # Gem::Version.
63
+ # Parse `obj`, returning an <code>[op, version]</code> pair. `obj` can be a
64
+ # String or a Gem::Version.
65
65
  #
66
66
  # If `obj` is a String, it can be either a full requirement specification, like
67
- # `">= 1.2"`, or a simple version number, like `"1.2"`.
67
+ # <code>">= 1.2"</code>, or a simple version number, like <code>"1.2"</code>.
68
68
  #
69
69
  # parse("> 1.0") # => [">", Gem::Version.new("1.0")]
70
70
  # parse("1.0") # => ["=", Gem::Version.new("1.0")]
@@ -78,7 +78,7 @@ module Gem
78
78
  # -->
79
79
  # Constructs a requirement from `requirements`. Requirements can be Strings,
80
80
  # Gem::Versions, or Arrays of those. `nil` and duplicate requirements are
81
- # ignored. An empty set of `requirements` is the same as `">= 0"`.
81
+ # ignored. An empty set of `requirements` is the same as <code>">= 0"</code>.
82
82
  #
83
83
  def initialize: (*String | Gem::Version requirements) -> void
84
84
 
@@ -4,7 +4,7 @@
4
4
  #
5
5
  # For user documentation, see:
6
6
  #
7
- # * `gem help` and `gem help [command]`
7
+ # * `gem help` and <code>gem help [command]</code>
8
8
  # * [RubyGems User Guide](https://guides.rubygems.org/)
9
9
  # * [Frequently Asked Questions](https://guides.rubygems.org/faqs)
10
10
  #
@@ -152,7 +152,8 @@ module Gem
152
152
  # - activated_gem_paths()
153
153
  # -->
154
154
  # The number of paths in the +$LOAD_PATH+ from activated gems. Used to
155
- # prioritize `-I` and `ENV['RUBYLIB']` entries during `require`.
155
+ # prioritize <code>-I</code> and <code>ENV['RUBYLIB']</code> entries during
156
+ # `require`.
156
157
  #
157
158
  def self.activated_gem_paths: () -> Integer
158
159
 
@@ -499,7 +500,8 @@ module Gem
499
500
  # rdoc-file=lib/rubygems.rb
500
501
  # - host()
501
502
  # -->
502
- # Get the default RubyGems API host. This is normally `https://rubygems.org`.
503
+ # Get the default RubyGems API host. This is normally
504
+ # <code>https://rubygems.org</code>.
503
505
  #
504
506
  def self.host: () -> String
505
507
 
data/core/set.rbs CHANGED
@@ -22,10 +22,11 @@
22
22
  #
23
23
  # ## Comparison
24
24
  #
25
- # The comparison operators `<`, `>`, `<=`, and `>=` are implemented as shorthand
26
- # for the {proper_,}{subset?,superset?} methods. The `<=>` operator reflects
27
- # this order, or returns `nil` for sets that both have distinct elements (`{x,
28
- # y}` vs. `{x, z}` for example).
25
+ # The comparison operators <code><</code>, <code>></code>, <code><=</code>, and
26
+ # <code>>=</code> are implemented as shorthand for the
27
+ # {proper_,}{subset?,superset?} methods. The <code><=></code> operator reflects
28
+ # this order, or returns `nil` for sets that both have distinct elements
29
+ # (<code>{x, y}</code> vs. <code>{x, z}</code> for example).
29
30
  #
30
31
  # ## Example
31
32
  #
@@ -48,9 +49,9 @@
48
49
  # core methods were adjusted.
49
50
  #
50
51
  # To keep backward compatibility, when a class is inherited from Set, additional
51
- # module `Set::SubclassCompatible` is included, which makes the inherited class
52
- # behavior, as well as internal method names, closer to what it was before Ruby
53
- # 4.0.
52
+ # module <code>Set::SubclassCompatible</code> is included, which makes the
53
+ # inherited class behavior, as well as internal method names, closer to what it
54
+ # was before Ruby 4.0.
54
55
  #
55
56
  # It can be easily seen, for example, in the #inspect method behavior:
56
57
  #
@@ -63,7 +64,7 @@
63
64
  # # prints "#<MySet: {1, 2, 3}>", like it was in Ruby 3.4
64
65
  #
65
66
  # For new code, if backward compatibility is not necessary, it is recommended to
66
- # instead inherit from `Set::CoreSet`, which avoids including the
67
+ # instead inherit from <code>Set::CoreSet</code>, which avoids including the
67
68
  # "compatibility" layer:
68
69
  #
69
70
  # class MyCoreSet < Set::CoreSet
@@ -340,8 +341,8 @@ class Set[unchecked out A]
340
341
  # Set[1, 2, 3].include? 2 #=> true
341
342
  # Set[1, 2, 3].include? 4 #=> false
342
343
  #
343
- # Note that `include?` and `member?` do not test member equality using `==` as
344
- # do other Enumerables.
344
+ # Note that <code>include?</code> and <code>member?</code> do not test member
345
+ # equality using <code>==</code> as do other Enumerables.
345
346
  #
346
347
  # This is aliased to #===, so it is usable in `case` expressions:
347
348
  #
@@ -355,7 +356,7 @@ class Set[unchecked out A]
355
356
  #
356
357
  # See also Enumerable#include?
357
358
  #
358
- def include?: (A) -> bool
359
+ def include?: (Hash::_Key) -> bool
359
360
 
360
361
  # <!-- rdoc-file=set.c -->
361
362
  # Returns true if the set contains the given object:
@@ -363,8 +364,8 @@ class Set[unchecked out A]
363
364
  # Set[1, 2, 3].include? 2 #=> true
364
365
  # Set[1, 2, 3].include? 4 #=> false
365
366
  #
366
- # Note that `include?` and `member?` do not test member equality using `==` as
367
- # do other Enumerables.
367
+ # Note that <code>include?</code> and <code>member?</code> do not test member
368
+ # equality using <code>==</code> as do other Enumerables.
368
369
  #
369
370
  # This is aliased to #===, so it is usable in `case` expressions:
370
371
  #
@@ -385,8 +386,8 @@ class Set[unchecked out A]
385
386
  # - set ^ enum -> new_set
386
387
  # -->
387
388
  # Returns a new set containing elements exclusive between the set and the given
388
- # enumerable object. `(set ^ enum)` is equivalent to `((set | enum) - (set &
389
- # enum))`.
389
+ # enumerable object. <code>(set ^ enum)</code> is equivalent to <code>((set |
390
+ # enum) - (set & enum))</code>.
390
391
  #
391
392
  # Set[1, 2] ^ Set[2, 3] #=> Set[3, 1]
392
393
  # Set[1, 'b', 'c'] ^ ['b', 'd'] #=> Set["d", 1, "c"]
@@ -500,7 +501,7 @@ class Set[unchecked out A]
500
501
  # - disjoint?(set) -> true or false
501
502
  # -->
502
503
  # Returns true if the set and the given enumerable have no element in common.
503
- # This method is the opposite of `intersect?`.
504
+ # This method is the opposite of <code>intersect?</code>.
504
505
  #
505
506
  # Set[1, 2, 3].disjoint? Set[3, 4] #=> false
506
507
  # Set[1, 2, 3].disjoint? Set[4, 5] #=> true
data/core/signal.rbs CHANGED
@@ -26,7 +26,7 @@
26
26
  # # ...
27
27
  # Process.kill("TERM", pid)
28
28
  #
29
- # *produces:*
29
+ # <em>produces:</em>
30
30
  # Debug now: true
31
31
  # Debug now: false
32
32
  # Terminating...
@@ -57,7 +57,7 @@ module Signal
57
57
  # Signal.trap("INT") { |signo| puts Signal.signame(signo) }
58
58
  # Process.kill("INT", 0)
59
59
  #
60
- # *produces:*
60
+ # <em>produces:</em>
61
61
  #
62
62
  # INT
63
63
  #