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
@@ -120,8 +120,8 @@
120
120
  # supported (see below).
121
121
  #
122
122
  # PKCS5 supports PBKDF2 as it was specified in PKCS#5
123
- # [v2.0](http://www.rsa.com/rsalabs/node.asp?id=2127). It still uses a password,
124
- # a salt, and additionally a number of iterations that will slow the key
123
+ # v2.0[http://www.rsa.com/rsalabs/node.asp?id=2127]. It still uses a password, a
124
+ # salt, and additionally a number of iterations that will slow the key
125
125
  # derivation process down. The slower this is, the more work it requires being
126
126
  # able to brute-force the resulting key.
127
127
  #
@@ -441,8 +441,8 @@
441
441
  # ssl_client.puts "hello server!"
442
442
  # puts ssl_client.gets
443
443
  #
444
- # If the server certificate is invalid or `context.ca_file` is not set when
445
- # verifying peers an OpenSSL::SSL::SSLError will be raised.
444
+ # If the server certificate is invalid or <code>context.ca_file</code> is not
445
+ # set when verifying peers an OpenSSL::SSL::SSLError will be raised.
446
446
  #
447
447
  module OpenSSL
448
448
  # <!--
@@ -612,7 +612,8 @@ module OpenSSL
612
612
  # can only be determined using out-of-band information from the ASN.1 type
613
613
  # declaration. Since this information is normally known when encoding a type,
614
614
  # all sub-classes of ASN1Data offer an additional attribute *tagging* that
615
- # allows to encode a value implicitly (`:IMPLICIT`) or explicitly (`:EXPLICIT`).
615
+ # allows to encode a value implicitly (<code>:IMPLICIT</code>) or explicitly
616
+ # (<code>:EXPLICIT</code>).
616
617
  #
617
618
  # ### Constructive
618
619
  #
@@ -640,18 +641,18 @@ module OpenSSL
640
641
  # When constructing an ASN1Data object the ASN.1 type definition may require
641
642
  # certain elements to be either implicitly or explicitly tagged. This can be
642
643
  # achieved by setting the *tagging* attribute manually for sub-classes of
643
- # ASN1Data. Use the symbol `:IMPLICIT` for implicit tagging and `:EXPLICIT` if
644
- # the element requires explicit tagging.
644
+ # ASN1Data. Use the symbol <code>:IMPLICIT</code> for implicit tagging and
645
+ # <code>:EXPLICIT</code> if the element requires explicit tagging.
645
646
  #
646
647
  # ## Possible values for *tag_class*
647
648
  #
648
649
  # It is possible to create arbitrary ASN1Data objects that also support a
649
650
  # PRIVATE or APPLICATION tag class. Possible values for the *tag_class*
650
651
  # attribute are:
651
- # * `:UNIVERSAL` (the default for untagged values)
652
- # * `:CONTEXT_SPECIFIC` (the default for tagged values)
653
- # * `:APPLICATION`
654
- # * `:PRIVATE`
652
+ # * <code>:UNIVERSAL</code> (the default for untagged values)
653
+ # * <code>:CONTEXT_SPECIFIC</code> (the default for tagged values)
654
+ # * <code>:APPLICATION</code>
655
+ # * <code>:PRIVATE</code>
655
656
  #
656
657
  # ## Tag constants
657
658
  #
@@ -684,7 +685,8 @@ module OpenSSL
684
685
  #
685
686
  # An Array that stores the name of a given tag number. These names are the same
686
687
  # as the name of the tag constant that is additionally defined, e.g.
687
- # `UNIVERSAL_TAG_NAME[2] = "INTEGER"` and `OpenSSL::ASN1::INTEGER = 2`.
688
+ # <code>UNIVERSAL_TAG_NAME[2] = "INTEGER"</code> and
689
+ # <code>OpenSSL::ASN1::INTEGER = 2</code>.
688
690
  #
689
691
  # ## Example usage
690
692
  #
@@ -760,8 +762,8 @@ module OpenSSL
760
762
  # - OpenSSL::ASN1.decode(der) -> ASN1Data
761
763
  # -->
762
764
  # Decodes a BER- or DER-encoded value and creates an ASN1Data instance. *der*
763
- # may be a String or any object that features a `.to_der` method transforming it
764
- # into a BER-/DER-encoded String+
765
+ # may be a String or any object that features a <code>.to_der</code> method
766
+ # transforming it into a BER-/DER-encoded String+
765
767
  #
766
768
  # ## Example
767
769
  # der = File.binread('asn1data')
@@ -892,7 +894,7 @@ module OpenSSL
892
894
  #
893
895
  # An implicitly 1-tagged INTEGER value will be parsed as an ASN1Data with
894
896
  # * *tag* equal to 1
895
- # * *tag_class* equal to `:CONTEXT_SPECIFIC`
897
+ # * *tag_class* equal to <code>:CONTEXT_SPECIFIC</code>
896
898
  # * *value* equal to a String that carries the raw encoding of the INTEGER.
897
899
  # This implies that a subsequent decoding step is required to completely decode
898
900
  # implicitly tagged values.
@@ -901,7 +903,7 @@ module OpenSSL
901
903
  #
902
904
  # An explicitly 1-tagged INTEGER value will be parsed as an ASN1Data with
903
905
  # * *tag* equal to 1
904
- # * *tag_class* equal to `:CONTEXT_SPECIFIC`
906
+ # * *tag_class* equal to <code>:CONTEXT_SPECIFIC</code>
905
907
  # * *value* equal to an Array with one single element, an instance of
906
908
  # OpenSSL::ASN1::Integer, i.e. the inner element is the non-tagged primitive
907
909
  # value, and the tagging is represented in the outer ASN1Data
@@ -1159,15 +1161,17 @@ module OpenSSL
1159
1161
 
1160
1162
  # <!-- rdoc-file=ext/openssl/ossl_asn1.c -->
1161
1163
  # May be used as a hint for encoding a value either implicitly or explicitly by
1162
- # setting it either to `:IMPLICIT` or to `:EXPLICIT`. *tagging* is not set when
1163
- # a ASN.1 structure is parsed using OpenSSL::ASN1.decode.
1164
+ # setting it either to <code>:IMPLICIT</code> or to <code>:EXPLICIT</code>.
1165
+ # *tagging* is not set when a ASN.1 structure is parsed using
1166
+ # OpenSSL::ASN1.decode.
1164
1167
  #
1165
1168
  def tagging: () -> tagging?
1166
1169
 
1167
1170
  # <!-- rdoc-file=ext/openssl/ossl_asn1.c -->
1168
1171
  # May be used as a hint for encoding a value either implicitly or explicitly by
1169
- # setting it either to `:IMPLICIT` or to `:EXPLICIT`. *tagging* is not set when
1170
- # a ASN.1 structure is parsed using OpenSSL::ASN1.decode.
1172
+ # setting it either to <code>:IMPLICIT</code> or to <code>:EXPLICIT</code>.
1173
+ # *tagging* is not set when a ASN.1 structure is parsed using
1174
+ # OpenSSL::ASN1.decode.
1171
1175
  #
1172
1176
  def tagging=: (tagging) -> tagging
1173
1177
 
@@ -1193,9 +1197,10 @@ module OpenSSL
1193
1197
  # *tagging*: may be used as an encoding hint to encode a value either explicitly
1194
1198
  # or implicitly, see ASN1 for possible values.
1195
1199
  #
1196
- # *tag_class*: if *tag* and *tagging* are `nil` then this is set to `:UNIVERSAL`
1197
- # by default. If either *tag* or *tagging* are set then `:CONTEXT_SPECIFIC` is
1198
- # used as the default. For possible values please cf. ASN1.
1200
+ # *tag_class*: if *tag* and *tagging* are `nil` then this is set to
1201
+ # <code>:UNIVERSAL</code> by default. If either *tag* or *tagging* are set then
1202
+ # <code>:CONTEXT_SPECIFIC</code> is used as the default. For possible values
1203
+ # please cf. ASN1.
1199
1204
  #
1200
1205
  # ## Example
1201
1206
  # int = OpenSSL::ASN1::Integer.new(42)
@@ -1408,15 +1413,17 @@ module OpenSSL
1408
1413
  class Primitive < OpenSSL::ASN1::ASN1Data
1409
1414
  # <!-- rdoc-file=ext/openssl/ossl_asn1.c -->
1410
1415
  # May be used as a hint for encoding a value either implicitly or explicitly by
1411
- # setting it either to `:IMPLICIT` or to `:EXPLICIT`. *tagging* is not set when
1412
- # a ASN.1 structure is parsed using OpenSSL::ASN1.decode.
1416
+ # setting it either to <code>:IMPLICIT</code> or to <code>:EXPLICIT</code>.
1417
+ # *tagging* is not set when a ASN.1 structure is parsed using
1418
+ # OpenSSL::ASN1.decode.
1413
1419
  #
1414
1420
  def tagging: () -> tagging?
1415
1421
 
1416
1422
  # <!-- rdoc-file=ext/openssl/ossl_asn1.c -->
1417
1423
  # May be used as a hint for encoding a value either implicitly or explicitly by
1418
- # setting it either to `:IMPLICIT` or to `:EXPLICIT`. *tagging* is not set when
1419
- # a ASN.1 structure is parsed using OpenSSL::ASN1.decode.
1424
+ # setting it either to <code>:IMPLICIT</code> or to <code>:EXPLICIT</code>.
1425
+ # *tagging* is not set when a ASN.1 structure is parsed using
1426
+ # OpenSSL::ASN1.decode.
1420
1427
  #
1421
1428
  def tagging=: (tagging) -> tagging
1422
1429
 
@@ -1442,9 +1449,10 @@ module OpenSSL
1442
1449
  # *tagging*: may be used as an encoding hint to encode a value either explicitly
1443
1450
  # or implicitly, see ASN1 for possible values.
1444
1451
  #
1445
- # *tag_class*: if *tag* and *tagging* are `nil` then this is set to `:UNIVERSAL`
1446
- # by default. If either *tag* or *tagging* are set then `:CONTEXT_SPECIFIC` is
1447
- # used as the default. For possible values please cf. ASN1.
1452
+ # *tag_class*: if *tag* and *tagging* are `nil` then this is set to
1453
+ # <code>:UNIVERSAL</code> by default. If either *tag* or *tagging* are set then
1454
+ # <code>:CONTEXT_SPECIFIC</code> is used as the default. For possible values
1455
+ # please cf. ASN1.
1448
1456
  #
1449
1457
  # ## Example
1450
1458
  # int = OpenSSL::ASN1::Integer.new(42)
@@ -1511,7 +1519,7 @@ module OpenSSL
1511
1519
  # -->
1512
1520
  # Generates a random prime number of bit length *bits*. If *safe* is set to
1513
1521
  # `true`, generates a safe prime. If *add* is specified, generates a prime that
1514
- # fulfills condition `p % add = rem`.
1522
+ # fulfills condition <code>p % add = rem</code>.
1515
1523
  #
1516
1524
  # ### Parameters
1517
1525
  # * *bits* - integer
@@ -1680,8 +1688,8 @@ module OpenSSL
1680
1688
  # rdoc-file=ext/openssl/ossl_bn.c
1681
1689
  # - bn.eql?(obj) => true or false
1682
1690
  # -->
1683
- # Returns `true` only if *obj* is a `OpenSSL::BN` with the same value as *bn*.
1684
- # Contrast this with OpenSSL::BN#==, which performs type conversions.
1691
+ # Returns `true` only if *obj* is a <code>OpenSSL::BN</code> with the same value
1692
+ # as *bn*. Contrast this with OpenSSL::BN#==, which performs type conversions.
1685
1693
  #
1686
1694
  def eql?: (untyped other) -> bool
1687
1695
 
@@ -1802,7 +1810,8 @@ module OpenSSL
1802
1810
  # -->
1803
1811
  # Performs a Miller-Rabin probabilistic primality test for `bn`.
1804
1812
  #
1805
- # **`checks` parameter is deprecated in version 3.0.** It has no effect.
1813
+ # <strong>`checks` parameter is deprecated in version 3.0.</strong> It has no
1814
+ # effect.
1806
1815
  #
1807
1816
  def prime?: (?int checks) -> bool
1808
1817
 
@@ -1814,7 +1823,7 @@ module OpenSSL
1814
1823
  # -->
1815
1824
  # Performs a Miller-Rabin probabilistic primality test for `bn`.
1816
1825
  #
1817
- # **Deprecated in version 3.0.** Use #prime? instead.
1826
+ # <strong>Deprecated in version 3.0.</strong> Use #prime? instead.
1818
1827
  #
1819
1828
  # `checks` and `trial_div` parameters no longer have any effect.
1820
1829
  #
@@ -1964,8 +1973,8 @@ module OpenSSL
1964
1973
  # rdoc-file=ext/openssl/lib/openssl/buffering.rb
1965
1974
  # - <<(s)
1966
1975
  # -->
1967
- # Writes *s* to the stream. *s* will be converted to a String using `.to_s`
1968
- # method.
1976
+ # Writes *s* to the stream. *s* will be converted to a String using
1977
+ # <code>.to_s</code> method.
1969
1978
  #
1970
1979
  def <<: (String s) -> self
1971
1980
 
@@ -2127,8 +2136,8 @@ module OpenSSL
2127
2136
  #
2128
2137
  # By specifying a keyword argument *exception* to `false`, you can indicate that
2129
2138
  # read_nonblock should not raise an IO::Wait*able exception, but return the
2130
- # symbol `:wait_writable` or `:wait_readable` instead. At EOF, it will return
2131
- # `nil` instead of raising EOFError.
2139
+ # symbol <code>:wait_writable</code> or <code>:wait_readable</code> instead. At
2140
+ # EOF, it will return `nil` instead of raising EOFError.
2132
2141
  #
2133
2142
  def read_nonblock: (Integer maxlen, ?String buf, ?exception: true) -> String
2134
2143
  | (Integer maxlen, ?String buf, exception: false) -> (String | :wait_writable | :wait_readable | nil)
@@ -2205,7 +2214,8 @@ module OpenSSL
2205
2214
  # - write(*s)
2206
2215
  # -->
2207
2216
  # Writes *s* to the stream. If the argument is not a String it will be
2208
- # converted using `.to_s` method. Returns the number of bytes written.
2217
+ # converted using <code>.to_s</code> method. Returns the number of bytes
2218
+ # written.
2209
2219
  #
2210
2220
  def write: (*_ToS s) -> Integer
2211
2221
 
@@ -2247,7 +2257,7 @@ module OpenSSL
2247
2257
  #
2248
2258
  # By specifying a keyword argument *exception* to `false`, you can indicate that
2249
2259
  # write_nonblock should not raise an IO::Wait*able exception, but return the
2250
- # symbol `:wait_writable` or `:wait_readable` instead.
2260
+ # symbol <code>:wait_writable</code> or <code>:wait_readable</code> instead.
2251
2261
  #
2252
2262
  def write_nonblock: (_ToS s, ?exception: true) -> Integer
2253
2263
  | (_ToS s, exception: false) -> (Integer | :wait_writable | :wait_readable | nil)
@@ -3965,7 +3975,7 @@ module OpenSSL
3965
3975
  # short-circuits on evaluation, and is therefore vulnerable to timing attacks.
3966
3976
  # The proper way is to use a method that always takes the same amount of time
3967
3977
  # when comparing two values, thus not leaking any information to potential
3968
- # attackers. To do this, use `OpenSSL.fixed_length_secure_compare`.
3978
+ # attackers. To do this, use <code>OpenSSL.fixed_length_secure_compare</code>.
3969
3979
  #
3970
3980
  module KDF
3971
3981
  # <!--
@@ -3988,8 +3998,8 @@ module OpenSSL
3988
3998
  # : The context and application specific information.
3989
3999
  #
3990
4000
  # *length*
3991
- # : The output length in octets. Must be <= `255 * HashLen`, where HashLen is
3992
- # the length of the hash function output in octets.
4001
+ # : The output length in octets. Must be <= <code>255 * HashLen</code>, where
4002
+ # HashLen is the length of the hash function output in octets.
3993
4003
  #
3994
4004
  # *hash*
3995
4005
  # : The hash function.
@@ -4849,8 +4859,8 @@ module OpenSSL
4849
4859
  #
4850
4860
  #
4851
4861
  # For most responses, clients can check *result* > 0. If a responder doesn't
4852
- # handle nonces `result.nonzero?` may be necessary. A result of `0` is always
4853
- # an error.
4862
+ # handle nonces <code>result.nonzero?</code> may be necessary. A result of `0`
4863
+ # is always an error.
4854
4864
  #
4855
4865
  def check_nonce: (Response response) -> (-1 | 0 | 1 | 2 | 3)
4856
4866
 
@@ -5206,7 +5216,8 @@ module OpenSSL
5206
5216
  # -->
5207
5217
  # Creates a PKCS #7 enveloped-data structure.
5208
5218
  #
5209
- # Before version 3.3.0, `cipher` was optional and defaulted to `"RC2-40-CBC"`.
5219
+ # Before version 3.3.0, `cipher` was optional and defaulted to
5220
+ # <code>"RC2-40-CBC"</code>.
5210
5221
  #
5211
5222
  # See also the man page PKCS7_encrypt(3).
5212
5223
  #
@@ -5678,8 +5689,8 @@ module OpenSSL
5678
5689
  # result of DH#public_key), then this method needs to be called first in order
5679
5690
  # to generate the per-session keys before performing the actual key exchange.
5680
5691
  #
5681
- # **Deprecated in version 3.0**. This method is incompatible with OpenSSL 3.0.0
5682
- # or later.
5692
+ # <strong>Deprecated in version 3.0</strong>. This method is incompatible with
5693
+ # OpenSSL 3.0.0 or later.
5683
5694
  #
5684
5695
  # See also OpenSSL::PKey.generate_key.
5685
5696
  #
@@ -5984,8 +5995,8 @@ module OpenSSL
5984
5995
  # will not be available on FIPS-compliant systems.
5985
5996
  #
5986
5997
  #
5987
- # **This method is kept for compatibility.** This should only be used when the
5988
- # traditional, non-standard OpenSSL format is required.
5998
+ # <strong>This method is kept for compatibility.</strong> This should only be
5999
+ # used when the traditional, non-standard OpenSSL format is required.
5989
6000
  #
5990
6001
  # Consider using #public_to_pem (X.509 SubjectPublicKeyInfo) or #private_to_pem
5991
6002
  # (PKCS #8 PrivateKeyInfo or EncryptedPrivateKeyInfo) instead.
@@ -6070,8 +6081,8 @@ module OpenSSL
6070
6081
  # to be an already-computed message digest of the original input data. The
6071
6082
  # signature is issued using the private key of this DSA instance.
6072
6083
  #
6073
- # **Deprecated in version 3.0**. Consider using PKey::PKey#sign_raw and
6074
- # PKey::PKey#verify_raw instead.
6084
+ # <strong>Deprecated in version 3.0</strong>. Consider using PKey::PKey#sign_raw
6085
+ # and PKey::PKey#verify_raw instead.
6075
6086
  #
6076
6087
  # `string`
6077
6088
  # : A message digest of the original input data to be signed.
@@ -6099,8 +6110,8 @@ module OpenSSL
6099
6110
  # Verifies whether the signature is valid given the message digest input. It
6100
6111
  # does so by validating `sig` using the public key of this DSA instance.
6101
6112
  #
6102
- # **Deprecated in version 3.0**. Consider using PKey::PKey#sign_raw and
6103
- # PKey::PKey#verify_raw instead.
6113
+ # <strong>Deprecated in version 3.0</strong>. Consider using PKey::PKey#sign_raw
6114
+ # and PKey::PKey#verify_raw instead.
6104
6115
  #
6105
6116
  # `digest`
6106
6117
  # : A message digest of the original input data to be signed.
@@ -6118,8 +6129,8 @@ module OpenSSL
6118
6129
  #
6119
6130
  # See #to_pem for details.
6120
6131
  #
6121
- # **This method is kept for compatibility.** This should only be used when the
6122
- # traditional, non-standard OpenSSL format is required.
6132
+ # <strong>This method is kept for compatibility.</strong> This should only be
6133
+ # used when the traditional, non-standard OpenSSL format is required.
6123
6134
  #
6124
6135
  # Consider using #public_to_der or #private_to_der instead.
6125
6136
  #
@@ -6171,8 +6182,8 @@ module OpenSSL
6171
6182
  # will not be available on FIPS-compliant systems.
6172
6183
  #
6173
6184
  #
6174
- # **This method is kept for compatibility.** This should only be used when the
6175
- # traditional, non-standard OpenSSL format is required.
6185
+ # <strong>This method is kept for compatibility.</strong> This should only be
6186
+ # used when the traditional, non-standard OpenSSL format is required.
6176
6187
  #
6177
6188
  # Consider using #public_to_pem (X.509 SubjectPublicKeyInfo) or #private_to_pem
6178
6189
  # (PKCS #8 PrivateKeyInfo or EncryptedPrivateKeyInfo) instead.
@@ -6225,8 +6236,8 @@ module OpenSSL
6225
6236
  # will not be available on FIPS-compliant systems.
6226
6237
  #
6227
6238
  #
6228
- # **This method is kept for compatibility.** This should only be used when the
6229
- # traditional, non-standard OpenSSL format is required.
6239
+ # <strong>This method is kept for compatibility.</strong> This should only be
6240
+ # used when the traditional, non-standard OpenSSL format is required.
6230
6241
  #
6231
6242
  # Consider using #public_to_pem (X.509 SubjectPublicKeyInfo) or #private_to_pem
6232
6243
  # (PKCS #8 PrivateKeyInfo or EncryptedPrivateKeyInfo) instead.
@@ -6365,8 +6376,8 @@ module OpenSSL
6365
6376
  # rdoc-file=ext/openssl/lib/openssl/pkey.rb
6366
6377
  # - key.dsa_sign_asn1(data) -> String
6367
6378
  # -->
6368
- # **Deprecated in version 3.0**. Consider using PKey::PKey#sign_raw and
6369
- # PKey::PKey#verify_raw instead.
6379
+ # <strong>Deprecated in version 3.0</strong>. Consider using PKey::PKey#sign_raw
6380
+ # and PKey::PKey#verify_raw instead.
6370
6381
  #
6371
6382
  def dsa_sign_asn1: (String digest) -> String
6372
6383
 
@@ -6374,8 +6385,8 @@ module OpenSSL
6374
6385
  # rdoc-file=ext/openssl/lib/openssl/pkey.rb
6375
6386
  # - key.dsa_verify_asn1(data, sig) -> true | false
6376
6387
  # -->
6377
- # **Deprecated in version 3.0**. Consider using PKey::PKey#sign_raw and
6378
- # PKey::PKey#verify_raw instead.
6388
+ # <strong>Deprecated in version 3.0</strong>. Consider using PKey::PKey#sign_raw
6389
+ # and PKey::PKey#verify_raw instead.
6379
6390
  #
6380
6391
  def dsa_verify_asn1: (String digest, String signature) -> bool
6381
6392
 
@@ -6429,8 +6440,8 @@ module OpenSSL
6429
6440
  # will not be available on FIPS-compliant systems.
6430
6441
  #
6431
6442
  #
6432
- # **This method is kept for compatibility.** This should only be used when the
6433
- # SEC 1/RFC 5915 ECPrivateKey format is required.
6443
+ # <strong>This method is kept for compatibility.</strong> This should only be
6444
+ # used when the SEC 1/RFC 5915 ECPrivateKey format is required.
6434
6445
  #
6435
6446
  # Consider using #public_to_pem (X.509 SubjectPublicKeyInfo) or #private_to_pem
6436
6447
  # (PKCS #8 PrivateKeyInfo or EncryptedPrivateKeyInfo) instead.
@@ -6555,8 +6566,8 @@ module OpenSSL
6555
6566
  #
6556
6567
  # See #to_pem for details.
6557
6568
  #
6558
- # **This method is kept for compatibility.** This should only be used when the
6559
- # SEC 1/RFC 5915 ECPrivateKey format is required.
6569
+ # <strong>This method is kept for compatibility.</strong> This should only be
6570
+ # used when the SEC 1/RFC 5915 ECPrivateKey format is required.
6560
6571
  #
6561
6572
  # Consider using #public_to_der or #private_to_der instead.
6562
6573
  #
@@ -6608,8 +6619,8 @@ module OpenSSL
6608
6619
  # will not be available on FIPS-compliant systems.
6609
6620
  #
6610
6621
  #
6611
- # **This method is kept for compatibility.** This should only be used when the
6612
- # SEC 1/RFC 5915 ECPrivateKey format is required.
6622
+ # <strong>This method is kept for compatibility.</strong> This should only be
6623
+ # used when the SEC 1/RFC 5915 ECPrivateKey format is required.
6613
6624
  #
6614
6625
  # Consider using #public_to_pem (X.509 SubjectPublicKeyInfo) or #private_to_pem
6615
6626
  # (PKCS #8 PrivateKeyInfo or EncryptedPrivateKeyInfo) instead.
@@ -6767,14 +6778,14 @@ module OpenSSL
6767
6778
  #
6768
6779
  # *format* can be one of these:
6769
6780
  #
6770
- # `:compressed`
6781
+ # <code>:compressed</code>
6771
6782
  # : Encoded as z||x, where z is an octet indicating which solution of the
6772
6783
  # equation y is. z will be 0x02 or 0x03.
6773
6784
  #
6774
- # `:uncompressed`
6785
+ # <code>:uncompressed</code>
6775
6786
  # : Encoded as z||x||y, where z is an octet 0x04.
6776
6787
  #
6777
- # `:hybrid`
6788
+ # <code>:hybrid</code>
6778
6789
  # : Encodes as z||x||y, where z is an octet indicating which solution of the
6779
6790
  # equation y is. z will be 0x06 or 0x07.
6780
6791
  #
@@ -6918,9 +6929,9 @@ module OpenSSL
6918
6929
  # -->
6919
6930
  # Performs elliptic curve point multiplication.
6920
6931
  #
6921
- # The first form calculates `bn1 * point + bn2 * G`, where `G` is the generator
6922
- # of the group of *point*. *bn2* may be omitted, and in that case, the result is
6923
- # just `bn1 * point`.
6932
+ # The first form calculates <code>bn1 * point + bn2 * G</code>, where `G` is the
6933
+ # generator of the group of *point*. *bn2* may be omitted, and in that case, the
6934
+ # result is just <code>bn1 * point</code>.
6924
6935
  #
6925
6936
  # Before version 4.0.0, and when compiled with OpenSSL 1.1.1 or older, this
6926
6937
  # method allowed another form:
@@ -6965,9 +6976,9 @@ module OpenSSL
6965
6976
  #
6966
6977
  # *conversion_form* specifies how the point is converted. Possible values are:
6967
6978
  #
6968
- # * `:compressed`
6969
- # * `:uncompressed`
6970
- # * `:hybrid`
6979
+ # * <code>:compressed</code>
6980
+ # * <code>:uncompressed</code>
6981
+ # * <code>:hybrid</code>
6971
6982
  #
6972
6983
  def to_octet_string: (point_conversion_format) -> String
6973
6984
 
@@ -7266,8 +7277,8 @@ module OpenSSL
7266
7277
  # will not be available on FIPS-compliant systems.
7267
7278
  #
7268
7279
  #
7269
- # **This method is kept for compatibility.** This should only be used when the
7270
- # PKCS #1 RSAPrivateKey format is required.
7280
+ # <strong>This method is kept for compatibility.</strong> This should only be
7281
+ # used when the PKCS #1 RSAPrivateKey format is required.
7271
7282
  #
7272
7283
  # Consider using #public_to_pem (X.509 SubjectPublicKeyInfo) or #private_to_pem
7273
7284
  # (PKCS #8 PrivateKeyInfo or EncryptedPrivateKeyInfo) instead.
@@ -7308,8 +7319,8 @@ module OpenSSL
7308
7319
  # private key. `padding` defaults to PKCS1_PADDING, which is known to be
7309
7320
  # insecure but is kept for backwards compatibility.
7310
7321
  #
7311
- # **Deprecated in version 3.0**. Consider using PKey::PKey#encrypt and
7312
- # PKey::PKey#decrypt instead.
7322
+ # <strong>Deprecated in version 3.0</strong>. Consider using PKey::PKey#encrypt
7323
+ # and PKey::PKey#decrypt instead.
7313
7324
  #
7314
7325
  def private_decrypt: (String data, ?Integer padding) -> String
7315
7326
 
@@ -7322,8 +7333,8 @@ module OpenSSL
7322
7333
  # which is known to be insecure but is kept for backwards compatibility. The
7323
7334
  # encrypted string output can be decrypted using #public_decrypt.
7324
7335
  #
7325
- # **Deprecated in version 3.0**. Consider using PKey::PKey#sign_raw and
7326
- # PKey::PKey#verify_raw, and PKey::PKey#verify_recover instead.
7336
+ # <strong>Deprecated in version 3.0</strong>. Consider using PKey::PKey#sign_raw
7337
+ # and PKey::PKey#verify_raw, and PKey::PKey#verify_recover instead.
7327
7338
  #
7328
7339
  def private_encrypt: (String data, ?Integer padding) -> String
7329
7340
 
@@ -7345,8 +7356,8 @@ module OpenSSL
7345
7356
  # public key. `padding` defaults to PKCS1_PADDING which is known to be insecure
7346
7357
  # but is kept for backwards compatibility.
7347
7358
  #
7348
- # **Deprecated in version 3.0**. Consider using PKey::PKey#sign_raw and
7349
- # PKey::PKey#verify_raw, and PKey::PKey#verify_recover instead.
7359
+ # <strong>Deprecated in version 3.0</strong>. Consider using PKey::PKey#sign_raw
7360
+ # and PKey::PKey#verify_raw, and PKey::PKey#verify_recover instead.
7350
7361
  #
7351
7362
  def public_decrypt: (String data, ?Integer padding) -> String
7352
7363
 
@@ -7359,8 +7370,8 @@ module OpenSSL
7359
7370
  # which is known to be insecure but is kept for backwards compatibility. The
7360
7371
  # encrypted string output can be decrypted using #private_decrypt.
7361
7372
  #
7362
- # **Deprecated in version 3.0**. Consider using PKey::PKey#encrypt and
7363
- # PKey::PKey#decrypt instead.
7373
+ # <strong>Deprecated in version 3.0</strong>. Consider using PKey::PKey#encrypt
7374
+ # and PKey::PKey#decrypt instead.
7364
7375
  #
7365
7376
  def public_encrypt: (String data, ?Integer padding) -> String
7366
7377
 
@@ -7384,8 +7395,9 @@ module OpenSSL
7384
7395
  # rdoc-file=ext/openssl/ossl_pkey_rsa.c
7385
7396
  # - rsa.set_crt_params(dmp1, dmq1, iqmp) -> self
7386
7397
  # -->
7387
- # Sets *dmp1*, *dmq1*, *iqmp* for the RSA instance. They are calculated by `d
7388
- # mod (p - 1)`, `d mod (q - 1)` and `q^(-1) mod p` respectively.
7398
+ # Sets *dmp1*, *dmq1*, *iqmp* for the RSA instance. They are calculated by
7399
+ # <code>d mod (p - 1)</code>, <code>d mod (q - 1)</code> and <code>q^(-1) mod
7400
+ # p</code> respectively.
7389
7401
  #
7390
7402
  def set_crt_params: (bn dmp1, bn dmq1, bn iqmp) -> self
7391
7403
 
@@ -7425,9 +7437,9 @@ module OpenSSL
7425
7437
  #
7426
7438
  # *salt_length*
7427
7439
  # : The length in octets of the salt. Two special values are reserved:
7428
- # `:digest` means the digest length, and `:max` means the maximum possible
7429
- # length for the combination of the private key and the selected message
7430
- # digest algorithm.
7440
+ # <code>:digest</code> means the digest length, and <code>:max</code> means
7441
+ # the maximum possible length for the combination of the private key and the
7442
+ # selected message digest algorithm.
7431
7443
  #
7432
7444
  # *mgf1_hash*
7433
7445
  # : The hash algorithm used in MGF1 (the currently supported mask generation
@@ -7452,8 +7464,8 @@ module OpenSSL
7452
7464
  #
7453
7465
  # See #to_pem for details.
7454
7466
  #
7455
- # **This method is kept for compatibility.** This should only be used when the
7456
- # PKCS #1 RSAPrivateKey format is required.
7467
+ # <strong>This method is kept for compatibility.</strong> This should only be
7468
+ # used when the PKCS #1 RSAPrivateKey format is required.
7457
7469
  #
7458
7470
  # Consider using #public_to_der or #private_to_der instead.
7459
7471
  #
@@ -7505,8 +7517,8 @@ module OpenSSL
7505
7517
  # will not be available on FIPS-compliant systems.
7506
7518
  #
7507
7519
  #
7508
- # **This method is kept for compatibility.** This should only be used when the
7509
- # PKCS #1 RSAPrivateKey format is required.
7520
+ # <strong>This method is kept for compatibility.</strong> This should only be
7521
+ # used when the PKCS #1 RSAPrivateKey format is required.
7510
7522
  #
7511
7523
  # Consider using #public_to_pem (X.509 SubjectPublicKeyInfo) or #private_to_pem
7512
7524
  # (PKCS #8 PrivateKeyInfo or EncryptedPrivateKeyInfo) instead.
@@ -7559,8 +7571,8 @@ module OpenSSL
7559
7571
  # will not be available on FIPS-compliant systems.
7560
7572
  #
7561
7573
  #
7562
- # **This method is kept for compatibility.** This should only be used when the
7563
- # PKCS #1 RSAPrivateKey format is required.
7574
+ # <strong>This method is kept for compatibility.</strong> This should only be
7575
+ # used when the PKCS #1 RSAPrivateKey format is required.
7564
7576
  #
7565
7577
  # Consider using #public_to_pem (X.509 SubjectPublicKeyInfo) or #private_to_pem
7566
7578
  # (PKCS #8 PrivateKeyInfo or EncryptedPrivateKeyInfo) instead.
@@ -7599,8 +7611,8 @@ module OpenSSL
7599
7611
  #
7600
7612
  # *salt_length*
7601
7613
  # : The length in octets of the salt. Two special values are reserved:
7602
- # `:digest` means the digest length, and `:auto` means automatically
7603
- # determining the length based on the signature.
7614
+ # <code>:digest</code> means the digest length, and <code>:auto</code> means
7615
+ # automatically determining the length based on the signature.
7604
7616
  #
7605
7617
  # *mgf1_hash*
7606
7618
  # : The hash algorithm used in MGF1.
@@ -8334,8 +8346,8 @@ module OpenSSL
8334
8346
  # - ctx.options = integer
8335
8347
  # -->
8336
8348
  # Sets various OpenSSL options. The options are a bit field and can be combined
8337
- # with the bitwise OR operator (`|`). Available options are defined as constants
8338
- # in OpenSSL::SSL that begin with `OP_`.
8349
+ # with the bitwise OR operator (<code>|</code>). Available options are defined
8350
+ # as constants in OpenSSL::SSL that begin with `OP_`.
8339
8351
  #
8340
8352
  # For backwards compatibility, passing `nil` has the same effect as passing
8341
8353
  # OpenSSL::SSL::OP_ALL.
@@ -8670,7 +8682,7 @@ module OpenSSL
8670
8682
  # The callback must return an OpenSSL::PKey::DH instance of the correct key
8671
8683
  # length.
8672
8684
  #
8673
- # **Deprecated in version 3.0.** Use #tmp_dh= instead.
8685
+ # <strong>Deprecated in version 3.0.</strong> Use #tmp_dh= instead.
8674
8686
  #
8675
8687
  def tmp_dh_callback: () -> (^(Session, Integer, Integer) -> PKey::DH | nil)
8676
8688
 
@@ -8684,7 +8696,7 @@ module OpenSSL
8684
8696
  # The callback must return an OpenSSL::PKey::DH instance of the correct key
8685
8697
  # length.
8686
8698
  #
8687
- # **Deprecated in version 3.0.** Use #tmp_dh= instead.
8699
+ # <strong>Deprecated in version 3.0.</strong> Use #tmp_dh= instead.
8688
8700
  #
8689
8701
  def tmp_dh_callback=: (^(Session, Integer, Integer) -> PKey::DH) -> void
8690
8702
 
@@ -8945,8 +8957,8 @@ module OpenSSL
8945
8957
  # rdoc-file=ext/openssl/lib/openssl/ssl.rb
8946
8958
  # - open(remote_host, remote_port, local_host=nil, local_port=nil, context: nil)
8947
8959
  # -->
8948
- # Creates a new instance of SSLSocket. *remote*host_ and *remote*port_ are used
8949
- # to open TCPSocket. If *local*host_ and *local*port_ are specified, then those
8960
+ # Creates a new instance of SSLSocket. _remote_host_ and _remote_port_ are used
8961
+ # to open TCPSocket. If _local_host_ and _local_port_ are specified, then those
8950
8962
  # parameters are used on the local end to establish the connection. If *context*
8951
8963
  # is provided, the SSL Sockets initial params will be taken from the context.
8952
8964
  #
@@ -8990,7 +9002,8 @@ module OpenSSL
8990
9002
  #
8991
9003
  # By specifying a keyword argument *exception* to `false`, you can indicate that
8992
9004
  # accept_nonblock should not raise an IO::WaitReadable or IO::WaitWritable
8993
- # exception, but return the symbol `:wait_readable` or `:wait_writable` instead.
9005
+ # exception, but return the symbol <code>:wait_readable</code> or
9006
+ # <code>:wait_writable</code> instead.
8994
9007
  #
8995
9008
  def accept_nonblock: (?exception: true) -> self
8996
9009
  | (exception: false) -> (self | :wait_readable | :wait_writable)
@@ -9061,7 +9074,8 @@ module OpenSSL
9061
9074
  #
9062
9075
  # By specifying a keyword argument *exception* to `false`, you can indicate that
9063
9076
  # connect_nonblock should not raise an IO::WaitReadable or IO::WaitWritable
9064
- # exception, but return the symbol `:wait_readable` or `:wait_writable` instead.
9077
+ # exception, but return the symbol <code>:wait_readable</code> or
9078
+ # <code>:wait_writable</code> instead.
9065
9079
  #
9066
9080
  def connect_nonblock: (?exception: true) -> self
9067
9081
  | (exception: false) -> (self | :wait_readable | :wait_writable)
@@ -9577,9 +9591,10 @@ module OpenSSL
9577
9591
  # Assume we received a timestamp request that has set Request#policy_id to `nil`
9578
9592
  # and Request#cert_requested? to true. The raw request bytes are stored in a
9579
9593
  # variable called `req_raw`. We'd still like to integrate the necessary
9580
- # intermediate certificates (in `inter1.cer` and `inter2.cer`) to simplify
9581
- # validation of the resulting Response. `ts.p12` is a PKCS#12-compatible file
9582
- # including the private key and the timestamping certificate.
9594
+ # intermediate certificates (in <code>inter1.cer</code> and
9595
+ # <code>inter2.cer</code>) to simplify validation of the resulting Response.
9596
+ # <code>ts.p12</code> is a PKCS#12-compatible file including the private key and
9597
+ # the timestamping certificate.
9583
9598
  #
9584
9599
  # req = OpenSSL::Timestamp::Request.new(raw_bytes)
9585
9600
  # p12 = OpenSSL::PKCS12.new(File.binread('ts.p12'), 'pwd')
@@ -11295,11 +11310,11 @@ module OpenSSL
11295
11310
  # Parses the string representation of a distinguished name. Two different forms
11296
11311
  # are supported:
11297
11312
  #
11298
- # * OpenSSL format (`X509_NAME_oneline()`) used by `#to_s`. For example:
11299
- # `/DC=com/DC=example/CN=nobody`
11300
- # * OpenSSL format (`X509_NAME_print()`) used by
11301
- # `#to_s(OpenSSL::X509::Name::COMPAT)`. For example: `DC=com, DC=example,
11302
- # CN=nobody`
11313
+ # * OpenSSL format (<code>X509_NAME_oneline()</code>) used by
11314
+ # <code>#to_s</code>. For example: <code>/DC=com/DC=example/CN=nobody</code>
11315
+ # * OpenSSL format (<code>X509_NAME_print()</code>) used by
11316
+ # <code>#to_s(OpenSSL::X509::Name::COMPAT)</code>. For example:
11317
+ # <code>DC=com, DC=example, CN=nobody</code>
11303
11318
  #
11304
11319
  # Neither of them is standardized and has quirks and inconsistencies in handling
11305
11320
  # of escaped characters or multi-valued RDNs.
@@ -11321,9 +11336,9 @@ module OpenSSL
11321
11336
  def self.parse_rfc2253: (String str, ?template template) -> instance
11322
11337
 
11323
11338
  # <!-- rdoc-file=ext/openssl/ossl_x509name.c -->
11324
- # Compares this Name with *other* and returns `0` if they are the same and `-1`
11325
- # or `+1` if they are greater or less than each other respectively. Returns
11326
- # `nil` if they are not comparable (i.e. different types).
11339
+ # Compares this Name with *other* and returns `0` if they are the same and
11340
+ # <code>-1</code> or ++1+ if they are greater or less than each other
11341
+ # respectively. Returns `nil` if they are not comparable (i.e. different types).
11327
11342
  #
11328
11343
  alias <=> cmp
11329
11344
 
@@ -11365,9 +11380,9 @@ module OpenSSL
11365
11380
  # - name.cmp(other) -> -1 | 0 | 1 | nil
11366
11381
  # - name <=> other -> -1 | 0 | 1 | nil
11367
11382
  # -->
11368
- # Compares this Name with *other* and returns `0` if they are the same and `-1`
11369
- # or `+1` if they are greater or less than each other respectively. Returns
11370
- # `nil` if they are not comparable (i.e. different types).
11383
+ # Compares this Name with *other* and returns `0` if they are the same and
11384
+ # <code>-1</code> or ++1+ if they are greater or less than each other
11385
+ # respectively. Returns `nil` if they are not comparable (i.e. different types).
11371
11386
  #
11372
11387
  def cmp: (untyped other) -> Integer?
11373
11388
 
@@ -11435,14 +11450,14 @@ module OpenSSL
11435
11450
  # * OpenSSL::X509::Name::MULTILINE
11436
11451
  #
11437
11452
  # If *format* is omitted, the largely broken and traditional OpenSSL format
11438
- # (`X509_NAME_oneline()` format) is chosen.
11453
+ # (<code>X509_NAME_oneline()</code> format) is chosen.
11439
11454
  #
11440
- # **Use of this method is discouraged.** None of the formats other than
11441
- # OpenSSL::X509::Name::RFC2253 is standardized and may show an inconsistent
11455
+ # <strong>Use of this method is discouraged.</strong> None of the formats other
11456
+ # than OpenSSL::X509::Name::RFC2253 is standardized and may show an inconsistent
11442
11457
  # behavior through OpenSSL versions.
11443
11458
  #
11444
11459
  # It is recommended to use #to_utf8 instead, which is equivalent to calling
11445
- # `name.to_s(OpenSSL::X509::Name::RFC2253).force_encoding("UTF-8")`.
11460
+ # <code>name.to_s(OpenSSL::X509::Name::RFC2253).force_encoding("UTF-8")</code>.
11446
11461
  #
11447
11462
  def to_s: (?format format) -> String
11448
11463