@ai-ecoverse/wasix-ruby 3.4.11-2 → 3.4.11-4

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 (722) hide show
  1. package/PRESTAGE.md +31 -15
  2. package/bin/bundle +1 -1
  3. package/bin/bundler +1 -1
  4. package/bin/erb +1 -1
  5. package/bin/gem +1 -1
  6. package/bin/irb +1 -1
  7. package/bin/rake +1 -1
  8. package/bin/ruby +1 -0
  9. package/bin/ruby.wasm +0 -0
  10. package/lib/ruby/3.4.0/socket.rb +1790 -0
  11. package/lib/ruby/3.4.0/wasm32-wasi/rbconfig.rb +5 -5
  12. package/lib/ruby/gems/3.4.0/cache/abbrev-0.1.2.gem +0 -0
  13. package/lib/ruby/gems/3.4.0/cache/base64-0.2.0.gem +0 -0
  14. package/lib/ruby/gems/3.4.0/cache/csv-3.3.2.gem +0 -0
  15. package/lib/ruby/gems/3.4.0/cache/drb-2.2.1.gem +0 -0
  16. package/lib/ruby/gems/3.4.0/cache/getoptlong-0.2.1.gem +0 -0
  17. package/lib/ruby/gems/3.4.0/cache/matrix-0.4.2.gem +0 -0
  18. package/lib/ruby/gems/3.4.0/cache/minitest-5.25.4.gem +0 -0
  19. package/lib/ruby/gems/3.4.0/cache/mutex_m-0.3.0.gem +0 -0
  20. package/lib/ruby/gems/3.4.0/cache/net-ftp-0.3.8.gem +0 -0
  21. package/lib/ruby/gems/3.4.0/cache/net-imap-0.5.15.gem +0 -0
  22. package/lib/ruby/gems/3.4.0/cache/net-pop-0.1.2.gem +0 -0
  23. package/lib/ruby/gems/3.4.0/cache/net-smtp-0.5.1.gem +0 -0
  24. package/lib/ruby/gems/3.4.0/cache/observer-0.1.2.gem +0 -0
  25. package/lib/ruby/gems/3.4.0/cache/power_assert-2.0.5.gem +0 -0
  26. package/lib/ruby/gems/3.4.0/cache/prime-0.1.3.gem +0 -0
  27. package/lib/ruby/gems/3.4.0/cache/rake-13.2.1.gem +0 -0
  28. package/lib/ruby/gems/3.4.0/cache/repl_type_completor-0.1.9.gem +0 -0
  29. package/lib/ruby/gems/3.4.0/cache/resolv-replace-0.1.1.gem +0 -0
  30. package/lib/ruby/gems/3.4.0/cache/rexml-3.4.4.gem +0 -0
  31. package/lib/ruby/gems/3.4.0/cache/rinda-0.2.0.gem +0 -0
  32. package/lib/ruby/gems/3.4.0/cache/rss-0.3.1.gem +0 -0
  33. package/lib/ruby/gems/3.4.0/cache/test-unit-3.6.7.gem +0 -0
  34. package/lib/ruby/gems/3.4.0/cache/typeprof-0.30.1.gem +0 -0
  35. package/lib/ruby/gems/3.4.0/gems/abbrev-0.1.2/bin/console +0 -0
  36. package/lib/ruby/gems/3.4.0/gems/abbrev-0.1.2/bin/setup +0 -0
  37. package/lib/ruby/gems/3.4.0/gems/bundler-2.6.9/exe/bundle +29 -0
  38. package/lib/ruby/gems/3.4.0/gems/bundler-2.6.9/exe/bundler +4 -0
  39. package/lib/ruby/gems/3.4.0/gems/erb-4.0.4.1/libexec/erb +164 -0
  40. package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/bin/console +0 -0
  41. package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/bin/setup +0 -0
  42. package/lib/ruby/gems/3.4.0/gems/irb-1.14.3/exe/irb +9 -0
  43. package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/bin/console +0 -0
  44. package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/bin/setup +0 -0
  45. package/lib/ruby/gems/3.4.0/gems/rdoc-6.14.0/exe/rdoc +43 -0
  46. package/lib/ruby/gems/3.4.0/gems/rdoc-6.14.0/exe/ri +12 -0
  47. package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/bin/console +0 -0
  48. package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/bin/setup +0 -0
  49. package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/bin/console +0 -0
  50. package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/bin/setup +0 -0
  51. package/lib/ruby/gems/3.4.0/gems/syntax_suggest-2.0.3/exe/syntax_suggest +7 -0
  52. package/lib/ruby/gems/3.4.0/specifications/abbrev-0.1.2.gemspec +5 -4
  53. package/lib/ruby/gems/3.4.0/specifications/base64-0.2.0.gemspec +4 -3
  54. package/lib/ruby/gems/3.4.0/specifications/csv-3.3.2.gemspec +5 -3
  55. package/lib/ruby/gems/3.4.0/specifications/default/benchmark-0.4.0.gemspec +22 -0
  56. package/lib/ruby/gems/3.4.0/specifications/default/bundler-2.6.9.gemspec +23 -0
  57. package/lib/ruby/gems/3.4.0/specifications/default/cgi-0.4.2.gemspec +23 -0
  58. package/lib/ruby/gems/3.4.0/specifications/default/date-3.4.1.gemspec +23 -0
  59. package/lib/ruby/gems/3.4.0/specifications/default/delegate-0.4.0.gemspec +21 -0
  60. package/lib/ruby/gems/3.4.0/specifications/default/did_you_mean-2.0.0.gemspec +20 -0
  61. package/lib/ruby/gems/3.4.0/specifications/default/digest-3.2.0.gemspec +22 -0
  62. package/lib/ruby/gems/3.4.0/specifications/default/english-0.8.0.gemspec +21 -0
  63. package/lib/ruby/gems/3.4.0/specifications/default/erb-4.0.4.1.gemspec +29 -0
  64. package/lib/ruby/gems/3.4.0/specifications/default/error_highlight-0.7.0.gemspec +20 -0
  65. package/lib/ruby/gems/3.4.0/specifications/default/etc-1.4.6.gemspec +25 -0
  66. package/lib/ruby/gems/3.4.0/specifications/default/fcntl-1.2.0.gemspec +24 -0
  67. package/lib/ruby/gems/3.4.0/specifications/default/fileutils-1.7.3.gemspec +21 -0
  68. package/lib/ruby/gems/3.4.0/specifications/default/find-0.2.0.gemspec +21 -0
  69. package/lib/ruby/gems/3.4.0/specifications/default/forwardable-1.3.3.gemspec +21 -0
  70. package/lib/ruby/gems/3.4.0/specifications/default/io-console-0.8.1.gemspec +23 -0
  71. package/lib/ruby/gems/3.4.0/specifications/default/io-nonblock-0.3.2.gemspec +23 -0
  72. package/lib/ruby/gems/3.4.0/specifications/default/io-wait-0.3.2.gemspec +24 -0
  73. package/lib/ruby/gems/3.4.0/specifications/default/ipaddr-1.2.7.gemspec +20 -0
  74. package/lib/ruby/gems/3.4.0/specifications/default/irb-1.14.3.gemspec +28 -0
  75. package/lib/ruby/gems/3.4.0/specifications/default/json-2.9.1.gemspec +23 -0
  76. package/lib/ruby/gems/3.4.0/specifications/default/logger-1.6.4.gemspec +20 -0
  77. package/lib/ruby/gems/3.4.0/specifications/default/net-http-0.6.0.gemspec +26 -0
  78. package/lib/ruby/gems/3.4.0/specifications/default/net-protocol-0.2.2.gemspec +25 -0
  79. package/lib/ruby/gems/3.4.0/specifications/default/open-uri-0.5.0.gemspec +27 -0
  80. package/lib/ruby/gems/3.4.0/specifications/default/open3-0.2.1.gemspec +22 -0
  81. package/lib/ruby/gems/3.4.0/specifications/default/openssl-3.3.3.gemspec +24 -0
  82. package/lib/ruby/gems/3.4.0/specifications/default/optparse-0.6.0.gemspec +23 -0
  83. package/lib/ruby/gems/3.4.0/specifications/default/ostruct-0.6.1.gemspec +20 -0
  84. package/lib/ruby/gems/3.4.0/specifications/default/pathname-0.4.0.gemspec +24 -0
  85. package/lib/ruby/gems/3.4.0/specifications/default/pp-0.6.2.gemspec +26 -0
  86. package/lib/ruby/gems/3.4.0/specifications/default/prettyprint-0.2.0.gemspec +22 -0
  87. package/lib/ruby/gems/3.4.0/specifications/default/prism-1.5.3.gemspec +22 -0
  88. package/lib/ruby/gems/3.4.0/specifications/default/pstore-0.2.1.gemspec +21 -0
  89. package/lib/ruby/gems/3.4.0/specifications/default/psych-5.2.2.gemspec +30 -0
  90. package/lib/ruby/gems/3.4.0/specifications/default/rdoc-6.14.0.gemspec +30 -0
  91. package/lib/ruby/gems/3.4.0/specifications/default/readline-0.0.4.gemspec +23 -0
  92. package/lib/ruby/gems/3.4.0/specifications/default/reline-0.6.0.gemspec +25 -0
  93. package/lib/ruby/gems/3.4.0/specifications/default/resolv-0.7.2.gemspec +24 -0
  94. package/lib/ruby/gems/3.4.0/specifications/default/ruby2_keywords-0.0.5.gemspec +20 -0
  95. package/lib/ruby/gems/3.4.0/specifications/default/securerandom-0.4.1.gemspec +22 -0
  96. package/lib/ruby/gems/3.4.0/specifications/default/set-1.1.1.gemspec +21 -0
  97. package/lib/ruby/gems/3.4.0/specifications/default/shellwords-0.2.2.gemspec +22 -0
  98. package/lib/ruby/gems/3.4.0/specifications/default/singleton-0.3.0.gemspec +21 -0
  99. package/lib/ruby/gems/3.4.0/specifications/default/stringio-3.1.2.gemspec +23 -0
  100. package/lib/ruby/gems/3.4.0/specifications/default/strscan-3.1.2.gemspec +24 -0
  101. package/lib/ruby/gems/3.4.0/specifications/default/syntax_suggest-2.0.3.gemspec +23 -0
  102. package/lib/ruby/gems/3.4.0/specifications/default/tempfile-0.3.1.gemspec +21 -0
  103. package/lib/ruby/gems/3.4.0/specifications/default/time-0.4.1.gemspec +26 -0
  104. package/lib/ruby/gems/3.4.0/specifications/default/timeout-0.4.3.gemspec +21 -0
  105. package/lib/ruby/gems/3.4.0/specifications/default/tmpdir-0.3.1.gemspec +26 -0
  106. package/lib/ruby/gems/3.4.0/specifications/default/tsort-0.2.0.gemspec +22 -0
  107. package/lib/ruby/gems/3.4.0/specifications/default/un-0.3.0.gemspec +22 -0
  108. package/lib/ruby/gems/3.4.0/specifications/default/uri-1.0.4.gemspec +22 -0
  109. package/lib/ruby/gems/3.4.0/specifications/default/weakref-0.1.3.gemspec +25 -0
  110. package/lib/ruby/gems/3.4.0/specifications/default/yaml-0.4.0.gemspec +21 -0
  111. package/lib/ruby/gems/3.4.0/specifications/default/zlib-3.2.3.gemspec +23 -0
  112. package/lib/ruby/gems/3.4.0/specifications/drb-2.2.1.gemspec +5 -4
  113. package/lib/ruby/gems/3.4.0/specifications/getoptlong-0.2.1.gemspec +5 -4
  114. package/lib/ruby/gems/3.4.0/specifications/matrix-0.4.2.gemspec +5 -4
  115. package/lib/ruby/gems/3.4.0/specifications/minitest-5.25.4.gemspec +7 -5
  116. package/lib/ruby/gems/3.4.0/specifications/mutex_m-0.3.0.gemspec +4 -3
  117. package/lib/ruby/gems/3.4.0/specifications/net-ftp-0.3.8.gemspec +10 -4
  118. package/lib/ruby/gems/3.4.0/specifications/net-imap-0.5.15.gemspec +7 -5
  119. package/lib/ruby/gems/3.4.0/specifications/net-pop-0.1.2.gemspec +9 -4
  120. package/lib/ruby/gems/3.4.0/specifications/net-smtp-0.5.1.gemspec +9 -4
  121. package/lib/ruby/gems/3.4.0/specifications/observer-0.1.2.gemspec +5 -4
  122. package/lib/ruby/gems/3.4.0/specifications/power_assert-2.0.5.gemspec +6 -4
  123. package/lib/ruby/gems/3.4.0/specifications/prime-0.1.3.gemspec +10 -4
  124. package/lib/ruby/gems/3.4.0/specifications/rake-13.2.1.gemspec +6 -4
  125. package/lib/ruby/gems/3.4.0/specifications/repl_type_completor-0.1.9.gemspec +6 -5
  126. package/lib/ruby/gems/3.4.0/specifications/resolv-replace-0.1.1.gemspec +6 -5
  127. package/lib/ruby/gems/3.4.0/specifications/rexml-3.4.4.gemspec +5 -3
  128. package/lib/ruby/gems/3.4.0/specifications/rinda-0.2.0.gemspec +8 -5
  129. package/lib/ruby/gems/3.4.0/specifications/rss-0.3.1.gemspec +5 -4
  130. package/lib/ruby/gems/3.4.0/specifications/test-unit-3.6.7.gemspec +5 -4
  131. package/lib/ruby/gems/3.4.0/specifications/typeprof-0.30.1.gemspec +7 -5
  132. package/package.json +19 -13
  133. package/lib/ruby/gems/3.4.0/gems/abbrev-0.1.2/abbrev.gemspec +0 -29
  134. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/.bundled.bigdecimal-3.1.8.gemspec +0 -23
  135. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/LICENSE +0 -56
  136. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/bigdecimal-3.1.8.gemspec +0 -23
  137. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/bigdecimal.gemspec +0 -50
  138. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/lib/bigdecimal/jacobian.rb +0 -90
  139. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/lib/bigdecimal/ludcmp.rb +0 -89
  140. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/lib/bigdecimal/math.rb +0 -232
  141. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/lib/bigdecimal/newton.rb +0 -80
  142. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/lib/bigdecimal/util.rb +0 -185
  143. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/lib/bigdecimal.rb +0 -5
  144. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/sample/linear.rb +0 -74
  145. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/sample/nlsolve.rb +0 -40
  146. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/sample/pi.rb +0 -21
  147. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/.bundled.debug-1.11.0.gemspec +0 -25
  148. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/CONTRIBUTING.md +0 -573
  149. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/Gemfile +0 -10
  150. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/LICENSE.txt +0 -22
  151. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/README.md +0 -996
  152. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/Rakefile +0 -57
  153. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/TODO.md +0 -23
  154. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/debug-1.11.0.gemspec +0 -30
  155. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/debug.gemspec +0 -33
  156. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/exe/rdbg +0 -53
  157. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/abbrev_command.rb +0 -77
  158. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/breakpoint.rb +0 -556
  159. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/client.rb +0 -263
  160. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/color.rb +0 -123
  161. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/config.rb +0 -592
  162. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/console.rb +0 -224
  163. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/dap_custom/traceInspector.rb +0 -336
  164. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/frame_info.rb +0 -190
  165. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/irb_integration.rb +0 -37
  166. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/local.rb +0 -115
  167. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/open.rb +0 -13
  168. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/open_nonstop.rb +0 -15
  169. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/prelude.rb +0 -50
  170. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/server.rb +0 -534
  171. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/server_cdp.rb +0 -1348
  172. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/server_dap.rb +0 -1108
  173. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/session.rb +0 -2667
  174. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/source_repository.rb +0 -150
  175. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/start.rb +0 -5
  176. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/thread_client.rb +0 -1457
  177. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/tracer.rb +0 -241
  178. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/version.rb +0 -5
  179. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug.rb +0 -9
  180. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/misc/README.md.erb +0 -660
  181. package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/drb.gemspec +0 -41
  182. package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/getoptlong.gemspec +0 -30
  183. package/lib/ruby/gems/3.4.0/gems/matrix-0.4.2/matrix.gemspec +0 -26
  184. package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/.autotest +0 -34
  185. package/lib/ruby/gems/3.4.0/gems/net-ftp-0.3.8/net-ftp.gemspec +0 -34
  186. package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/net-imap.gemspec +0 -38
  187. package/lib/ruby/gems/3.4.0/gems/net-pop-0.1.2/net-pop.gemspec +0 -32
  188. package/lib/ruby/gems/3.4.0/gems/net-smtp-0.5.1/net-smtp.gemspec +0 -31
  189. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/.bundled.nkf-0.2.0.gemspec +0 -24
  190. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/Gemfile +0 -5
  191. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/LICENSE.txt +0 -22
  192. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/README.md +0 -38
  193. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/Rakefile +0 -24
  194. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/bin/console +0 -14
  195. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/bin/setup +0 -8
  196. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/lib/kconv.rb +0 -283
  197. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/lib/nkf.rb +0 -6
  198. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/nkf-0.2.0.gemspec +0 -24
  199. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/nkf.gemspec +0 -43
  200. package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/observer.gemspec +0 -32
  201. package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/power_assert.gemspec +0 -24
  202. package/lib/ruby/gems/3.4.0/gems/prime-0.1.3/prime.gemspec +0 -28
  203. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/.bundled.racc-1.8.1.gemspec +0 -26
  204. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/BSDL +0 -22
  205. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/COPYING +0 -56
  206. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/ChangeLog +0 -846
  207. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/README.ja.rdoc +0 -58
  208. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/README.rdoc +0 -60
  209. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/TODO +0 -5
  210. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/bin/racc +0 -320
  211. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/en/grammar.en.rdoc +0 -218
  212. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/en/grammar2.en.rdoc +0 -219
  213. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/ja/command.ja.html +0 -99
  214. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/ja/debug.ja.rdoc +0 -36
  215. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/ja/grammar.ja.rdoc +0 -348
  216. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/ja/index.ja.html +0 -10
  217. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/ja/parser.ja.rdoc +0 -125
  218. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/ja/usage.ja.html +0 -414
  219. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/compat.rb +0 -33
  220. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/debugflags.rb +0 -60
  221. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/exception.rb +0 -16
  222. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/grammar.rb +0 -1191
  223. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/grammarfileparser.rb +0 -667
  224. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/info.rb +0 -18
  225. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/iset.rb +0 -92
  226. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/logfilegenerator.rb +0 -212
  227. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/parser-text.rb +0 -644
  228. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/parser.rb +0 -630
  229. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/parserfilegenerator.rb +0 -473
  230. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/sourcetext.rb +0 -35
  231. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/state.rb +0 -976
  232. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/statetransitiontable.rb +0 -311
  233. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/static.rb +0 -5
  234. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc.rb +0 -6
  235. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/racc-1.8.1.gemspec +0 -26
  236. package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/rake.gemspec +0 -101
  237. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/.bundled.rbs-3.8.0.gemspec +0 -25
  238. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/.rubocop.yml +0 -53
  239. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/BSDL +0 -22
  240. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/CHANGELOG.md +0 -1854
  241. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/COPYING +0 -56
  242. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/README.md +0 -203
  243. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/Rakefile +0 -415
  244. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/Steepfile +0 -44
  245. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/config.yml +0 -311
  246. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/array.rbs +0 -4062
  247. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/basic_object.rbs +0 -375
  248. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/binding.rbs +0 -150
  249. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/builtin.rbs +0 -277
  250. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/class.rbs +0 -220
  251. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/comparable.rbs +0 -171
  252. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/complex.rbs +0 -786
  253. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/constants.rbs +0 -96
  254. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/data.rbs +0 -415
  255. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/dir.rbs +0 -981
  256. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/encoding.rbs +0 -1371
  257. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/enumerable.rbs +0 -2405
  258. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/enumerator/product.rbs +0 -92
  259. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/enumerator.rbs +0 -630
  260. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/env.rbs +0 -6
  261. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/errno.rbs +0 -673
  262. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/errors.rbs +0 -760
  263. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/exception.rbs +0 -376
  264. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/false_class.rbs +0 -82
  265. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/fiber.rbs +0 -550
  266. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/fiber_error.rbs +0 -11
  267. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/file.rbs +0 -2936
  268. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/file_test.rbs +0 -331
  269. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/float.rbs +0 -1151
  270. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/gc.rbs +0 -644
  271. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/global_variables.rbs +0 -184
  272. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/hash.rbs +0 -1861
  273. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/integer.rbs +0 -1413
  274. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/io/buffer.rbs +0 -984
  275. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/io/wait.rbs +0 -70
  276. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/io.rbs +0 -3402
  277. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/kernel.rbs +0 -3054
  278. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/marshal.rbs +0 -207
  279. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/match_data.rbs +0 -635
  280. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/math.rbs +0 -729
  281. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/method.rbs +0 -386
  282. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/module.rbs +0 -1704
  283. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/nil_class.rbs +0 -209
  284. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/numeric.rbs +0 -818
  285. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/object.rbs +0 -110
  286. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/object_space/weak_key_map.rbs +0 -166
  287. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/object_space.rbs +0 -190
  288. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/proc.rbs +0 -868
  289. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/process.rbs +0 -2296
  290. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/ractor.rbs +0 -1065
  291. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/random.rbs +0 -237
  292. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/range.rbs +0 -1107
  293. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rational.rbs +0 -531
  294. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rb_config.rbs +0 -88
  295. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rbs/unnamed/argf.rbs +0 -1229
  296. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rbs/unnamed/env_class.rbs +0 -1209
  297. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rbs/unnamed/random.rbs +0 -293
  298. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/refinement.rbs +0 -59
  299. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/regexp.rbs +0 -1928
  300. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/ruby_vm.rbs +0 -765
  301. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/basic_specification.rbs +0 -6
  302. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/config_file.rbs +0 -38
  303. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/dependency_installer.rbs +0 -6
  304. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/errors.rbs +0 -176
  305. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/installer.rbs +0 -15
  306. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/path_support.rbs +0 -6
  307. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/platform.rbs +0 -7
  308. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/request_set.rbs +0 -49
  309. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/requirement.rbs +0 -148
  310. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/rubygems.rbs +0 -1171
  311. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/source_list.rbs +0 -15
  312. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/specification.rbs +0 -23
  313. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/stream_ui.rbs +0 -5
  314. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/uninstaller.rbs +0 -10
  315. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/version.rbs +0 -294
  316. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/set.rbs +0 -621
  317. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/signal.rbs +0 -100
  318. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/string.rbs +0 -3583
  319. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/struct.rbs +0 -667
  320. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/symbol.rbs +0 -475
  321. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/thread.rbs +0 -1765
  322. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/thread_group.rbs +0 -79
  323. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/time.rbs +0 -1762
  324. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/trace_point.rbs +0 -477
  325. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/true_class.rbs +0 -98
  326. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/unbound_method.rbs +0 -329
  327. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/warning.rbs +0 -87
  328. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/CONTRIBUTING.md +0 -106
  329. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/architecture.md +0 -110
  330. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/collection.md +0 -192
  331. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/data_and_struct.md +0 -86
  332. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/gem.md +0 -57
  333. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/rbs_by_example.md +0 -309
  334. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/repo.md +0 -125
  335. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/sigs.md +0 -167
  336. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/stdlib.md +0 -147
  337. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/syntax.md +0 -905
  338. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/tools.md +0 -17
  339. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/exe/rbs +0 -7
  340. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/goodcheck.yml +0 -91
  341. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/include/rbs/constants.h +0 -82
  342. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/include/rbs/ruby_objs.h +0 -72
  343. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/include/rbs.h +0 -7
  344. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ancestor_graph.rb +0 -92
  345. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/annotate/annotations.rb +0 -199
  346. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/annotate/formatter.rb +0 -92
  347. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/annotate/rdoc_annotator.rb +0 -400
  348. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/annotate/rdoc_source.rb +0 -131
  349. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/annotate.rb +0 -8
  350. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ast/annotation.rb +0 -29
  351. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ast/comment.rb +0 -29
  352. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ast/declarations.rb +0 -467
  353. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ast/directives.rb +0 -39
  354. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ast/members.rb +0 -449
  355. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ast/type_param.rb +0 -225
  356. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ast/visitor.rb +0 -137
  357. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/buffer.rb +0 -67
  358. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/builtin_names.rb +0 -58
  359. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/cli/colored_io.rb +0 -48
  360. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/cli/diff.rb +0 -83
  361. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/cli/validate.rb +0 -356
  362. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/cli.rb +0 -1223
  363. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/cleaner.rb +0 -38
  364. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/config/lockfile.rb +0 -92
  365. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/config/lockfile_generator.rb +0 -223
  366. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/config.rb +0 -81
  367. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/installer.rb +0 -32
  368. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/sources/base.rb +0 -14
  369. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/sources/git.rb +0 -258
  370. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/sources/local.rb +0 -81
  371. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/sources/rubygems.rb +0 -48
  372. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/sources/stdlib.rb +0 -50
  373. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/sources.rb +0 -38
  374. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection.rb +0 -16
  375. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/constant.rb +0 -28
  376. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/definition.rb +0 -395
  377. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/definition_builder/ancestor_builder.rb +0 -620
  378. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/definition_builder/method_builder.rb +0 -254
  379. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/definition_builder.rb +0 -841
  380. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/diff.rb +0 -125
  381. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/environment/use_map.rb +0 -77
  382. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/environment.rb +0 -818
  383. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/environment_loader.rb +0 -173
  384. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/environment_walker.rb +0 -155
  385. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/errors.rb +0 -600
  386. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/factory.rb +0 -18
  387. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/file_finder.rb +0 -28
  388. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/location_aux.rb +0 -138
  389. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/locator.rb +0 -241
  390. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/method_type.rb +0 -141
  391. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/namespace.rb +0 -125
  392. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/parser/lex_result.rb +0 -15
  393. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/parser/token.rb +0 -23
  394. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/parser_aux.rb +0 -77
  395. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/helpers.rb +0 -140
  396. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/node_usage.rb +0 -99
  397. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/rb.rb +0 -840
  398. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/rbi.rb +0 -641
  399. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/runtime/helpers.rb +0 -59
  400. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/runtime/reflection.rb +0 -19
  401. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/runtime/value_object_generator.rb +0 -279
  402. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/runtime.rb +0 -667
  403. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/repository.rb +0 -127
  404. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/resolver/constant_resolver.rb +0 -219
  405. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/resolver/type_name_resolver.rb +0 -91
  406. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/sorter.rb +0 -198
  407. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/substitution.rb +0 -83
  408. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/subtractor.rb +0 -201
  409. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/errors.rb +0 -80
  410. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/guaranteed.rb +0 -30
  411. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/hook.rb +0 -212
  412. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/observer.rb +0 -19
  413. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/setup.rb +0 -84
  414. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/setup_helper.rb +0 -50
  415. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/tester.rb +0 -167
  416. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/type_check.rb +0 -433
  417. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test.rb +0 -112
  418. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/type_alias_dependency.rb +0 -100
  419. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/type_alias_regularity.rb +0 -126
  420. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/type_name.rb +0 -109
  421. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/types.rb +0 -1557
  422. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/unit_test/convertibles.rb +0 -176
  423. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/unit_test/spy.rb +0 -136
  424. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/unit_test/type_assertions.rb +0 -341
  425. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/unit_test/with_aliases.rb +0 -143
  426. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/unit_test.rb +0 -6
  427. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/validator.rb +0 -182
  428. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/variance_calculator.rb +0 -189
  429. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/vendorer.rb +0 -71
  430. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/version.rb +0 -5
  431. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/writer.rb +0 -419
  432. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs.rb +0 -93
  433. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rdoc/discover.rb +0 -20
  434. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rdoc_plugin/parser.rb +0 -163
  435. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/rbs-3.8.0.gemspec +0 -29
  436. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/rbs.gemspec +0 -49
  437. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/annotation.json +0 -14
  438. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/comment.json +0 -26
  439. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/decls.json +0 -326
  440. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/function.json +0 -87
  441. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/location.json +0 -56
  442. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/members.json +0 -266
  443. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/methodType.json +0 -50
  444. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/typeParam.json +0 -36
  445. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/types.json +0 -317
  446. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/ancestor_builder.rbs +0 -163
  447. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/ancestor_graph.rbs +0 -60
  448. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/annotate/annotations.rbs +0 -102
  449. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/annotate/formatter.rbs +0 -24
  450. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/annotate/rdoc_annotater.rbs +0 -82
  451. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/annotate/rdoc_source.rbs +0 -30
  452. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/annotation.rbs +0 -27
  453. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/buffer.rbs +0 -32
  454. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/builtin_names.rbs +0 -44
  455. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/cli/colored_io.rbs +0 -15
  456. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/cli/diff.rbs +0 -21
  457. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/cli/validate.rbs +0 -43
  458. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/cli.rbs +0 -87
  459. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/collection/cleaner.rbs +0 -13
  460. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/collection/config/lockfile.rbs +0 -74
  461. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/collection/config/lockfile_generator.rbs +0 -66
  462. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/collection/config.rbs +0 -46
  463. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/collection/installer.rbs +0 -17
  464. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/collection/sources.rbs +0 -214
  465. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/collection.rbs +0 -4
  466. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/comment.rbs +0 -26
  467. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/constant.rbs +0 -21
  468. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/declarations.rbs +0 -267
  469. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/definition.rbs +0 -173
  470. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/definition_builder.rbs +0 -165
  471. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/diff.rbs +0 -28
  472. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/directives.rbs +0 -61
  473. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/environment.rbs +0 -277
  474. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/environment_loader.rbs +0 -111
  475. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/environment_walker.rbs +0 -65
  476. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/errors.rbs +0 -383
  477. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/factory.rbs +0 -5
  478. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/file_finder.rbs +0 -28
  479. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/location.rbs +0 -110
  480. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/locator.rbs +0 -58
  481. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/manifest.yaml +0 -7
  482. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/members.rbs +0 -258
  483. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/method_builder.rbs +0 -84
  484. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/method_types.rbs +0 -58
  485. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/namespace.rbs +0 -146
  486. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/parser.rbs +0 -96
  487. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/prototype/helpers.rbs +0 -27
  488. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/prototype/node_usage.rbs +0 -20
  489. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/prototype/rb.rbs +0 -96
  490. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/prototype/rbi.rbs +0 -75
  491. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/prototype/runtime.rbs +0 -182
  492. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/rbs.rbs +0 -21
  493. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/rdoc/rbs.rbs +0 -67
  494. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/repository.rbs +0 -85
  495. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/resolver/constant_resolver.rbs +0 -92
  496. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/resolver/context.rbs +0 -34
  497. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/resolver/type_name_resolver.rbs +0 -35
  498. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/shims/bundler.rbs +0 -38
  499. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/shims/enumerable.rbs +0 -5
  500. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/shims/rubygems.rbs +0 -19
  501. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/sorter.rbs +0 -41
  502. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/substitution.rbs +0 -48
  503. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/subtractor.rbs +0 -37
  504. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/test/errors.rbs +0 -52
  505. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/test/guranteed.rbs +0 -9
  506. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/test/type_check.rbs +0 -19
  507. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/test.rbs +0 -82
  508. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/type_alias_dependency.rbs +0 -53
  509. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/type_alias_regularity.rbs +0 -98
  510. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/type_param.rbs +0 -110
  511. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/typename.rbs +0 -79
  512. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/types.rbs +0 -576
  513. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/unit_test/convertibles.rbs +0 -154
  514. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/unit_test/spy.rbs +0 -28
  515. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/unit_test/type_assertions.rbs +0 -194
  516. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/unit_test/with_aliases.rbs +0 -136
  517. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/use_map.rbs +0 -35
  518. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/util.rbs +0 -9
  519. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/validator.rbs +0 -59
  520. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/variance_calculator.rbs +0 -87
  521. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/vendorer.rbs +0 -51
  522. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/version.rbs +0 -3
  523. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/visitor.rbs +0 -47
  524. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/writer.rbs +0 -127
  525. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/src/constants.c +0 -153
  526. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/src/ruby_objs.c +0 -793
  527. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/abbrev/0/abbrev.rbs +0 -66
  528. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/abbrev/0/array.rbs +0 -26
  529. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/base64/0/base64.rbs +0 -355
  530. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/benchmark/0/benchmark.rbs +0 -452
  531. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/bigdecimal/0/big_decimal.rbs +0 -1629
  532. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/bigdecimal-math/0/big_math.rbs +0 -119
  533. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/bigdecimal-math/0/manifest.yaml +0 -2
  534. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/cgi/0/core.rbs +0 -1285
  535. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/cgi/0/manifest.yaml +0 -3
  536. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/coverage/0/coverage.rbs +0 -263
  537. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/csv/0/csv.rbs +0 -3776
  538. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/csv/0/manifest.yaml +0 -3
  539. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/date/0/date.rbs +0 -1585
  540. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/date/0/date_time.rbs +0 -616
  541. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/date/0/time.rbs +0 -26
  542. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/dbm/0/dbm.rbs +0 -421
  543. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/delegate/0/delegator.rbs +0 -184
  544. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/delegate/0/kernel.rbs +0 -47
  545. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/delegate/0/simple_delegator.rbs +0 -96
  546. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/did_you_mean/0/did_you_mean.rbs +0 -343
  547. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/digest/0/digest.rbs +0 -577
  548. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/erb/0/erb.rbs +0 -532
  549. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/etc/0/etc.rbs +0 -865
  550. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/fileutils/0/fileutils.rbs +0 -1734
  551. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/find/0/find.rbs +0 -49
  552. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/forwardable/0/forwardable.rbs +0 -268
  553. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/io-console/0/io-console.rbs +0 -414
  554. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/ipaddr/0/ipaddr.rbs +0 -428
  555. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/json/0/json.rbs +0 -1914
  556. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/kconv/0/kconv.rbs +0 -166
  557. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/logger/0/formatter.rbs +0 -45
  558. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/logger/0/log_device.rbs +0 -100
  559. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/logger/0/logger.rbs +0 -796
  560. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/logger/0/manifest.yaml +0 -2
  561. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/logger/0/period.rbs +0 -17
  562. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/logger/0/severity.rbs +0 -34
  563. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/kernel.rbs +0 -42
  564. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/abstract_reporter.rbs +0 -52
  565. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/assertion.rbs +0 -17
  566. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/assertions.rbs +0 -590
  567. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/backtrace_filter.rbs +0 -23
  568. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/bench_spec.rbs +0 -102
  569. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/benchmark.rbs +0 -259
  570. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/composite_reporter.rbs +0 -25
  571. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/compress.rbs +0 -13
  572. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/error_on_warning.rbs +0 -3
  573. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/expectation.rbs +0 -2
  574. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/expectations.rbs +0 -21
  575. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/guard.rbs +0 -64
  576. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/mock.rbs +0 -64
  577. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/parallel/executor.rbs +0 -46
  578. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/parallel/test/class_methods.rbs +0 -5
  579. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/parallel/test.rbs +0 -3
  580. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/parallel.rbs +0 -2
  581. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/pride_io.rbs +0 -62
  582. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/pride_lol.rbs +0 -19
  583. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/progress_reporter.rbs +0 -11
  584. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/reportable.rbs +0 -53
  585. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/reporter.rbs +0 -5
  586. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/result.rbs +0 -28
  587. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/runnable.rbs +0 -163
  588. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/skip.rbs +0 -6
  589. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs +0 -48
  590. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/spec/dsl.rbs +0 -129
  591. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/spec.rbs +0 -11
  592. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/statistics_reporter.rbs +0 -81
  593. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/summary_reporter.rbs +0 -18
  594. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/test/lifecycle_hooks.rbs +0 -92
  595. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/test.rbs +0 -69
  596. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/unexpected_error.rbs +0 -12
  597. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/unexpected_warning.rbs +0 -6
  598. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/unit/test_case.rbs +0 -3
  599. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/unit.rbs +0 -4
  600. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest.rbs +0 -115
  601. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/monitor/0/monitor.rbs +0 -354
  602. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/mutex_m/0/mutex_m.rbs +0 -104
  603. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/net-http/0/manifest.yaml +0 -3
  604. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/net-http/0/net-http.rbs +0 -5552
  605. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/net-protocol/0/manifest.yaml +0 -2
  606. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/net-protocol/0/net-protocol.rbs +0 -56
  607. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/net-smtp/0/manifest.yaml +0 -2
  608. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/net-smtp/0/net-smtp.rbs +0 -55
  609. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/nkf/0/nkf.rbs +0 -402
  610. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/objspace/0/objspace.rbs +0 -487
  611. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/observable/0/observable.rbs +0 -217
  612. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/open-uri/0/manifest.yaml +0 -4
  613. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/open-uri/0/open-uri.rbs +0 -393
  614. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/open3/0/open3.rbs +0 -147
  615. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/openssl/0/manifest.yaml +0 -3
  616. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/openssl/0/openssl.rbs +0 -12113
  617. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/optparse/0/optparse.rbs +0 -1725
  618. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/pathname/0/pathname.rbs +0 -1406
  619. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/pp/0/manifest.yaml +0 -2
  620. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/pp/0/pp.rbs +0 -300
  621. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/prettyprint/0/prettyprint.rbs +0 -383
  622. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/pstore/0/pstore.rbs +0 -603
  623. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/psych/0/core_ext.rbs +0 -12
  624. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/psych/0/dbm.rbs +0 -237
  625. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/psych/0/manifest.yaml +0 -3
  626. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/psych/0/psych.rbs +0 -402
  627. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/psych/0/store.rbs +0 -59
  628. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/pty/0/pty.rbs +0 -237
  629. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/code_object.rbs +0 -51
  630. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/comment.rbs +0 -59
  631. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/context.rbs +0 -153
  632. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/markup.rbs +0 -117
  633. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/parser.rbs +0 -56
  634. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/rdoc.rbs +0 -391
  635. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/ri.rbs +0 -17
  636. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/store.rbs +0 -48
  637. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/top_level.rbs +0 -97
  638. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/resolv/0/manifest.yaml +0 -3
  639. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/resolv/0/resolv.rbs +0 -1830
  640. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/ripper/0/ripper.rbs +0 -1648
  641. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/securerandom/0/securerandom.rbs +0 -62
  642. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/shellwords/0/shellwords.rbs +0 -229
  643. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/singleton/0/singleton.rbs +0 -131
  644. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/addrinfo.rbs +0 -666
  645. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/basic_socket.rbs +0 -590
  646. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/constants.rbs +0 -2295
  647. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/ip_socket.rbs +0 -92
  648. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/socket.rbs +0 -4157
  649. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/socket_error.rbs +0 -5
  650. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/tcp_server.rbs +0 -192
  651. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/tcp_socket.rbs +0 -79
  652. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/udp_socket.rbs +0 -133
  653. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/unix_server.rbs +0 -169
  654. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/unix_socket.rbs +0 -170
  655. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/stringio/0/stringio.rbs +0 -567
  656. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/strscan/0/string_scanner.rbs +0 -1627
  657. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/tempfile/0/tempfile.rbs +0 -479
  658. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/time/0/time.rbs +0 -432
  659. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/timeout/0/timeout.rbs +0 -81
  660. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/tmpdir/0/tmpdir.rbs +0 -69
  661. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/tsort/0/cyclic.rbs +0 -5
  662. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/tsort/0/interfaces.rbs +0 -20
  663. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/tsort/0/tsort.rbs +0 -409
  664. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/common.rbs +0 -582
  665. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/file.rbs +0 -118
  666. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/ftp.rbs +0 -13
  667. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/generic.rbs +0 -1108
  668. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/http.rbs +0 -104
  669. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/https.rbs +0 -14
  670. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/ldap.rbs +0 -230
  671. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/ldaps.rbs +0 -14
  672. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/mailto.rbs +0 -92
  673. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/rfc2396_parser.rbs +0 -189
  674. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/rfc3986_parser.rbs +0 -2
  675. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/ws.rbs +0 -13
  676. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/wss.rbs +0 -9
  677. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/yaml/0/manifest.yaml +0 -2
  678. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/yaml/0/yaml.rbs +0 -1
  679. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/buf_error.rbs +0 -10
  680. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/data_error.rbs +0 -10
  681. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/deflate.rbs +0 -210
  682. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/error.rbs +0 -20
  683. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/gzip_file/crc_error.rbs +0 -12
  684. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/gzip_file/error.rbs +0 -23
  685. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/gzip_file/length_error.rbs +0 -12
  686. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/gzip_file/no_footer.rbs +0 -11
  687. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/gzip_file.rbs +0 -156
  688. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/gzip_reader.rbs +0 -293
  689. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/gzip_writer.rbs +0 -166
  690. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/inflate.rbs +0 -180
  691. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/mem_error.rbs +0 -10
  692. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/need_dict.rbs +0 -13
  693. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/stream_end.rbs +0 -11
  694. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/stream_error.rbs +0 -11
  695. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/version_error.rbs +0 -11
  696. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/zlib.rbs +0 -449
  697. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/zstream.rbs +0 -200
  698. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/templates/include/rbs/constants.h.erb +0 -20
  699. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/templates/include/rbs/ruby_objs.h.erb +0 -10
  700. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/templates/src/constants.c.erb +0 -36
  701. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/templates/src/ruby_objs.c.erb +0 -27
  702. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/templates/template.rb +0 -122
  703. package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/resolv-replace.gemspec +0 -22
  704. package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/rinda.gemspec +0 -35
  705. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/.bundled.syslog-0.2.0.gemspec +0 -23
  706. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/Gemfile +0 -5
  707. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/LICENSE.txt +0 -22
  708. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/README.md +0 -41
  709. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/Rakefile +0 -20
  710. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/bin/console +0 -14
  711. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/bin/setup +0 -8
  712. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/lib/syslog/logger.rb +0 -209
  713. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/lib/syslog.rb +0 -10
  714. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/syslog-0.2.0.gemspec +0 -23
  715. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/syslog.gemspec +0 -26
  716. package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/typeprof.gemspec +0 -32
  717. package/lib/ruby/gems/3.4.0/specifications/bigdecimal-3.1.8.gemspec +0 -50
  718. package/lib/ruby/gems/3.4.0/specifications/debug-1.11.0.gemspec +0 -33
  719. package/lib/ruby/gems/3.4.0/specifications/nkf-0.2.0.gemspec +0 -43
  720. package/lib/ruby/gems/3.4.0/specifications/racc-1.8.1.gemspec +0 -26
  721. package/lib/ruby/gems/3.4.0/specifications/rbs-3.8.0.gemspec +0 -49
  722. package/lib/ruby/gems/3.4.0/specifications/syslog-0.2.0.gemspec +0 -26
@@ -1,1928 +0,0 @@
1
- # <!-- rdoc-file=re.c -->
2
- # A [regular expression](https://en.wikipedia.org/wiki/Regular_expression) (also
3
- # called a *regexp*) is a *match pattern* (also simply called a *pattern*).
4
- #
5
- # A common notation for a regexp uses enclosing slash characters:
6
- #
7
- # /foo/
8
- #
9
- # A regexp may be applied to a *target string*; The part of the string (if any)
10
- # that matches the pattern is called a *match*, and may be said *to match*:
11
- #
12
- # re = /red/
13
- # re.match?('redirect') # => true # Match at beginning of target.
14
- # re.match?('bored') # => true # Match at end of target.
15
- # re.match?('credit') # => true # Match within target.
16
- # re.match?('foo') # => false # No match.
17
- #
18
- # ## Regexp Uses
19
- #
20
- # A regexp may be used:
21
- #
22
- # * To extract substrings based on a given pattern:
23
- #
24
- # re = /foo/ # => /foo/
25
- # re.match('food') # => #<MatchData "foo">
26
- # re.match('good') # => nil
27
- #
28
- # See sections [Method match](rdoc-ref:Regexp@Method+match) and [Operator
29
- # =~](rdoc-ref:Regexp@Operator+-3D~).
30
- #
31
- # * To determine whether a string matches a given pattern:
32
- #
33
- # re.match?('food') # => true
34
- # re.match?('good') # => false
35
- #
36
- # See section [Method match?](rdoc-ref:Regexp@Method+match-3F).
37
- #
38
- # * As an argument for calls to certain methods in other classes and modules;
39
- # most such methods accept an argument that may be either a string or the
40
- # (much more powerful) regexp.
41
- #
42
- # See [Regexp Methods](rdoc-ref:regexp/methods.rdoc).
43
- #
44
- # ## Regexp Objects
45
- #
46
- # A regexp object has:
47
- #
48
- # * A source; see [Sources](rdoc-ref:Regexp@Sources).
49
- #
50
- # * Several modes; see [Modes](rdoc-ref:Regexp@Modes).
51
- #
52
- # * A timeout; see [Timeouts](rdoc-ref:Regexp@Timeouts).
53
- #
54
- # * An encoding; see [Encodings](rdoc-ref:Regexp@Encodings).
55
- #
56
- # ## Creating a Regexp
57
- #
58
- # A regular expression may be created with:
59
- #
60
- # * A regexp literal using slash characters (see [Regexp
61
- # Literals](rdoc-ref:syntax/literals.rdoc@Regexp+Literals)):
62
- #
63
- # # This is a very common usage.
64
- # /foo/ # => /foo/
65
- #
66
- # * A `%r` regexp literal (see [%r: Regexp
67
- # Literals](rdoc-ref:syntax/literals.rdoc@25r-3A+Regexp+Literals)):
68
- #
69
- # # Same delimiter character at beginning and end;
70
- # # useful for avoiding escaping characters
71
- # %r/name\/value pair/ # => /name\/value pair/
72
- # %r:name/value pair: # => /name\/value pair/
73
- # %r|name/value pair| # => /name\/value pair/
74
- #
75
- # # Certain "paired" characters can be delimiters.
76
- # %r[foo] # => /foo/
77
- # %r{foo} # => /foo/
78
- # %r(foo) # => /foo/
79
- # %r<foo> # => /foo/
80
- #
81
- # * Method Regexp.new.
82
- #
83
- # ## Method `match`
84
- #
85
- # Each of the methods Regexp#match, String#match, and Symbol#match returns a
86
- # MatchData object if a match was found, `nil` otherwise; each also sets [global
87
- # variables](rdoc-ref:Regexp@Global+Variables):
88
- #
89
- # 'food'.match(/foo/) # => #<MatchData "foo">
90
- # 'food'.match(/bar/) # => nil
91
- #
92
- # ## Operator `=~`
93
- #
94
- # Each of the operators Regexp#=~, String#=~, and Symbol#=~ returns an integer
95
- # offset if a match was found, `nil` otherwise; each also sets [global
96
- # variables](rdoc-ref:Regexp@Global+Variables):
97
- #
98
- # /bar/ =~ 'foo bar' # => 4
99
- # 'foo bar' =~ /bar/ # => 4
100
- # /baz/ =~ 'foo bar' # => nil
101
- #
102
- # ## Method `match?`
103
- #
104
- # Each of the methods Regexp#match?, String#match?, and Symbol#match? returns
105
- # `true` if a match was found, `false` otherwise; none sets [global
106
- # variables](rdoc-ref:Regexp@Global+Variables):
107
- #
108
- # 'food'.match?(/foo/) # => true
109
- # 'food'.match?(/bar/) # => false
110
- #
111
- # ## Global Variables
112
- #
113
- # Certain regexp-oriented methods assign values to global variables:
114
- #
115
- # * `#match`: see [Method match](rdoc-ref:Regexp@Method+match).
116
- # * `#=~`: see [Operator =~](rdoc-ref:Regexp@Operator+-3D~).
117
- #
118
- # The affected global variables are:
119
- #
120
- # * `$~`: Returns a MatchData object, or `nil`.
121
- # * `$&`: Returns the matched part of the string, or `nil`.
122
- # * `$``: Returns the part of the string to the left of the match, or `nil`.
123
- # * `$'`: Returns the part of the string to the right of the match, or `nil`.
124
- # * `$+`: Returns the last group matched, or `nil`.
125
- # * `$1`, `$2`, etc.: Returns the first, second, etc., matched group, or
126
- # `nil`. Note that `$0` is quite different; it returns the name of the
127
- # currently executing program.
128
- #
129
- # Examples:
130
- #
131
- # # Matched string, but no matched groups.
132
- # 'foo bar bar baz'.match('bar')
133
- # $~ # => #<MatchData "bar">
134
- # $& # => "bar"
135
- # $` # => "foo "
136
- # $' # => " bar baz"
137
- # $+ # => nil
138
- # $1 # => nil
139
- #
140
- # # Matched groups.
141
- # /s(\w{2}).*(c)/.match('haystack')
142
- # $~ # => #<MatchData "stac" 1:"ta" 2:"c">
143
- # $& # => "stac"
144
- # $` # => "hay"
145
- # $' # => "k"
146
- # $+ # => "c"
147
- # $1 # => "ta"
148
- # $2 # => "c"
149
- # $3 # => nil
150
- #
151
- # # No match.
152
- # 'foo'.match('bar')
153
- # $~ # => nil
154
- # $& # => nil
155
- # $` # => nil
156
- # $' # => nil
157
- # $+ # => nil
158
- # $1 # => nil
159
- #
160
- # Note that Regexp#match?, String#match?, and Symbol#match? do not set global
161
- # variables.
162
- #
163
- # ## Sources
164
- #
165
- # As seen above, the simplest regexp uses a literal expression as its source:
166
- #
167
- # re = /foo/ # => /foo/
168
- # re.match('food') # => #<MatchData "foo">
169
- # re.match('good') # => nil
170
- #
171
- # A rich collection of available *subexpressions* gives the regexp great power
172
- # and flexibility:
173
- #
174
- # * [Special characters](rdoc-ref:Regexp@Special+Characters)
175
- # * [Source literals](rdoc-ref:Regexp@Source+Literals)
176
- # * [Character classes](rdoc-ref:Regexp@Character+Classes)
177
- # * [Shorthand character classes](rdoc-ref:Regexp@Shorthand+Character+Classes)
178
- # * [Anchors](rdoc-ref:Regexp@Anchors)
179
- # * [Alternation](rdoc-ref:Regexp@Alternation)
180
- # * [Quantifiers](rdoc-ref:Regexp@Quantifiers)
181
- # * [Groups and captures](rdoc-ref:Regexp@Groups+and+Captures)
182
- # * [Unicode](rdoc-ref:Regexp@Unicode)
183
- # * [POSIX Bracket Expressions](rdoc-ref:Regexp@POSIX+Bracket+Expressions)
184
- # * [Comments](rdoc-ref:Regexp@Comments)
185
- #
186
- # ### Special Characters
187
- #
188
- # Regexp special characters, called *metacharacters*, have special meanings in
189
- # certain contexts; depending on the context, these are sometimes
190
- # metacharacters:
191
- #
192
- # . ? - + * ^ \ | $ ( ) [ ] { }
193
- #
194
- # To match a metacharacter literally, backslash-escape it:
195
- #
196
- # # Matches one or more 'o' characters.
197
- # /o+/.match('foo') # => #<MatchData "oo">
198
- # # Would match 'o+'.
199
- # /o\+/.match('foo') # => nil
200
- #
201
- # To match a backslash literally, backslash-escape it:
202
- #
203
- # /\./.match('\.') # => #<MatchData ".">
204
- # /\\./.match('\.') # => #<MatchData "\\.">
205
- #
206
- # Method Regexp.escape returns an escaped string:
207
- #
208
- # Regexp.escape('.?-+*^\|$()[]{}')
209
- # # => "\\.\\?\\-\\+\\*\\^\\\\\\|\\$\\(\\)\\[\\]\\{\\}"
210
- #
211
- # ### Source Literals
212
- #
213
- # The source literal largely behaves like a double-quoted string; see
214
- # [Double-Quoted String
215
- # Literals](rdoc-ref:syntax/literals.rdoc@Double-Quoted+String+Literals).
216
- #
217
- # In particular, a source literal may contain interpolated expressions:
218
- #
219
- # s = 'foo' # => "foo"
220
- # /#{s}/ # => /foo/
221
- # /#{s.capitalize}/ # => /Foo/
222
- # /#{2 + 2}/ # => /4/
223
- #
224
- # There are differences between an ordinary string literal and a source literal;
225
- # see [Shorthand Character
226
- # Classes](rdoc-ref:Regexp@Shorthand+Character+Classes).
227
- #
228
- # * `\s` in an ordinary string literal is equivalent to a space character; in
229
- # a source literal, it's shorthand for matching a whitespace character.
230
- # * In an ordinary string literal, these are (needlessly) escaped characters;
231
- # in a source literal, they are shorthands for various matching characters:
232
- #
233
- # \w \W \d \D \h \H \S \R
234
- #
235
- # ### Character Classes
236
- #
237
- # A *character class* is delimited by square brackets; it specifies that certain
238
- # characters match at a given point in the target string:
239
- #
240
- # # This character class will match any vowel.
241
- # re = /B[aeiou]rd/
242
- # re.match('Bird') # => #<MatchData "Bird">
243
- # re.match('Bard') # => #<MatchData "Bard">
244
- # re.match('Byrd') # => nil
245
- #
246
- # A character class may contain hyphen characters to specify ranges of
247
- # characters:
248
- #
249
- # # These regexps have the same effect.
250
- # /[abcdef]/.match('foo') # => #<MatchData "f">
251
- # /[a-f]/.match('foo') # => #<MatchData "f">
252
- # /[a-cd-f]/.match('foo') # => #<MatchData "f">
253
- #
254
- # When the first character of a character class is a caret (`^`), the sense of
255
- # the class is inverted: it matches any character *except* those specified.
256
- #
257
- # /[^a-eg-z]/.match('f') # => #<MatchData "f">
258
- #
259
- # A character class may contain another character class. By itself this isn't
260
- # useful because `[a-z[0-9]]` describes the same set as `[a-z0-9]`.
261
- #
262
- # However, character classes also support the `&&` operator, which performs set
263
- # intersection on its arguments. The two can be combined as follows:
264
- #
265
- # /[a-w&&[^c-g]z]/ # ([a-w] AND ([^c-g] OR z))
266
- #
267
- # This is equivalent to:
268
- #
269
- # /[abh-w]/
270
- #
271
- # ### Shorthand Character Classes
272
- #
273
- # Each of the following metacharacters serves as a shorthand for a character
274
- # class:
275
- #
276
- # * `/./`: Matches any character except a newline:
277
- #
278
- # /./.match('foo') # => #<MatchData "f">
279
- # /./.match("\n") # => nil
280
- #
281
- # * `/./m`: Matches any character, including a newline; see [Multiline
282
- # Mode](rdoc-ref:Regexp@Multiline+Mode):
283
- #
284
- # /./m.match("\n") # => #<MatchData "\n">
285
- #
286
- # * `/\w/`: Matches a word character: equivalent to `[a-zA-Z0-9_]`:
287
- #
288
- # /\w/.match(' foo') # => #<MatchData "f">
289
- # /\w/.match(' _') # => #<MatchData "_">
290
- # /\w/.match(' ') # => nil
291
- #
292
- # * `/\W/`: Matches a non-word character: equivalent to `[^a-zA-Z0-9_]`:
293
- #
294
- # /\W/.match(' ') # => #<MatchData " ">
295
- # /\W/.match('_') # => nil
296
- #
297
- # * `/\d/`: Matches a digit character: equivalent to `[0-9]`:
298
- #
299
- # /\d/.match('THX1138') # => #<MatchData "1">
300
- # /\d/.match('foo') # => nil
301
- #
302
- # * `/\D/`: Matches a non-digit character: equivalent to `[^0-9]`:
303
- #
304
- # /\D/.match('123Jump!') # => #<MatchData "J">
305
- # /\D/.match('123') # => nil
306
- #
307
- # * `/\h/`: Matches a hexdigit character: equivalent to `[0-9a-fA-F]`:
308
- #
309
- # /\h/.match('xyz fedcba9876543210') # => #<MatchData "f">
310
- # /\h/.match('xyz') # => nil
311
- #
312
- # * `/\H/`: Matches a non-hexdigit character: equivalent to `[^0-9a-fA-F]`:
313
- #
314
- # /\H/.match('fedcba9876543210xyz') # => #<MatchData "x">
315
- # /\H/.match('fedcba9876543210') # => nil
316
- #
317
- # * `/\s/`: Matches a whitespace character: equivalent to `/[ \t\r\n\f\v]/`:
318
- #
319
- # /\s/.match('foo bar') # => #<MatchData " ">
320
- # /\s/.match('foo') # => nil
321
- #
322
- # * `/\S/`: Matches a non-whitespace character: equivalent to `/[^
323
- # \t\r\n\f\v]/`:
324
- #
325
- # /\S/.match(" \t\r\n\f\v foo") # => #<MatchData "f">
326
- # /\S/.match(" \t\r\n\f\v") # => nil
327
- #
328
- # * `/\R/`: Matches a linebreak, platform-independently:
329
- #
330
- # /\R/.match("\r") # => #<MatchData "\r"> # Carriage return (CR)
331
- # /\R/.match("\n") # => #<MatchData "\n"> # Newline (LF)
332
- # /\R/.match("\f") # => #<MatchData "\f"> # Formfeed (FF)
333
- # /\R/.match("\v") # => #<MatchData "\v"> # Vertical tab (VT)
334
- # /\R/.match("\r\n") # => #<MatchData "\r\n"> # CRLF
335
- # /\R/.match("\u0085") # => #<MatchData "\u0085"> # Next line (NEL)
336
- # /\R/.match("\u2028") # => #<MatchData "\u2028"> # Line separator (LSEP)
337
- # /\R/.match("\u2029") # => #<MatchData "\u2029"> # Paragraph separator (PSEP)
338
- #
339
- # ### Anchors
340
- #
341
- # An anchor is a metasequence that matches a zero-width position between
342
- # characters in the target string.
343
- #
344
- # For a subexpression with no anchor, matching may begin anywhere in the target
345
- # string:
346
- #
347
- # /real/.match('surrealist') # => #<MatchData "real">
348
- #
349
- # For a subexpression with an anchor, matching must begin at the matched anchor.
350
- #
351
- # #### Boundary Anchors
352
- #
353
- # Each of these anchors matches a boundary:
354
- #
355
- # * `^`: Matches the beginning of a line:
356
- #
357
- # /^bar/.match("foo\nbar") # => #<MatchData "bar">
358
- # /^ar/.match("foo\nbar") # => nil
359
- #
360
- # * `$`: Matches the end of a line:
361
- #
362
- # /bar$/.match("foo\nbar") # => #<MatchData "bar">
363
- # /ba$/.match("foo\nbar") # => nil
364
- #
365
- # * `\A`: Matches the beginning of the string:
366
- #
367
- # /\Afoo/.match('foo bar') # => #<MatchData "foo">
368
- # /\Afoo/.match(' foo bar') # => nil
369
- #
370
- # * `\Z`: Matches the end of the string; if string ends with a single newline,
371
- # it matches just before the ending newline:
372
- #
373
- # /foo\Z/.match('bar foo') # => #<MatchData "foo">
374
- # /foo\Z/.match('foo bar') # => nil
375
- # /foo\Z/.match("bar foo\n") # => #<MatchData "foo">
376
- # /foo\Z/.match("bar foo\n\n") # => nil
377
- #
378
- # * `\z`: Matches the end of the string:
379
- #
380
- # /foo\z/.match('bar foo') # => #<MatchData "foo">
381
- # /foo\z/.match('foo bar') # => nil
382
- # /foo\z/.match("bar foo\n") # => nil
383
- #
384
- # * `\b`: Matches word boundary when not inside brackets; matches backspace
385
- # (`"0x08"`) when inside brackets:
386
- #
387
- # /foo\b/.match('foo bar') # => #<MatchData "foo">
388
- # /foo\b/.match('foobar') # => nil
389
- #
390
- # * `\B`: Matches non-word boundary:
391
- #
392
- # /foo\B/.match('foobar') # => #<MatchData "foo">
393
- # /foo\B/.match('foo bar') # => nil
394
- #
395
- # * `\G`: Matches first matching position:
396
- #
397
- # In methods like String#gsub and String#scan, it changes on each iteration.
398
- # It initially matches the beginning of subject, and in each following
399
- # iteration it matches where the last match finished.
400
- #
401
- # " a b c".gsub(/ /, '_') # => "____a_b_c"
402
- # " a b c".gsub(/\G /, '_') # => "____a b c"
403
- #
404
- # In methods like Regexp#match and String#match that take an optional
405
- # offset, it matches where the search begins.
406
- #
407
- # "hello, world".match(/,/, 3) # => #<MatchData ",">
408
- # "hello, world".match(/\G,/, 3) # => nil
409
- #
410
- # #### Lookaround Anchors
411
- #
412
- # Lookahead anchors:
413
- #
414
- # * `(?=*pat*)`: Positive lookahead assertion: ensures that the following
415
- # characters match *pat*, but doesn't include those characters in the
416
- # matched substring.
417
- #
418
- # * `(?!*pat*)`: Negative lookahead assertion: ensures that the following
419
- # characters *do not* match *pat*, but doesn't include those characters in
420
- # the matched substring.
421
- #
422
- # Lookbehind anchors:
423
- #
424
- # * `(?<=*pat*)`: Positive lookbehind assertion: ensures that the preceding
425
- # characters match *pat*, but doesn't include those characters in the
426
- # matched substring.
427
- #
428
- # * `(?<!*pat*)`: Negative lookbehind assertion: ensures that the preceding
429
- # characters do not match *pat*, but doesn't include those characters in the
430
- # matched substring.
431
- #
432
- # The pattern below uses positive lookahead and positive lookbehind to match
433
- # text appearing in **...** tags without including the tags in the match:
434
- #
435
- # /(?<=<b>)\w+(?=<\/b>)/.match("Fortune favors the <b>bold</b>.")
436
- # # => #<MatchData "bold">
437
- #
438
- # #### Match-Reset Anchor
439
- #
440
- # * `\K`: Match reset: the matched content preceding `\K` in the regexp is
441
- # excluded from the result. For example, the following two regexps are
442
- # almost equivalent:
443
- #
444
- # /ab\Kc/.match('abc') # => #<MatchData "c">
445
- # /(?<=ab)c/.match('abc') # => #<MatchData "c">
446
- #
447
- # These match same string and `$&` equals `'c'`, while the matched position
448
- # is different.
449
- #
450
- # As are the following two regexps:
451
- #
452
- # /(a)\K(b)\Kc/
453
- # /(?<=(?<=(a))(b))c/
454
- #
455
- # ### Alternation
456
- #
457
- # The vertical bar metacharacter (`|`) may be used within parentheses to express
458
- # alternation: two or more subexpressions any of which may match the target
459
- # string.
460
- #
461
- # Two alternatives:
462
- #
463
- # re = /(a|b)/
464
- # re.match('foo') # => nil
465
- # re.match('bar') # => #<MatchData "b" 1:"b">
466
- #
467
- # Four alternatives:
468
- #
469
- # re = /(a|b|c|d)/
470
- # re.match('shazam') # => #<MatchData "a" 1:"a">
471
- # re.match('cold') # => #<MatchData "c" 1:"c">
472
- #
473
- # Each alternative is a subexpression, and may be composed of other
474
- # subexpressions:
475
- #
476
- # re = /([a-c]|[x-z])/
477
- # re.match('bar') # => #<MatchData "b" 1:"b">
478
- # re.match('ooz') # => #<MatchData "z" 1:"z">
479
- #
480
- # Method Regexp.union provides a convenient way to construct a regexp with
481
- # alternatives.
482
- #
483
- # ### Quantifiers
484
- #
485
- # A simple regexp matches one character:
486
- #
487
- # /\w/.match('Hello') # => #<MatchData "H">
488
- #
489
- # An added *quantifier* specifies how many matches are required or allowed:
490
- #
491
- # * `*` - Matches zero or more times:
492
- #
493
- # /\w*/.match('')
494
- # # => #<MatchData "">
495
- # /\w*/.match('x')
496
- # # => #<MatchData "x">
497
- # /\w*/.match('xyz')
498
- # # => #<MatchData "yz">
499
- #
500
- # * `+` - Matches one or more times:
501
- #
502
- # /\w+/.match('') # => nil
503
- # /\w+/.match('x') # => #<MatchData "x">
504
- # /\w+/.match('xyz') # => #<MatchData "xyz">
505
- #
506
- # * `?` - Matches zero or one times:
507
- #
508
- # /\w?/.match('') # => #<MatchData "">
509
- # /\w?/.match('x') # => #<MatchData "x">
510
- # /\w?/.match('xyz') # => #<MatchData "x">
511
- #
512
- # * `{`*n*`}` - Matches exactly *n* times:
513
- #
514
- # /\w{2}/.match('') # => nil
515
- # /\w{2}/.match('x') # => nil
516
- # /\w{2}/.match('xyz') # => #<MatchData "xy">
517
- #
518
- # * `{`*min*`,}` - Matches *min* or more times:
519
- #
520
- # /\w{2,}/.match('') # => nil
521
- # /\w{2,}/.match('x') # => nil
522
- # /\w{2,}/.match('xy') # => #<MatchData "xy">
523
- # /\w{2,}/.match('xyz') # => #<MatchData "xyz">
524
- #
525
- # * `{,`*max*`}` - Matches *max* or fewer times:
526
- #
527
- # /\w{,2}/.match('') # => #<MatchData "">
528
- # /\w{,2}/.match('x') # => #<MatchData "x">
529
- # /\w{,2}/.match('xyz') # => #<MatchData "xy">
530
- #
531
- # * `{`*min*`,`*max*`}` - Matches at least *min* times and at most *max*
532
- # times:
533
- #
534
- # /\w{1,2}/.match('') # => nil
535
- # /\w{1,2}/.match('x') # => #<MatchData "x">
536
- # /\w{1,2}/.match('xyz') # => #<MatchData "xy">
537
- #
538
- # #### Greedy, Lazy, or Possessive Matching
539
- #
540
- # Quantifier matching may be greedy, lazy, or possessive:
541
- #
542
- # * In *greedy* matching, as many occurrences as possible are matched while
543
- # still allowing the overall match to succeed. Greedy quantifiers: `*`, `+`,
544
- # `?`, `{min, max}` and its variants.
545
- # * In *lazy* matching, the minimum number of occurrences are matched. Lazy
546
- # quantifiers: `*?`, `+?`, `??`, `{min, max}?` and its variants.
547
- # * In *possessive* matching, once a match is found, there is no backtracking;
548
- # that match is retained, even if it jeopardises the overall match.
549
- # Possessive quantifiers: `*+`, `++`, `?+`. Note that `{min, max}` and its
550
- # variants do *not* support possessive matching.
551
- #
552
- # More:
553
- #
554
- # * About greedy and lazy matching, see [Choosing Minimal or Maximal
555
- # Repetition](https://doc.lagout.org/programmation/Regular%20Expressions/Reg
556
- # ular%20Expressions%20Cookbook_%20Detailed%20Solutions%20in%20Eight%20Progr
557
- # amming%20Languages%20%282nd%20ed.%29%20%5BGoyvaerts%20%26%20Levithan%20201
558
- # 2-09-06%5D.pdf#tutorial-backtrack).
559
- # * About possessive matching, see [Eliminate Needless
560
- # Backtracking](https://doc.lagout.org/programmation/Regular%20Expressions/R
561
- # egular%20Expressions%20Cookbook_%20Detailed%20Solutions%20in%20Eight%20Pro
562
- # gramming%20Languages%20%282nd%20ed.%29%20%5BGoyvaerts%20%26%20Levithan%202
563
- # 012-09-06%5D.pdf#tutorial-backtrack).
564
- #
565
- # ### Groups and Captures
566
- #
567
- # A simple regexp has (at most) one match:
568
- #
569
- # re = /\d\d\d\d-\d\d-\d\d/
570
- # re.match('1943-02-04') # => #<MatchData "1943-02-04">
571
- # re.match('1943-02-04').size # => 1
572
- # re.match('foo') # => nil
573
- #
574
- # Adding one or more pairs of parentheses, `(*subexpression*)`, defines
575
- # *groups*, which may result in multiple matched substrings, called *captures*:
576
- #
577
- # re = /(\d\d\d\d)-(\d\d)-(\d\d)/
578
- # re.match('1943-02-04') # => #<MatchData "1943-02-04" 1:"1943" 2:"02" 3:"04">
579
- # re.match('1943-02-04').size # => 4
580
- #
581
- # The first capture is the entire matched string; the other captures are the
582
- # matched substrings from the groups.
583
- #
584
- # A group may have a [quantifier](rdoc-ref:Regexp@Quantifiers):
585
- #
586
- # re = /July 4(th)?/
587
- # re.match('July 4') # => #<MatchData "July 4" 1:nil>
588
- # re.match('July 4th') # => #<MatchData "July 4th" 1:"th">
589
- #
590
- # re = /(foo)*/
591
- # re.match('') # => #<MatchData "" 1:nil>
592
- # re.match('foo') # => #<MatchData "foo" 1:"foo">
593
- # re.match('foofoo') # => #<MatchData "foofoo" 1:"foo">
594
- #
595
- # re = /(foo)+/
596
- # re.match('') # => nil
597
- # re.match('foo') # => #<MatchData "foo" 1:"foo">
598
- # re.match('foofoo') # => #<MatchData "foofoo" 1:"foo">
599
- #
600
- # The returned MatchData object gives access to the matched substrings:
601
- #
602
- # re = /(\d\d\d\d)-(\d\d)-(\d\d)/
603
- # md = re.match('1943-02-04')
604
- # # => #<MatchData "1943-02-04" 1:"1943" 2:"02" 3:"04">
605
- # md[0] # => "1943-02-04"
606
- # md[1] # => "1943"
607
- # md[2] # => "02"
608
- # md[3] # => "04"
609
- #
610
- # #### Non-Capturing Groups
611
- #
612
- # A group may be made non-capturing; it is still a group (and, for example, can
613
- # have a quantifier), but its matching substring is not included among the
614
- # captures.
615
- #
616
- # A non-capturing group begins with `?:` (inside the parentheses):
617
- #
618
- # # Don't capture the year.
619
- # re = /(?:\d\d\d\d)-(\d\d)-(\d\d)/
620
- # md = re.match('1943-02-04') # => #<MatchData "1943-02-04" 1:"02" 2:"04">
621
- #
622
- # #### Backreferences
623
- #
624
- # A group match may also be referenced within the regexp itself; such a
625
- # reference is called a `backreference`:
626
- #
627
- # /[csh](..) [csh]\1 in/.match('The cat sat in the hat')
628
- # # => #<MatchData "cat sat in" 1:"at">
629
- #
630
- # This table shows how each subexpression in the regexp above matches a
631
- # substring in the target string:
632
- #
633
- # | Subexpression in Regexp | Matching Substring in Target String |
634
- # |---------------------------|-------------------------------------|
635
- # | First '[csh]' | Character 'c' |
636
- # | '(..)' | First substring 'at' |
637
- # | First space ' ' | First space character ' ' |
638
- # | Second '[csh]' | Character 's' |
639
- # | '\1' (backreference 'at') | Second substring 'at' |
640
- # | ' in' | Substring ' in' |
641
- #
642
- # A regexp may contain any number of groups:
643
- #
644
- # * For a large number of groups:
645
- #
646
- # * The ordinary `\*n`* notation applies only for *n* in range (1..9).
647
- # * The `MatchData[*n*]` notation applies for any non-negative *n*.
648
- #
649
- # * `\0` is a special backreference, referring to the entire matched string;
650
- # it may not be used within the regexp itself, but may be used outside it
651
- # (for example, in a substitution method call):
652
- #
653
- # 'The cat sat in the hat'.gsub(/[csh]at/, '\0s')
654
- # # => "The cats sats in the hats"
655
- #
656
- # #### Named Captures
657
- #
658
- # As seen above, a capture can be referred to by its number. A capture can also
659
- # have a name, prefixed as `?<*name*>` or `?'*name*'`, and the name (symbolized)
660
- # may be used as an index in `MatchData[]`:
661
- #
662
- # md = /\$(?<dollars>\d+)\.(?'cents'\d+)/.match("$3.67")
663
- # # => #<MatchData "$3.67" dollars:"3" cents:"67">
664
- # md[:dollars] # => "3"
665
- # md[:cents] # => "67"
666
- # # The capture numbers are still valid.
667
- # md[2] # => "67"
668
- #
669
- # When a regexp contains a named capture, there are no unnamed captures:
670
- #
671
- # /\$(?<dollars>\d+)\.(\d+)/.match("$3.67")
672
- # # => #<MatchData "$3.67" dollars:"3">
673
- #
674
- # A named group may be backreferenced as `\k<*name*>`:
675
- #
676
- # /(?<vowel>[aeiou]).\k<vowel>.\k<vowel>/.match('ototomy')
677
- # # => #<MatchData "ototo" vowel:"o">
678
- #
679
- # When (and only when) a regexp contains named capture groups and appears before
680
- # the `=~` operator, the captured substrings are assigned to local variables
681
- # with corresponding names:
682
- #
683
- # /\$(?<dollars>\d+)\.(?<cents>\d+)/ =~ '$3.67'
684
- # dollars # => "3"
685
- # cents # => "67"
686
- #
687
- # Method Regexp#named_captures returns a hash of the capture names and
688
- # substrings; method Regexp#names returns an array of the capture names.
689
- #
690
- # #### Atomic Grouping
691
- #
692
- # A group may be made *atomic* with `(?>`*subexpression*`)`.
693
- #
694
- # This causes the subexpression to be matched independently of the rest of the
695
- # expression, so that the matched substring becomes fixed for the remainder of
696
- # the match, unless the entire subexpression must be abandoned and subsequently
697
- # revisited.
698
- #
699
- # In this way *subexpression* is treated as a non-divisible whole. Atomic
700
- # grouping is typically used to optimise patterns to prevent needless
701
- # backtracking .
702
- #
703
- # Example (without atomic grouping):
704
- #
705
- # /".*"/.match('"Quote"') # => #<MatchData "\"Quote\"">
706
- #
707
- # Analysis:
708
- #
709
- # 1. The leading subexpression `"` in the pattern matches the first character
710
- # `"` in the target string.
711
- # 2. The next subexpression `.*` matches the next substring `Quote“` (including
712
- # the trailing double-quote).
713
- # 3. Now there is nothing left in the target string to match the trailing
714
- # subexpression `"` in the pattern; this would cause the overall match to
715
- # fail.
716
- # 4. The matched substring is backtracked by one position: `Quote`.
717
- # 5. The final subexpression `"` now matches the final substring `"`, and the
718
- # overall match succeeds.
719
- #
720
- # If subexpression `.*` is grouped atomically, the backtracking is disabled, and
721
- # the overall match fails:
722
- #
723
- # /"(?>.*)"/.match('"Quote"') # => nil
724
- #
725
- # Atomic grouping can affect performance; see [Atomic
726
- # Group](https://www.regular-expressions.info/atomic.html).
727
- #
728
- # #### Subexpression Calls
729
- #
730
- # As seen above, a backreference number (`\*n`*) or name (`\k<*name*>`) gives
731
- # access to a captured *substring*; the corresponding regexp *subexpression* may
732
- # also be accessed, via the number (`\\g*n`*) or name (`\g<*name*>`):
733
- #
734
- # /\A(?<paren>\(\g<paren>*\))*\z/.match('(())')
735
- # # ^1
736
- # # ^2
737
- # # ^3
738
- # # ^4
739
- # # ^5
740
- # # ^6
741
- # # ^7
742
- # # ^8
743
- # # ^9
744
- # # ^10
745
- #
746
- # The pattern:
747
- #
748
- # 1. Matches at the beginning of the string, i.e. before the first character.
749
- # 2. Enters a named group `paren`.
750
- # 3. Matches the first character in the string, `'('`.
751
- # 4. Calls the `paren` group again, i.e. recurses back to the second step.
752
- # 5. Re-enters the `paren` group.
753
- # 6. Matches the second character in the string, `'('`.
754
- # 7. Attempts to call `paren` a third time, but fails because doing so would
755
- # prevent an overall successful match.
756
- # 8. Matches the third character in the string, `')'`; marks the end of the
757
- # second recursive call
758
- # 9. Matches the fourth character in the string, `')'`.
759
- # 10. Matches the end of the string.
760
- #
761
- # See [Subexpression
762
- # calls](https://learnbyexample.github.io/Ruby_Regexp/groupings-and-backreferenc
763
- # es.html?highlight=subexpression#subexpression-calls).
764
- #
765
- # #### Conditionals
766
- #
767
- # The conditional construct takes the form `(?(*cond*)*yes*|*no*)`, where:
768
- #
769
- # * *cond* may be a capture number or name.
770
- # * The match to be applied is *yes* if *cond* is captured; otherwise the
771
- # match to be applied is *no*.
772
- # * If not needed, `|*no`* may be omitted.
773
- #
774
- # Examples:
775
- #
776
- # re = /\A(foo)?(?(1)(T)|(F))\z/
777
- # re.match('fooT') # => #<MatchData "fooT" 1:"foo" 2:"T" 3:nil>
778
- # re.match('F') # => #<MatchData "F" 1:nil 2:nil 3:"F">
779
- # re.match('fooF') # => nil
780
- # re.match('T') # => nil
781
- #
782
- # re = /\A(?<xyzzy>foo)?(?(<xyzzy>)(T)|(F))\z/
783
- # re.match('fooT') # => #<MatchData "fooT" xyzzy:"foo">
784
- # re.match('F') # => #<MatchData "F" xyzzy:nil>
785
- # re.match('fooF') # => nil
786
- # re.match('T') # => nil
787
- #
788
- # #### Absence Operator
789
- #
790
- # The absence operator is a special group that matches anything which does *not*
791
- # match the contained subexpressions.
792
- #
793
- # /(?~real)/.match('surrealist') # => #<MatchData "surrea">
794
- # /(?~real)ist/.match('surrealist') # => #<MatchData "ealist">
795
- # /sur(?~real)ist/.match('surrealist') # => nil
796
- #
797
- # ### Unicode
798
- #
799
- # #### Unicode Properties
800
- #
801
- # The `/\p{*property_name*}/` construct (with lowercase `p`) matches characters
802
- # using a Unicode property name, much like a character class; property `Alpha`
803
- # specifies alphabetic characters:
804
- #
805
- # /\p{Alpha}/.match('a') # => #<MatchData "a">
806
- # /\p{Alpha}/.match('1') # => nil
807
- #
808
- # A property can be inverted by prefixing the name with a caret character (`^`):
809
- #
810
- # /\p{^Alpha}/.match('1') # => #<MatchData "1">
811
- # /\p{^Alpha}/.match('a') # => nil
812
- #
813
- # Or by using `\P` (uppercase `P`):
814
- #
815
- # /\P{Alpha}/.match('1') # => #<MatchData "1">
816
- # /\P{Alpha}/.match('a') # => nil
817
- #
818
- # See [Unicode Properties](rdoc-ref:regexp/unicode_properties.rdoc) for regexps
819
- # based on the numerous properties.
820
- #
821
- # Some commonly-used properties correspond to POSIX bracket expressions:
822
- #
823
- # * `/\p{Alnum}/`: Alphabetic and numeric character
824
- # * `/\p{Alpha}/`: Alphabetic character
825
- # * `/\p{Blank}/`: Space or tab
826
- # * `/\p{Cntrl}/`: Control character
827
- # * `/\p{Digit}/`: Digit characters, and similar)
828
- # * `/\p{Lower}/`: Lowercase alphabetical character
829
- # * `/\p{Print}/`: Like `\p{Graph}`, but includes the space character
830
- # * `/\p{Punct}/`: Punctuation character
831
- # * `/\p{Space}/`: Whitespace character (`[:blank:]`, newline, carriage
832
- # return, etc.)
833
- # * `/\p{Upper}/`: Uppercase alphabetical
834
- # * `/\p{XDigit}/`: Digit allowed in a hexadecimal number (i.e., 0-9a-fA-F)
835
- #
836
- # These are also commonly used:
837
- #
838
- # * `/\p{Emoji}/`: Unicode emoji.
839
- # * `/\p{Graph}/`: Non-blank character (excludes spaces, control characters,
840
- # and similar).
841
- # * `/\p{Word}/`: A member in one of these Unicode character categories (see
842
- # below) or having one of these Unicode properties:
843
- #
844
- # * Unicode categories:
845
- # * `Mark` (`M`).
846
- # * `Decimal Number` (`Nd`)
847
- # * `Connector Punctuation` (`Pc`).
848
- #
849
- # * Unicode properties:
850
- # * `Alpha`
851
- # * `Join_Control`
852
- #
853
- # * `/\p{ASCII}/`: A character in the ASCII character set.
854
- # * `/\p{Any}/`: Any Unicode character (including unassigned characters).
855
- # * `/\p{Assigned}/`: An assigned character.
856
- #
857
- # #### Unicode Character Categories
858
- #
859
- # A Unicode character category name:
860
- #
861
- # * May be either its full name or its abbreviated name.
862
- # * Is case-insensitive.
863
- # * Treats a space, a hyphen, and an underscore as equivalent.
864
- #
865
- # Examples:
866
- #
867
- # /\p{lu}/ # => /\p{lu}/
868
- # /\p{LU}/ # => /\p{LU}/
869
- # /\p{Uppercase Letter}/ # => /\p{Uppercase Letter}/
870
- # /\p{Uppercase_Letter}/ # => /\p{Uppercase_Letter}/
871
- # /\p{UPPERCASE-LETTER}/ # => /\p{UPPERCASE-LETTER}/
872
- #
873
- # Below are the Unicode character category abbreviations and names. Enumerations
874
- # of characters in each category are at the links.
875
- #
876
- # Letters:
877
- #
878
- # * `L`, `Letter`: `LC`, `Lm`, or `Lo`.
879
- # * `LC`, `Cased_Letter`: `Ll`, `Lt`, or `Lu`.
880
- # * [Lu, Lowercase_Letter](https://www.compart.com/en/unicode/category/Ll).
881
- # * [Lu, Modifier_Letter](https://www.compart.com/en/unicode/category/Lm).
882
- # * [Lu, Other_Letter](https://www.compart.com/en/unicode/category/Lo).
883
- # * [Lu, Titlecase_Letter](https://www.compart.com/en/unicode/category/Lt).
884
- # * [Lu, Uppercase_Letter](https://www.compart.com/en/unicode/category/Lu).
885
- #
886
- # Marks:
887
- #
888
- # * `M`, `Mark`: `Mc`, `Me`, or `Mn`.
889
- # * [Mc, Spacing_Mark](https://www.compart.com/en/unicode/category/Mc).
890
- # * [Me, Enclosing_Mark](https://www.compart.com/en/unicode/category/Me).
891
- # * [Mn, Nonapacing_Mark](https://www.compart.com/en/unicode/category/Mn).
892
- #
893
- # Numbers:
894
- #
895
- # * `N`, `Number`: `Nd`, `Nl`, or `No`.
896
- # * [Nd, Decimal_Number](https://www.compart.com/en/unicode/category/Nd).
897
- # * [Nl, Letter_Number](https://www.compart.com/en/unicode/category/Nl).
898
- # * [No, Other_Number](https://www.compart.com/en/unicode/category/No).
899
- #
900
- # Punctuation:
901
- #
902
- # * `P`, `Punctuation`: `Pc`, `Pd`, `Pe`, `Pf`, `Pi`, `Po`, or `Ps`.
903
- # * [Pc,
904
- # Connector_Punctuation](https://www.compart.com/en/unicode/category/Pc).
905
- # * [Pd, Dash_Punctuation](https://www.compart.com/en/unicode/category/Pd).
906
- # * [Pe, Close_Punctuation](https://www.compart.com/en/unicode/category/Pe).
907
- # * [Pf, Final_Punctuation](https://www.compart.com/en/unicode/category/Pf).
908
- # * [Pi, Initial_Punctuation](https://www.compart.com/en/unicode/category/Pi).
909
- # * [Po, Other_Punctuation](https://www.compart.com/en/unicode/category/Po).
910
- # * [Ps, Open_Punctuation](https://www.compart.com/en/unicode/category/Ps).
911
- #
912
- # * `S`, `Symbol`: `Sc`, `Sk`, `Sm`, or `So`.
913
- # * [Sc, Currency_Symbol](https://www.compart.com/en/unicode/category/Sc).
914
- # * [Sk, Modifier_Symbol](https://www.compart.com/en/unicode/category/Sk).
915
- # * [Sm, Math_Symbol](https://www.compart.com/en/unicode/category/Sm).
916
- # * [So, Other_Symbol](https://www.compart.com/en/unicode/category/So).
917
- #
918
- # * `Z`, `Separator`: `Zl`, `Zp`, or `Zs`.
919
- # * [Zl, Line_Separator](https://www.compart.com/en/unicode/category/Zl).
920
- # * [Zp, Paragraph_Separator](https://www.compart.com/en/unicode/category/Zp).
921
- # * [Zs, Space_Separator](https://www.compart.com/en/unicode/category/Zs).
922
- #
923
- # * `C`, `Other`: `Cc`, `Cf`, `Cn`, `Co`, or `Cs`.
924
- # * [Cc, Control](https://www.compart.com/en/unicode/category/Cc).
925
- # * [Cf, Format](https://www.compart.com/en/unicode/category/Cf).
926
- # * [Cn, Unassigned](https://www.compart.com/en/unicode/category/Cn).
927
- # * [Co, Private_Use](https://www.compart.com/en/unicode/category/Co).
928
- # * [Cs, Surrogate](https://www.compart.com/en/unicode/category/Cs).
929
- #
930
- # #### Unicode Scripts and Blocks
931
- #
932
- # Among the Unicode properties are:
933
- #
934
- # * [Unicode scripts](https://en.wikipedia.org/wiki/Script_(Unicode)); see
935
- # [supported scripts](https://www.unicode.org/standard/supported.html).
936
- # * [Unicode blocks](https://en.wikipedia.org/wiki/Unicode_block); see
937
- # [supported blocks](http://www.unicode.org/Public/UNIDATA/Blocks.txt).
938
- #
939
- # ### POSIX Bracket Expressions
940
- #
941
- # A POSIX *bracket expression* is also similar to a character class. These
942
- # expressions provide a portable alternative to the above, with the added
943
- # benefit of encompassing non-ASCII characters:
944
- #
945
- # * `/\d/` matches only ASCII decimal digits `0` through `9`.
946
- # * `/[[:digit:]]/` matches any character in the Unicode `Decimal Number`
947
- # (`Nd`) category; see below.
948
- #
949
- # The POSIX bracket expressions:
950
- #
951
- # * `/[[:digit:]]/`: Matches a [Unicode
952
- # digit](https://www.compart.com/en/unicode/category/Nd):
953
- #
954
- # /[[:digit:]]/.match('9') # => #<MatchData "9">
955
- # /[[:digit:]]/.match("\u1fbf9") # => #<MatchData "9">
956
- #
957
- # * `/[[:xdigit:]]/`: Matches a digit allowed in a hexadecimal number;
958
- # equivalent to `[0-9a-fA-F]`.
959
- #
960
- # * `/[[:upper:]]/`: Matches a [Unicode uppercase
961
- # letter](https://www.compart.com/en/unicode/category/Lu):
962
- #
963
- # /[[:upper:]]/.match('A') # => #<MatchData "A">
964
- # /[[:upper:]]/.match("\u00c6") # => #<MatchData "Æ">
965
- #
966
- # * `/[[:lower:]]/`: Matches a [Unicode lowercase
967
- # letter](https://www.compart.com/en/unicode/category/Ll):
968
- #
969
- # /[[:lower:]]/.match('a') # => #<MatchData "a">
970
- # /[[:lower:]]/.match("\u01fd") # => #<MatchData "ǽ">
971
- #
972
- # * `/[[:alpha:]]/`: Matches `/[[:upper:]]/` or `/[[:lower:]]/`.
973
- #
974
- # * `/[[:alnum:]]/`: Matches `/[[:alpha:]]/` or `/[[:digit:]]/`.
975
- #
976
- # * `/[[:space:]]/`: Matches [Unicode space
977
- # character](https://www.compart.com/en/unicode/category/Zs):
978
- #
979
- # /[[:space:]]/.match(' ') # => #<MatchData " ">
980
- # /[[:space:]]/.match("\u2005") # => #<MatchData " ">
981
- #
982
- # * `/[[:blank:]]/`: Matches `/[[:space:]]/` or tab character:
983
- #
984
- # /[[:blank:]]/.match(' ') # => #<MatchData " ">
985
- # /[[:blank:]]/.match("\u2005") # => #<MatchData " ">
986
- # /[[:blank:]]/.match("\t") # => #<MatchData "\t">
987
- #
988
- # * `/[[:cntrl:]]/`: Matches [Unicode control
989
- # character](https://www.compart.com/en/unicode/category/Cc):
990
- #
991
- # /[[:cntrl:]]/.match("\u0000") # => #<MatchData "\u0000">
992
- # /[[:cntrl:]]/.match("\u009f") # => #<MatchData "\u009F">
993
- #
994
- # * `/[[:graph:]]/`: Matches any character except `/[[:space:]]/` or
995
- # `/[[:cntrl:]]/`.
996
- #
997
- # * `/[[:print:]]/`: Matches `/[[:graph:]]/` or space character.
998
- #
999
- # * `/[[:punct:]]/`: Matches any (Unicode punctuation
1000
- # character}[https://www.compart.com/en/unicode/category/Po]:
1001
- #
1002
- # Ruby also supports these (non-POSIX) bracket expressions:
1003
- #
1004
- # * `/[[:ascii:]]/`: Matches a character in the ASCII character set.
1005
- # * `/[[:word:]]/`: Matches a character in one of these Unicode character
1006
- # categories or having one of these Unicode properties:
1007
- #
1008
- # * Unicode categories:
1009
- # * `Mark` (`M`).
1010
- # * `Decimal Number` (`Nd`)
1011
- # * `Connector Punctuation` (`Pc`).
1012
- #
1013
- # * Unicode properties:
1014
- # * `Alpha`
1015
- # * `Join_Control`
1016
- #
1017
- # ### Comments
1018
- #
1019
- # A comment may be included in a regexp pattern using the `(?#`*comment*`)`
1020
- # construct, where *comment* is a substring that is to be ignored. arbitrary
1021
- # text ignored by the regexp engine:
1022
- #
1023
- # /foo(?#Ignore me)bar/.match('foobar') # => #<MatchData "foobar">
1024
- #
1025
- # The comment may not include an unescaped terminator character.
1026
- #
1027
- # See also [Extended Mode](rdoc-ref:Regexp@Extended+Mode).
1028
- #
1029
- # ## Modes
1030
- #
1031
- # Each of these modifiers sets a mode for the regexp:
1032
- #
1033
- # * `i`: `/*pattern*/i` sets [Case-Insensitive
1034
- # Mode](rdoc-ref:Regexp@Case-Insensitive+Mode).
1035
- # * `m`: `/*pattern*/m` sets [Multiline Mode](rdoc-ref:Regexp@Multiline+Mode).
1036
- # * `x`: `/*pattern*/x` sets [Extended Mode](rdoc-ref:Regexp@Extended+Mode).
1037
- # * `o`: `/*pattern*/o` sets [Interpolation
1038
- # Mode](rdoc-ref:Regexp@Interpolation+Mode).
1039
- #
1040
- # Any, all, or none of these may be applied.
1041
- #
1042
- # Modifiers `i`, `m`, and `x` may be applied to subexpressions:
1043
- #
1044
- # * `(?*modifier*)` turns the mode "on" for ensuing subexpressions
1045
- # * `(?-*modifier*)` turns the mode "off" for ensuing subexpressions
1046
- # * `(?*modifier*:*subexp*)` turns the mode "on" for *subexp* within the group
1047
- # * `(?-*modifier*:*subexp*)` turns the mode "off" for *subexp* within the
1048
- # group
1049
- #
1050
- # Example:
1051
- #
1052
- # re = /(?i)te(?-i)st/
1053
- # re.match('test') # => #<MatchData "test">
1054
- # re.match('TEst') # => #<MatchData "TEst">
1055
- # re.match('TEST') # => nil
1056
- # re.match('teST') # => nil
1057
- #
1058
- # re = /t(?i:e)st/
1059
- # re.match('test') # => #<MatchData "test">
1060
- # re.match('tEst') # => #<MatchData "tEst">
1061
- # re.match('tEST') # => nil
1062
- #
1063
- # Method Regexp#options returns an integer whose value showing the settings for
1064
- # case-insensitivity mode, multiline mode, and extended mode.
1065
- #
1066
- # ### Case-Insensitive Mode
1067
- #
1068
- # By default, a regexp is case-sensitive:
1069
- #
1070
- # /foo/.match('FOO') # => nil
1071
- #
1072
- # Modifier `i` enables case-insensitive mode:
1073
- #
1074
- # /foo/i.match('FOO')
1075
- # # => #<MatchData "FOO">
1076
- #
1077
- # Method Regexp#casefold? returns whether the mode is case-insensitive.
1078
- #
1079
- # ### Multiline Mode
1080
- #
1081
- # The multiline-mode in Ruby is what is commonly called a "dot-all mode":
1082
- #
1083
- # * Without the `m` modifier, the subexpression `.` does not match newlines:
1084
- #
1085
- # /a.c/.match("a\nc") # => nil
1086
- #
1087
- # * With the modifier, it does match:
1088
- #
1089
- # /a.c/m.match("a\nc") # => #<MatchData "a\nc">
1090
- #
1091
- # Unlike other languages, the modifier `m` does not affect the anchors `^` and
1092
- # `$`. These anchors always match at line-boundaries in Ruby.
1093
- #
1094
- # ### Extended Mode
1095
- #
1096
- # Modifier `x` enables extended mode, which means that:
1097
- #
1098
- # * Literal white space in the pattern is to be ignored.
1099
- # * Character `#` marks the remainder of its containing line as a comment,
1100
- # which is also to be ignored for matching purposes.
1101
- #
1102
- # In extended mode, whitespace and comments may be used to form a
1103
- # self-documented regexp.
1104
- #
1105
- # Regexp not in extended mode (matches some Roman numerals):
1106
- #
1107
- # pattern = '^M{0,3}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$'
1108
- # re = /#{pattern}/
1109
- # re.match('MCMXLIII') # => #<MatchData "MCMXLIII" 1:"CM" 2:"XL" 3:"III">
1110
- #
1111
- # Regexp in extended mode:
1112
- #
1113
- # pattern = <<-EOT
1114
- # ^ # beginning of string
1115
- # M{0,3} # thousands - 0 to 3 Ms
1116
- # (CM|CD|D?C{0,3}) # hundreds - 900 (CM), 400 (CD), 0-300 (0 to 3 Cs),
1117
- # # or 500-800 (D, followed by 0 to 3 Cs)
1118
- # (XC|XL|L?X{0,3}) # tens - 90 (XC), 40 (XL), 0-30 (0 to 3 Xs),
1119
- # # or 50-80 (L, followed by 0 to 3 Xs)
1120
- # (IX|IV|V?I{0,3}) # ones - 9 (IX), 4 (IV), 0-3 (0 to 3 Is),
1121
- # # or 5-8 (V, followed by 0 to 3 Is)
1122
- # $ # end of string
1123
- # EOT
1124
- # re = /#{pattern}/x
1125
- # re.match('MCMXLIII') # => #<MatchData "MCMXLIII" 1:"CM" 2:"XL" 3:"III">
1126
- #
1127
- # ### Interpolation Mode
1128
- #
1129
- # Modifier `o` means that the first time a literal regexp with interpolations is
1130
- # encountered, the generated Regexp object is saved and used for all future
1131
- # evaluations of that literal regexp. Without modifier `o`, the generated Regexp
1132
- # is not saved, so each evaluation of the literal regexp generates a new Regexp
1133
- # object.
1134
- #
1135
- # Without modifier `o`:
1136
- #
1137
- # def letters; sleep 5; /[A-Z][a-z]/; end
1138
- # words = %w[abc def xyz]
1139
- # start = Time.now
1140
- # words.each {|word| word.match(/\A[#{letters}]+\z/) }
1141
- # Time.now - start # => 15.0174892
1142
- #
1143
- # With modifier `o`:
1144
- #
1145
- # start = Time.now
1146
- # words.each {|word| word.match(/\A[#{letters}]+\z/o) }
1147
- # Time.now - start # => 5.0010866
1148
- #
1149
- # Note that if the literal regexp does not have interpolations, the `o` behavior
1150
- # is the default.
1151
- #
1152
- # ## Encodings
1153
- #
1154
- # By default, a regexp with only US-ASCII characters has US-ASCII encoding:
1155
- #
1156
- # re = /foo/
1157
- # re.source.encoding # => #<Encoding:US-ASCII>
1158
- # re.encoding # => #<Encoding:US-ASCII>
1159
- #
1160
- # A regular expression containing non-US-ASCII characters is assumed to use the
1161
- # source encoding. This can be overridden with one of the following modifiers.
1162
- #
1163
- # * `/*pat*/n`: US-ASCII if only containing US-ASCII characters, otherwise
1164
- # ASCII-8BIT:
1165
- #
1166
- # /foo/n.encoding # => #<Encoding:US-ASCII>
1167
- # /foo\xff/n.encoding # => #<Encoding:ASCII-8BIT>
1168
- # /foo\x7f/n.encoding # => #<Encoding:US-ASCII>
1169
- #
1170
- # * `/*pat*/u`: UTF-8
1171
- #
1172
- # /foo/u.encoding # => #<Encoding:UTF-8>
1173
- #
1174
- # * `/*pat*/e`: EUC-JP
1175
- #
1176
- # /foo/e.encoding # => #<Encoding:EUC-JP>
1177
- #
1178
- # * `/*pat*/s`: Windows-31J
1179
- #
1180
- # /foo/s.encoding # => #<Encoding:Windows-31J>
1181
- #
1182
- # A regexp can be matched against a target string when either:
1183
- #
1184
- # * They have the same encoding.
1185
- # * The regexp's encoding is a fixed encoding and the string contains only
1186
- # ASCII characters. Method Regexp#fixed_encoding? returns whether the regexp
1187
- # has a *fixed* encoding.
1188
- #
1189
- # If a match between incompatible encodings is attempted an
1190
- # `Encoding::CompatibilityError` exception is raised.
1191
- #
1192
- # Example:
1193
- #
1194
- # re = eval("# encoding: ISO-8859-1\n/foo\\xff?/")
1195
- # re.encoding # => #<Encoding:ISO-8859-1>
1196
- # re =~ "foo".encode("UTF-8") # => 0
1197
- # re =~ "foo\u0100" # Raises Encoding::CompatibilityError
1198
- #
1199
- # The encoding may be explicitly fixed by including Regexp::FIXEDENCODING in the
1200
- # second argument for Regexp.new:
1201
- #
1202
- # # Regexp with encoding ISO-8859-1.
1203
- # re = Regexp.new("a".force_encoding('iso-8859-1'), Regexp::FIXEDENCODING)
1204
- # re.encoding # => #<Encoding:ISO-8859-1>
1205
- # # Target string with encoding UTF-8.
1206
- # s = "a\u3042"
1207
- # s.encoding # => #<Encoding:UTF-8>
1208
- # re.match(s) # Raises Encoding::CompatibilityError.
1209
- #
1210
- # ## Timeouts
1211
- #
1212
- # When either a regexp source or a target string comes from untrusted input,
1213
- # malicious values could become a denial-of-service attack; to prevent such an
1214
- # attack, it is wise to set a timeout.
1215
- #
1216
- # Regexp has two timeout values:
1217
- #
1218
- # * A class default timeout, used for a regexp whose instance timeout is
1219
- # `nil`; this default is initially `nil`, and may be set by method
1220
- # Regexp.timeout=:
1221
- #
1222
- # Regexp.timeout # => nil
1223
- # Regexp.timeout = 3.0
1224
- # Regexp.timeout # => 3.0
1225
- #
1226
- # * An instance timeout, which defaults to `nil` and may be set in Regexp.new:
1227
- #
1228
- # re = Regexp.new('foo', timeout: 5.0)
1229
- # re.timeout # => 5.0
1230
- #
1231
- # When regexp.timeout is `nil`, the timeout "falls through" to Regexp.timeout;
1232
- # when regexp.timeout is non-`nil`, that value controls timing out:
1233
- #
1234
- # | regexp.timeout Value | Regexp.timeout Value | Result |
1235
- # |----------------------|----------------------|-----------------------------|
1236
- # | nil | nil | Never times out. |
1237
- # | nil | Float | Times out in Float seconds. |
1238
- # | Float | Any | Times out in Float seconds. |
1239
- #
1240
- # ## Optimization
1241
- #
1242
- # For certain values of the pattern and target string, matching time can grow
1243
- # polynomially or exponentially in relation to the input size; the potential
1244
- # vulnerability arising from this is the [regular expression
1245
- # denial-of-service](https://en.wikipedia.org/wiki/ReDoS) (ReDoS) attack.
1246
- #
1247
- # Regexp matching can apply an optimization to prevent ReDoS attacks. When the
1248
- # optimization is applied, matching time increases linearly (not polynomially or
1249
- # exponentially) in relation to the input size, and a ReDoS attach is not
1250
- # possible.
1251
- #
1252
- # This optimization is applied if the pattern meets these criteria:
1253
- #
1254
- # * No backreferences.
1255
- # * No subexpression calls.
1256
- # * No nested lookaround anchors or atomic groups.
1257
- # * No nested quantifiers with counting (i.e. no nested `{n}`, `{min,}`,
1258
- # `{,max}`, or `{min,max}` style quantifiers)
1259
- #
1260
- # You can use method Regexp.linear_time? to determine whether a pattern meets
1261
- # these criteria:
1262
- #
1263
- # Regexp.linear_time?(/a*/) # => true
1264
- # Regexp.linear_time?('a*') # => true
1265
- # Regexp.linear_time?(/(a*)\1/) # => false
1266
- #
1267
- # However, an untrusted source may not be safe even if the method returns
1268
- # `true`, because the optimization uses memoization (which may invoke large
1269
- # memory consumption).
1270
- #
1271
- # ## References
1272
- #
1273
- # Read (online PDF books):
1274
- #
1275
- # * [Mastering Regular
1276
- # Expressions](https://ia902508.us.archive.org/10/items/allitebooks-02/Maste
1277
- # ring%20Regular%20Expressions%2C%203rd%20Edition.pdf) by Jeffrey E.F.
1278
- # Friedl.
1279
- # * [Regular Expressions
1280
- # Cookbook](https://doc.lagout.org/programmation/Regular%20Expressions/Regul
1281
- # ar%20Expressions%20Cookbook_%20Detailed%20Solutions%20in%20Eight%20Program
1282
- # ming%20Languages%20%282nd%20ed.%29%20%5BGoyvaerts%20%26%20Levithan%202012-
1283
- # 09-06%5D.pdf) by Jan Goyvaerts & Steven Levithan.
1284
- #
1285
- # Explore, test (interactive online editor):
1286
- #
1287
- # * [Rubular](https://rubular.com/).
1288
- #
1289
- class Regexp
1290
- # Represents an object's ability to be converted to a `Regexp`.
1291
- #
1292
- # This is only used in `Regexp.try_convert` and `Regexp.union` within the standard library.
1293
- interface _ToRegexp
1294
- # Converts `self` to a `Regexp`.
1295
- def to_regexp: () -> Regexp
1296
- end
1297
-
1298
- class TimeoutError < RegexpError
1299
- end
1300
-
1301
- # <!-- rdoc-file=re.c -->
1302
- # see Regexp.options and Regexp.new
1303
- #
1304
- EXTENDED: Integer
1305
-
1306
- # <!-- rdoc-file=re.c -->
1307
- # see Regexp.options and Regexp.new
1308
- #
1309
- FIXEDENCODING: Integer
1310
-
1311
- # <!-- rdoc-file=re.c -->
1312
- # see Regexp.options and Regexp.new
1313
- #
1314
- IGNORECASE: Integer
1315
-
1316
- # <!-- rdoc-file=re.c -->
1317
- # see Regexp.options and Regexp.new
1318
- #
1319
- MULTILINE: Integer
1320
-
1321
- # <!-- rdoc-file=re.c -->
1322
- # see Regexp.options and Regexp.new
1323
- #
1324
- NOENCODING: Integer
1325
-
1326
- # <!--
1327
- # rdoc-file=re.c
1328
- # - compile(*args)
1329
- # -->
1330
- # Alias for Regexp.new
1331
- #
1332
- alias self.compile self.new
1333
-
1334
- # <!--
1335
- # rdoc-file=re.c
1336
- # - Regexp.escape(string) -> new_string
1337
- # -->
1338
- # Returns a new string that escapes any characters that have special meaning in
1339
- # a regular expression:
1340
- #
1341
- # s = Regexp.escape('\*?{}.') # => "\\\\\\*\\?\\{\\}\\."
1342
- #
1343
- # For any string `s`, this call returns a MatchData object:
1344
- #
1345
- # r = Regexp.new(Regexp.escape(s)) # => /\\\\\\\*\\\?\\\{\\\}\\\./
1346
- # r.match(s) # => #<MatchData "\\\\\\*\\?\\{\\}\\.">
1347
- #
1348
- def self.escape: (interned str) -> String
1349
-
1350
- # <!--
1351
- # rdoc-file=re.c
1352
- # - Regexp.last_match -> matchdata or nil
1353
- # - Regexp.last_match(n) -> string or nil
1354
- # - Regexp.last_match(name) -> string or nil
1355
- # -->
1356
- # With no argument, returns the value of `$~`, which is the result of the most
1357
- # recent pattern match (see [Regexp global
1358
- # variables](rdoc-ref:Regexp@Global+Variables)):
1359
- #
1360
- # /c(.)t/ =~ 'cat' # => 0
1361
- # Regexp.last_match # => #<MatchData "cat" 1:"a">
1362
- # /a/ =~ 'foo' # => nil
1363
- # Regexp.last_match # => nil
1364
- #
1365
- # With non-negative integer argument `n`, returns the _n_th field in the
1366
- # matchdata, if any, or nil if none:
1367
- #
1368
- # /c(.)t/ =~ 'cat' # => 0
1369
- # Regexp.last_match(0) # => "cat"
1370
- # Regexp.last_match(1) # => "a"
1371
- # Regexp.last_match(2) # => nil
1372
- #
1373
- # With negative integer argument `n`, counts backwards from the last field:
1374
- #
1375
- # Regexp.last_match(-1) # => "a"
1376
- #
1377
- # With string or symbol argument `name`, returns the string value for the named
1378
- # capture, if any:
1379
- #
1380
- # /(?<lhs>\w+)\s*=\s*(?<rhs>\w+)/ =~ 'var = val'
1381
- # Regexp.last_match # => #<MatchData "var = val" lhs:"var"rhs:"val">
1382
- # Regexp.last_match(:lhs) # => "var"
1383
- # Regexp.last_match('rhs') # => "val"
1384
- # Regexp.last_match('foo') # Raises IndexError.
1385
- #
1386
- def self.last_match: () -> MatchData?
1387
- | (MatchData::capture capture) -> String?
1388
-
1389
- # <!--
1390
- # rdoc-file=re.c
1391
- # - Regexp.linear_time?(re)
1392
- # - Regexp.linear_time?(string, options = 0)
1393
- # -->
1394
- # Returns `true` if matching against `re` can be done in linear time to the
1395
- # input string.
1396
- #
1397
- # Regexp.linear_time?(/re/) # => true
1398
- #
1399
- # Note that this is a property of the ruby interpreter, not of the argument
1400
- # regular expression. Identical regexp can or cannot run in linear time
1401
- # depending on your ruby binary. Neither forward nor backward compatibility is
1402
- # guaranteed about the return value of this method. Our current algorithm is
1403
- # (*1) but this is subject to change in the future. Alternative implementations
1404
- # can also behave differently. They might always return false for everything.
1405
- #
1406
- # (*1): https://doi.org/10.1109/SP40001.2021.00032
1407
- #
1408
- def self.linear_time?: (Regexp regex, ?nil, ?timeout: untyped) -> bool
1409
- | (string regex, ?int | string | bool | nil options, ?timeout: untyped) -> bool
1410
-
1411
- # <!--
1412
- # rdoc-file=re.c
1413
- # - Regexp.escape(string) -> new_string
1414
- # -->
1415
- # Returns a new string that escapes any characters that have special meaning in
1416
- # a regular expression:
1417
- #
1418
- # s = Regexp.escape('\*?{}.') # => "\\\\\\*\\?\\{\\}\\."
1419
- #
1420
- # For any string `s`, this call returns a MatchData object:
1421
- #
1422
- # r = Regexp.new(Regexp.escape(s)) # => /\\\\\\\*\\\?\\\{\\\}\\\./
1423
- # r.match(s) # => #<MatchData "\\\\\\*\\?\\{\\}\\.">
1424
- #
1425
- alias self.quote self.escape
1426
-
1427
- # <!--
1428
- # rdoc-file=re.c
1429
- # - Regexp.try_convert(object) -> regexp or nil
1430
- # -->
1431
- # Returns `object` if it is a regexp:
1432
- #
1433
- # Regexp.try_convert(/re/) # => /re/
1434
- #
1435
- # Otherwise if `object` responds to `:to_regexp`, calls `object.to_regexp` and
1436
- # returns the result.
1437
- #
1438
- # Returns `nil` if `object` does not respond to `:to_regexp`.
1439
- #
1440
- # Regexp.try_convert('re') # => nil
1441
- #
1442
- # Raises an exception unless `object.to_regexp` returns a regexp.
1443
- #
1444
- def self.try_convert: (Regexp | _ToRegexp regexp_like) -> Regexp
1445
- | (untyped other) -> Regexp?
1446
-
1447
- # <!--
1448
- # rdoc-file=re.c
1449
- # - Regexp.timeout -> float or nil
1450
- # -->
1451
- # It returns the current default timeout interval for Regexp matching in second.
1452
- # `nil` means no default timeout configuration.
1453
- #
1454
- def self.timeout: () -> Float?
1455
-
1456
- # <!--
1457
- # rdoc-file=re.c
1458
- # - Regexp.timeout = float or nil
1459
- # -->
1460
- # It sets the default timeout interval for Regexp matching in second. `nil`
1461
- # means no default timeout configuration. This configuration is process-global.
1462
- # If you want to set timeout for each Regexp, use `timeout` keyword for
1463
- # `Regexp.new`.
1464
- #
1465
- # Regexp.timeout = 1
1466
- # /^a*b?a*$/ =~ "a" * 100000 + "x" #=> regexp match timeout (RuntimeError)
1467
- #
1468
- def self.timeout=: [T < _ToF] (T timeout) -> T
1469
-
1470
- # <!--
1471
- # rdoc-file=re.c
1472
- # - Regexp.union(*patterns) -> regexp
1473
- # - Regexp.union(array_of_patterns) -> regexp
1474
- # -->
1475
- # Returns a new regexp that is the union of the given patterns:
1476
- #
1477
- # r = Regexp.union(%w[cat dog]) # => /cat|dog/
1478
- # r.match('cat') # => #<MatchData "cat">
1479
- # r.match('dog') # => #<MatchData "dog">
1480
- # r.match('cog') # => nil
1481
- #
1482
- # For each pattern that is a string, `Regexp.new(pattern)` is used:
1483
- #
1484
- # Regexp.union('penzance') # => /penzance/
1485
- # Regexp.union('a+b*c') # => /a\+b\*c/
1486
- # Regexp.union('skiing', 'sledding') # => /skiing|sledding/
1487
- # Regexp.union(['skiing', 'sledding']) # => /skiing|sledding/
1488
- #
1489
- # For each pattern that is a regexp, it is used as is, including its flags:
1490
- #
1491
- # Regexp.union(/foo/i, /bar/m, /baz/x)
1492
- # # => /(?i-mx:foo)|(?m-ix:bar)|(?x-mi:baz)/
1493
- # Regexp.union([/foo/i, /bar/m, /baz/x])
1494
- # # => /(?i-mx:foo)|(?m-ix:bar)|(?x-mi:baz)/
1495
- #
1496
- # With no arguments, returns `/(?!)/`:
1497
- #
1498
- # Regexp.union # => /(?!)/
1499
- #
1500
- # If any regexp pattern contains captures, the behavior is unspecified.
1501
- #
1502
- def self.union: (*Regexp | _ToRegexp | string patterns) -> Regexp
1503
- | (array[Regexp | _ToRegexp | string] patterns) -> Regexp
1504
- | (Symbol | [Symbol] symbol_pattern) -> Regexp
1505
-
1506
- # <!--
1507
- # rdoc-file=re.c
1508
- # - Regexp.new(string, options = 0, timeout: nil) -> regexp
1509
- # - Regexp.new(regexp, timeout: nil) -> regexp
1510
- # -->
1511
- # With argument `string` given, returns a new regexp with the given string and
1512
- # options:
1513
- #
1514
- # r = Regexp.new('foo') # => /foo/
1515
- # r.source # => "foo"
1516
- # r.options # => 0
1517
- #
1518
- # Optional argument `options` is one of the following:
1519
- #
1520
- # * A String of options:
1521
- #
1522
- # Regexp.new('foo', 'i') # => /foo/i
1523
- # Regexp.new('foo', 'im') # => /foo/im
1524
- #
1525
- # * The bit-wise OR of one or more of the constants Regexp::EXTENDED,
1526
- # Regexp::IGNORECASE, Regexp::MULTILINE, and Regexp::NOENCODING:
1527
- #
1528
- # Regexp.new('foo', Regexp::IGNORECASE) # => /foo/i
1529
- # Regexp.new('foo', Regexp::EXTENDED) # => /foo/x
1530
- # Regexp.new('foo', Regexp::MULTILINE) # => /foo/m
1531
- # Regexp.new('foo', Regexp::NOENCODING) # => /foo/n
1532
- # flags = Regexp::IGNORECASE | Regexp::EXTENDED | Regexp::MULTILINE
1533
- # Regexp.new('foo', flags) # => /foo/mix
1534
- #
1535
- # * `nil` or `false`, which is ignored.
1536
- # * Any other truthy value, in which case the regexp will be case-insensitive.
1537
- #
1538
- # If optional keyword argument `timeout` is given, its float value overrides the
1539
- # timeout interval for the class, Regexp.timeout. If `nil` is passed as
1540
- # +timeout, it uses the timeout interval for the class, Regexp.timeout.
1541
- #
1542
- # With argument `regexp` given, returns a new regexp. The source, options,
1543
- # timeout are the same as `regexp`. `options` and `n_flag` arguments are
1544
- # ineffective. The timeout can be overridden by `timeout` keyword.
1545
- #
1546
- # options = Regexp::MULTILINE
1547
- # r = Regexp.new('foo', options, timeout: 1.1) # => /foo/m
1548
- # r2 = Regexp.new(r) # => /foo/m
1549
- # r2.timeout # => 1.1
1550
- # r3 = Regexp.new(r, timeout: 3.14) # => /foo/m
1551
- # r3.timeout # => 3.14
1552
- #
1553
- def initialize: (Regexp regexp, ?timeout: _ToF?) -> void
1554
- | (string pattern, ?int | string | bool | nil options, ?timeout: _ToF?) -> void
1555
-
1556
- def initialize_copy: (self object) -> self
1557
-
1558
- # <!-- rdoc-file=re.c -->
1559
- # Returns `true` if `object` is another Regexp whose pattern, flags, and
1560
- # encoding are the same as `self`, `false` otherwise:
1561
- #
1562
- # /foo/ == Regexp.new('foo') # => true
1563
- # /foo/ == /foo/i # => false
1564
- # /foo/ == Regexp.new('food') # => false
1565
- # /foo/ == Regexp.new("abc".force_encoding("euc-jp")) # => false
1566
- #
1567
- def ==: (untyped other) -> bool
1568
-
1569
- # <!--
1570
- # rdoc-file=re.c
1571
- # - regexp === string -> true or false
1572
- # -->
1573
- # Returns `true` if `self` finds a match in `string`:
1574
- #
1575
- # /^[a-z]*$/ === 'HELLO' # => false
1576
- # /^[A-Z]*$/ === 'HELLO' # => true
1577
- #
1578
- # This method is called in case statements:
1579
- #
1580
- # s = 'HELLO'
1581
- # case s
1582
- # when /\A[a-z]*\z/; print "Lower case\n"
1583
- # when /\A[A-Z]*\z/; print "Upper case\n"
1584
- # else print "Mixed case\n"
1585
- # end # => "Upper case"
1586
- #
1587
- def ===: (untyped other) -> bool
1588
-
1589
- # <!--
1590
- # rdoc-file=re.c
1591
- # - regexp =~ string -> integer or nil
1592
- # -->
1593
- # Returns the integer index (in characters) of the first match for `self` and
1594
- # `string`, or `nil` if none; also sets the [rdoc-ref:Regexp global
1595
- # variables](rdoc-ref:Regexp@Global+Variables):
1596
- #
1597
- # /at/ =~ 'input data' # => 7
1598
- # $~ # => #<MatchData "at">
1599
- # /ax/ =~ 'input data' # => nil
1600
- # $~ # => nil
1601
- #
1602
- # Assigns named captures to local variables of the same names if and only if
1603
- # `self`:
1604
- #
1605
- # * Is a regexp literal; see [Regexp
1606
- # Literals](rdoc-ref:syntax/literals.rdoc@Regexp+Literals).
1607
- # * Does not contain interpolations; see [Regexp
1608
- # interpolation](rdoc-ref:Regexp@Interpolation+Mode).
1609
- # * Is at the left of the expression.
1610
- #
1611
- # Example:
1612
- #
1613
- # /(?<lhs>\w+)\s*=\s*(?<rhs>\w+)/ =~ ' x = y '
1614
- # p lhs # => "x"
1615
- # p rhs # => "y"
1616
- #
1617
- # Assigns `nil` if not matched:
1618
- #
1619
- # /(?<lhs>\w+)\s*=\s*(?<rhs>\w+)/ =~ ' x = '
1620
- # p lhs # => nil
1621
- # p rhs # => nil
1622
- #
1623
- # Does not make local variable assignments if `self` is not a regexp literal:
1624
- #
1625
- # r = /(?<foo>\w+)\s*=\s*(?<foo>\w+)/
1626
- # r =~ ' x = y '
1627
- # p foo # Undefined local variable
1628
- # p bar # Undefined local variable
1629
- #
1630
- # The assignment does not occur if the regexp is not at the left:
1631
- #
1632
- # ' x = y ' =~ /(?<foo>\w+)\s*=\s*(?<foo>\w+)/
1633
- # p foo, foo # Undefined local variables
1634
- #
1635
- # A regexp interpolation, `#{}`, also disables the assignment:
1636
- #
1637
- # r = /(?<foo>\w+)/
1638
- # /(?<foo>\w+)\s*=\s*#{r}/ =~ 'x = y'
1639
- # p foo # Undefined local variable
1640
- #
1641
- def =~: (interned? string) -> Integer?
1642
- | (nil) -> nil
1643
-
1644
- # <!--
1645
- # rdoc-file=re.c
1646
- # - casefold?-> true or false
1647
- # -->
1648
- # Returns `true` if the case-insensitivity flag in `self` is set, `false`
1649
- # otherwise:
1650
- #
1651
- # /a/.casefold? # => false
1652
- # /a/i.casefold? # => true
1653
- # /(?i:a)/.casefold? # => false
1654
- #
1655
- def casefold?: () -> bool
1656
-
1657
- # <!--
1658
- # rdoc-file=re.c
1659
- # - obj.encoding -> encoding
1660
- # -->
1661
- # Returns the Encoding object that represents the encoding of obj.
1662
- #
1663
- def encoding: () -> Encoding
1664
-
1665
- # <!--
1666
- # rdoc-file=re.c
1667
- # - regexp == object -> true or false
1668
- # -->
1669
- # Returns `true` if `object` is another Regexp whose pattern, flags, and
1670
- # encoding are the same as `self`, `false` otherwise:
1671
- #
1672
- # /foo/ == Regexp.new('foo') # => true
1673
- # /foo/ == /foo/i # => false
1674
- # /foo/ == Regexp.new('food') # => false
1675
- # /foo/ == Regexp.new("abc".force_encoding("euc-jp")) # => false
1676
- #
1677
- alias eql? ==
1678
-
1679
- # <!--
1680
- # rdoc-file=re.c
1681
- # - fixed_encoding? -> true or false
1682
- # -->
1683
- # Returns `false` if `self` is applicable to a string with any ASCII-compatible
1684
- # encoding; otherwise returns `true`:
1685
- #
1686
- # r = /a/ # => /a/
1687
- # r.fixed_encoding? # => false
1688
- # r.match?("\u{6666} a") # => true
1689
- # r.match?("\xa1\xa2 a".force_encoding("euc-jp")) # => true
1690
- # r.match?("abc".force_encoding("euc-jp")) # => true
1691
- #
1692
- # r = /a/u # => /a/
1693
- # r.fixed_encoding? # => true
1694
- # r.match?("\u{6666} a") # => true
1695
- # r.match?("\xa1\xa2".force_encoding("euc-jp")) # Raises exception.
1696
- # r.match?("abc".force_encoding("euc-jp")) # => true
1697
- #
1698
- # r = /\u{6666}/ # => /\u{6666}/
1699
- # r.fixed_encoding? # => true
1700
- # r.encoding # => #<Encoding:UTF-8>
1701
- # r.match?("\u{6666} a") # => true
1702
- # r.match?("\xa1\xa2".force_encoding("euc-jp")) # Raises exception.
1703
- # r.match?("abc".force_encoding("euc-jp")) # => false
1704
- #
1705
- def fixed_encoding?: () -> bool
1706
-
1707
- # <!--
1708
- # rdoc-file=re.c
1709
- # - hash -> integer
1710
- # -->
1711
- # Returns the integer hash value for `self`.
1712
- #
1713
- # Related: Object#hash.
1714
- #
1715
- def hash: () -> Integer
1716
-
1717
- # <!--
1718
- # rdoc-file=re.c
1719
- # - inspect -> string
1720
- # -->
1721
- # Returns a nicely-formatted string representation of `self`:
1722
- #
1723
- # /ab+c/ix.inspect # => "/ab+c/ix"
1724
- #
1725
- # Related: Regexp#to_s.
1726
- #
1727
- def inspect: () -> String
1728
-
1729
- # <!--
1730
- # rdoc-file=re.c
1731
- # - match(string, offset = 0) -> matchdata or nil
1732
- # - match(string, offset = 0) {|matchdata| ... } -> object
1733
- # -->
1734
- # With no block given, returns the MatchData object that describes the match, if
1735
- # any, or `nil` if none; the search begins at the given character `offset` in
1736
- # `string`:
1737
- #
1738
- # /abra/.match('abracadabra') # => #<MatchData "abra">
1739
- # /abra/.match('abracadabra', 4) # => #<MatchData "abra">
1740
- # /abra/.match('abracadabra', 8) # => nil
1741
- # /abra/.match('abracadabra', 800) # => nil
1742
- #
1743
- # string = "\u{5d0 5d1 5e8 5d0}cadabra"
1744
- # /abra/.match(string, 7) #=> #<MatchData "abra">
1745
- # /abra/.match(string, 8) #=> nil
1746
- # /abra/.match(string.b, 8) #=> #<MatchData "abra">
1747
- #
1748
- # With a block given, calls the block if and only if a match is found; returns
1749
- # the block's value:
1750
- #
1751
- # /abra/.match('abracadabra') {|matchdata| p matchdata }
1752
- # # => #<MatchData "abra">
1753
- # /abra/.match('abracadabra', 4) {|matchdata| p matchdata }
1754
- # # => #<MatchData "abra">
1755
- # /abra/.match('abracadabra', 8) {|matchdata| p matchdata }
1756
- # # => nil
1757
- # /abra/.match('abracadabra', 8) {|marchdata| fail 'Cannot happen' }
1758
- # # => nil
1759
- #
1760
- # Output (from the first two blocks above):
1761
- #
1762
- # #<MatchData "abra">
1763
- # #<MatchData "abra">
1764
- #
1765
- # /(.)(.)(.)/.match("abc")[2] # => "b"
1766
- # /(.)(.)/.match("abc", 1)[2] # => "c"
1767
- #
1768
- def match: (interned? str, ?int offset) -> MatchData?
1769
- | [T] (interned? str, ?int offset) { (MatchData matchdata) -> T } -> T?
1770
- | (nil, ?int offset) ?{ (MatchData matchdata) -> void } -> nil
1771
-
1772
- # <!--
1773
- # rdoc-file=re.c
1774
- # - match?(string) -> true or false
1775
- # - match?(string, offset = 0) -> true or false
1776
- # -->
1777
- # Returns `true` or `false` to indicate whether the regexp is matched or not
1778
- # without updating $~ and other related variables. If the second parameter is
1779
- # present, it specifies the position in the string to begin the search.
1780
- #
1781
- # /R.../.match?("Ruby") # => true
1782
- # /R.../.match?("Ruby", 1) # => false
1783
- # /P.../.match?("Ruby") # => false
1784
- # $& # => nil
1785
- #
1786
- def match?: (interned str, ?int offset) -> bool
1787
- | (nil, ?int offset) -> false
1788
-
1789
- # <!--
1790
- # rdoc-file=re.c
1791
- # - named_captures -> hash
1792
- # -->
1793
- # Returns a hash representing named captures of `self` (see [Named
1794
- # Captures](rdoc-ref:Regexp@Named+Captures)):
1795
- #
1796
- # * Each key is the name of a named capture.
1797
- # * Each value is an array of integer indexes for that named capture.
1798
- #
1799
- # Examples:
1800
- #
1801
- # /(?<foo>.)(?<bar>.)/.named_captures # => {"foo"=>[1], "bar"=>[2]}
1802
- # /(?<foo>.)(?<foo>.)/.named_captures # => {"foo"=>[1, 2]}
1803
- # /(.)(.)/.named_captures # => {}
1804
- #
1805
- def named_captures: () -> Hash[String, Array[Integer]]
1806
-
1807
- # <!--
1808
- # rdoc-file=re.c
1809
- # - names -> array_of_names
1810
- # -->
1811
- # Returns an array of names of captures (see [Named
1812
- # Captures](rdoc-ref:Regexp@Named+Captures)):
1813
- #
1814
- # /(?<foo>.)(?<bar>.)(?<baz>.)/.names # => ["foo", "bar", "baz"]
1815
- # /(?<foo>.)(?<foo>.)/.names # => ["foo"]
1816
- # /(.)(.)/.names # => []
1817
- #
1818
- def names: () -> Array[String]
1819
-
1820
- # <!--
1821
- # rdoc-file=re.c
1822
- # - options -> integer
1823
- # -->
1824
- # Returns an integer whose bits show the options set in `self`.
1825
- #
1826
- # The option bits are:
1827
- #
1828
- # Regexp::IGNORECASE # => 1
1829
- # Regexp::EXTENDED # => 2
1830
- # Regexp::MULTILINE # => 4
1831
- #
1832
- # Examples:
1833
- #
1834
- # /foo/.options # => 0
1835
- # /foo/i.options # => 1
1836
- # /foo/x.options # => 2
1837
- # /foo/m.options # => 4
1838
- # /foo/mix.options # => 7
1839
- #
1840
- # Note that additional bits may be set in the returned integer; these are
1841
- # maintained internally in `self`, are ignored if passed to Regexp.new, and may
1842
- # be ignored by the caller:
1843
- #
1844
- # Returns the set of bits corresponding to the options used when creating this
1845
- # regexp (see Regexp::new for details). Note that additional bits may be set in
1846
- # the returned options: these are used internally by the regular expression
1847
- # code. These extra bits are ignored if the options are passed to Regexp::new:
1848
- #
1849
- # r = /\xa1\xa2/e # => /\xa1\xa2/
1850
- # r.source # => "\\xa1\\xa2"
1851
- # r.options # => 16
1852
- # Regexp.new(r.source, r.options) # => /\xa1\xa2/
1853
- #
1854
- def options: () -> Integer
1855
-
1856
- # <!--
1857
- # rdoc-file=re.c
1858
- # - source -> string
1859
- # -->
1860
- # Returns the original string of `self`:
1861
- #
1862
- # /ab+c/ix.source # => "ab+c"
1863
- #
1864
- # Regexp escape sequences are retained:
1865
- #
1866
- # /\x20\+/.source # => "\\x20\\+"
1867
- #
1868
- # Lexer escape characters are not retained:
1869
- #
1870
- # /\//.source # => "/"
1871
- #
1872
- def source: () -> String
1873
-
1874
- # <!--
1875
- # rdoc-file=re.c
1876
- # - to_s -> string
1877
- # -->
1878
- # Returns a string showing the options and string of `self`:
1879
- #
1880
- # r0 = /ab+c/ix
1881
- # s0 = r0.to_s # => "(?ix-m:ab+c)"
1882
- #
1883
- # The returned string may be used as an argument to Regexp.new, or as
1884
- # interpolated text for a [Regexp
1885
- # interpolation](rdoc-ref:Regexp@Interpolation+Mode):
1886
- #
1887
- # r1 = Regexp.new(s0) # => /(?ix-m:ab+c)/
1888
- # r2 = /#{s0}/ # => /(?ix-m:ab+c)/
1889
- #
1890
- # Note that `r1` and `r2` are not equal to `r0` because their original strings
1891
- # are different:
1892
- #
1893
- # r0 == r1 # => false
1894
- # r0.source # => "ab+c"
1895
- # r1.source # => "(?ix-m:ab+c)"
1896
- #
1897
- # Related: Regexp#inspect.
1898
- #
1899
- def to_s: () -> String
1900
-
1901
- # <!--
1902
- # rdoc-file=re.c
1903
- # - rxp.timeout -> float or nil
1904
- # -->
1905
- # It returns the timeout interval for Regexp matching in second. `nil` means no
1906
- # default timeout configuration.
1907
- #
1908
- # This configuration is per-object. The global configuration set by
1909
- # Regexp.timeout= is ignored if per-object configuration is set.
1910
- #
1911
- # re = Regexp.new("^a*b?a*$", timeout: 1)
1912
- # re.timeout #=> 1.0
1913
- # re =~ "a" * 100000 + "x" #=> regexp match timeout (RuntimeError)
1914
- #
1915
- %a{pure}
1916
- def timeout: () -> Float?
1917
-
1918
- # <!--
1919
- # rdoc-file=re.c
1920
- # - ~ rxp -> integer or nil
1921
- # -->
1922
- # Equivalent to *`rxp* =~ $_`:
1923
- #
1924
- # $_ = "input data"
1925
- # ~ /at/ # => 7
1926
- #
1927
- def ~: () -> Integer?
1928
- end