pigeonhole-db 1.1.0

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 (1256) hide show
  1. checksums.yaml +7 -0
  2. data/Cargo.lock +899 -0
  3. data/Cargo.toml +45 -0
  4. data/LICENSE +21 -0
  5. data/README.md +22 -0
  6. data/extconf.rb +12 -0
  7. data/lib/pigeonhole/api.rb +615 -0
  8. data/lib/pigeonhole/index.rb +208 -0
  9. data/lib/pigeonhole/memory.rb +507 -0
  10. data/lib/pigeonhole/version.rb +6 -0
  11. data/lib/pigeonhole-db.rb +6 -0
  12. data/lib/pigeonhole.rb +47 -0
  13. data/sig/pigeonhole.rbs +1484 -0
  14. data/src/budget.rs +205 -0
  15. data/src/classes.rs +279 -0
  16. data/src/convert.rs +192 -0
  17. data/src/db.rs +685 -0
  18. data/src/error.rs +151 -0
  19. data/src/feed.rs +316 -0
  20. data/src/fork.rs +64 -0
  21. data/src/gvl.rs +112 -0
  22. data/src/index.rs +1157 -0
  23. data/src/lib.rs +534 -0
  24. data/src/memory.rs +2178 -0
  25. data/src/read.rs +312 -0
  26. data/src/table.rs +1161 -0
  27. data/src/vector.rs +262 -0
  28. data/src/walk.rs +406 -0
  29. data/vendor/bundle/ruby/3.4.0/bin/minitest +29 -0
  30. data/vendor/bundle/ruby/3.4.0/bin/rake +29 -0
  31. data/vendor/bundle/ruby/3.4.0/bin/rake-compiler +29 -0
  32. data/vendor/bundle/ruby/3.4.0/bin/rake-compiler-dock +29 -0
  33. data/vendor/bundle/ruby/3.4.0/bin/rb-sys-dock +29 -0
  34. data/vendor/bundle/ruby/3.4.0/bin/rbs +29 -0
  35. data/vendor/bundle/ruby/3.4.0/cache/drb-2.2.3.gem +0 -0
  36. data/vendor/bundle/ruby/3.4.0/cache/logger-1.7.0.gem +0 -0
  37. data/vendor/bundle/ruby/3.4.0/cache/minitest-6.0.6.gem +0 -0
  38. data/vendor/bundle/ruby/3.4.0/cache/prism-1.9.0.gem +0 -0
  39. data/vendor/bundle/ruby/3.4.0/cache/rake-13.4.2.gem +0 -0
  40. data/vendor/bundle/ruby/3.4.0/cache/rake-compiler-1.3.2.gem +0 -0
  41. data/vendor/bundle/ruby/3.4.0/cache/rake-compiler-dock-1.12.0.gem +0 -0
  42. data/vendor/bundle/ruby/3.4.0/cache/rb_sys-0.9.130.gem +0 -0
  43. data/vendor/bundle/ruby/3.4.0/cache/rbs-4.2.0.gem +0 -0
  44. data/vendor/bundle/ruby/3.4.0/cache/toml-rb-6.0.0.gem +0 -0
  45. data/vendor/bundle/ruby/3.4.0/cache/tsort-0.2.0.gem +0 -0
  46. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.9.0/gem.build_complete +0 -0
  47. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.9.0/gem_make.out +44 -0
  48. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.9.0/mkmf.log +74 -0
  49. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.9.0/prism/prism.so +0 -0
  50. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/rbs-4.2.0/gem.build_complete +0 -0
  51. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/rbs-4.2.0/gem_make.out +41 -0
  52. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/rbs-4.2.0/mkmf.log +102 -0
  53. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/rbs-4.2.0/rbs_extension.so +0 -0
  54. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/LICENSE.txt +22 -0
  55. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/drb.gemspec +42 -0
  56. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/acl.rb +239 -0
  57. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/drb.rb +1993 -0
  58. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/eq.rb +15 -0
  59. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/extserv.rb +44 -0
  60. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/extservm.rb +94 -0
  61. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/gw.rb +161 -0
  62. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/observer.rb +26 -0
  63. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/ssl.rb +354 -0
  64. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/timeridconv.rb +97 -0
  65. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/unix.rb +118 -0
  66. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/version.rb +3 -0
  67. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/weakidconv.rb +31 -0
  68. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb.rb +3 -0
  69. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/BSDL +22 -0
  70. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/COPYING +56 -0
  71. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/README.md +104 -0
  72. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/lib/logger/errors.rb +9 -0
  73. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/lib/logger/formatter.rb +36 -0
  74. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/lib/logger/log_device.rb +265 -0
  75. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/lib/logger/period.rb +47 -0
  76. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/lib/logger/severity.rb +38 -0
  77. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/lib/logger/version.rb +5 -0
  78. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/lib/logger.rb +789 -0
  79. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/History.rdoc +1860 -0
  80. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/Manifest.txt +41 -0
  81. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/README.rdoc +763 -0
  82. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/Rakefile +89 -0
  83. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/bin/minitest +5 -0
  84. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/design_rationale.rb +54 -0
  85. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/hoe/minitest.rb +30 -0
  86. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/assertions.rb +821 -0
  87. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/autorun.rb +5 -0
  88. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/benchmark.rb +452 -0
  89. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/bisect.rb +304 -0
  90. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/complete.rb +56 -0
  91. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/compress.rb +94 -0
  92. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/error_on_warning.rb +11 -0
  93. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/expectations.rb +321 -0
  94. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/find_minimal_combination.rb +127 -0
  95. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/hell.rb +11 -0
  96. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/manual_plugins.rb +4 -0
  97. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/parallel.rb +72 -0
  98. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/path_expander.rb +432 -0
  99. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/pride.rb +4 -0
  100. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/pride_plugin.rb +135 -0
  101. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/server.rb +49 -0
  102. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/server_plugin.rb +88 -0
  103. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/spec.rb +324 -0
  104. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/sprint.rb +105 -0
  105. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/sprint_plugin.rb +39 -0
  106. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/test.rb +232 -0
  107. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/test_task.rb +331 -0
  108. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest.rb +1232 -0
  109. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/metametameta.rb +150 -0
  110. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_bisect.rb +249 -0
  111. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_find_minimal_combination.rb +138 -0
  112. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_minitest_assertions.rb +1729 -0
  113. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_minitest_benchmark.rb +151 -0
  114. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_minitest_reporter.rb +437 -0
  115. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_minitest_spec.rb +1095 -0
  116. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_minitest_test.rb +1295 -0
  117. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_minitest_test_task.rb +57 -0
  118. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_path_expander.rb +229 -0
  119. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_server.rb +146 -0
  120. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/BSDmakefile +58 -0
  121. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/CHANGELOG.md +786 -0
  122. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/CODE_OF_CONDUCT.md +76 -0
  123. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/CONTRIBUTING.md +58 -0
  124. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/LICENSE.md +7 -0
  125. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/Makefile +116 -0
  126. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/README.md +143 -0
  127. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/config.yml +4739 -0
  128. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/build_system.md +119 -0
  129. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/configuration.md +68 -0
  130. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/cruby_compilation.md +27 -0
  131. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/design.md +53 -0
  132. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/encoding.md +121 -0
  133. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/fuzzing.md +88 -0
  134. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/heredocs.md +36 -0
  135. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/javascript.md +118 -0
  136. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/local_variable_depth.md +229 -0
  137. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/mapping.md +117 -0
  138. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/parser_translation.md +24 -0
  139. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/parsing_rules.md +22 -0
  140. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/releasing.md +75 -0
  141. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/relocation.md +34 -0
  142. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/ripper_translation.md +63 -0
  143. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/ruby_api.md +45 -0
  144. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/ruby_parser_translation.md +19 -0
  145. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/serialization.md +233 -0
  146. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/testing.md +55 -0
  147. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/ext/prism/Makefile +273 -0
  148. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/ext/prism/api_node.c +6945 -0
  149. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/ext/prism/api_pack.c +276 -0
  150. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/ext/prism/extconf.rb +127 -0
  151. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/ext/prism/extension.c +1427 -0
  152. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/ext/prism/extension.h +19 -0
  153. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/ast.h +8254 -0
  154. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/defines.h +260 -0
  155. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/diagnostic.h +458 -0
  156. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/encoding.h +283 -0
  157. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/node.h +129 -0
  158. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/options.h +488 -0
  159. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/pack.h +163 -0
  160. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/parser.h +936 -0
  161. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/prettyprint.h +34 -0
  162. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/regexp.h +43 -0
  163. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/static_literals.h +121 -0
  164. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_buffer.h +236 -0
  165. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_char.h +204 -0
  166. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_constant_pool.h +218 -0
  167. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_integer.h +130 -0
  168. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_list.h +103 -0
  169. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_memchr.h +29 -0
  170. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_newline_list.h +113 -0
  171. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_string.h +200 -0
  172. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_strncasecmp.h +32 -0
  173. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_strpbrk.h +46 -0
  174. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/version.h +29 -0
  175. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism.h +408 -0
  176. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/compiler.rb +801 -0
  177. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/desugar_compiler.rb +392 -0
  178. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/dispatcher.rb +2210 -0
  179. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/dot_visitor.rb +4767 -0
  180. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/dsl.rb +1003 -0
  181. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/ffi.rb +578 -0
  182. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/inspect_visitor.rb +2393 -0
  183. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/lex_compat.rb +911 -0
  184. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/mutation_compiler.rb +772 -0
  185. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/node.rb +19966 -0
  186. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/node_ext.rb +511 -0
  187. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/pack.rb +230 -0
  188. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/parse_result/comments.rb +188 -0
  189. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/parse_result/errors.rb +66 -0
  190. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/parse_result/newlines.rb +155 -0
  191. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/parse_result.rb +907 -0
  192. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/pattern.rb +269 -0
  193. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/polyfill/append_as_bytes.rb +15 -0
  194. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/polyfill/byteindex.rb +13 -0
  195. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/polyfill/scan_byte.rb +14 -0
  196. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/polyfill/unpack1.rb +14 -0
  197. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/polyfill/warn.rb +36 -0
  198. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/prism.so +0 -0
  199. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/reflection.rb +416 -0
  200. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/relocation.rb +505 -0
  201. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/serialize.rb +2400 -0
  202. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/string_query.rb +31 -0
  203. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/parser/builder.rb +62 -0
  204. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/parser/compiler.rb +2234 -0
  205. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/parser/lexer.rb +820 -0
  206. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/parser.rb +376 -0
  207. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/parser_current.rb +26 -0
  208. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/parser_versions.rb +36 -0
  209. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/ripper/filter.rb +53 -0
  210. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/ripper/lexer.rb +135 -0
  211. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/ripper/sexp.rb +126 -0
  212. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/ripper/shim.rb +5 -0
  213. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/ripper.rb +3520 -0
  214. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/ruby_parser.rb +1964 -0
  215. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation.rb +18 -0
  216. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/visitor.rb +813 -0
  217. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism.rb +98 -0
  218. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/prism.gemspec +172 -0
  219. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/compiler.rbi +12 -0
  220. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/dsl.rbi +524 -0
  221. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/inspect_visitor.rbi +12 -0
  222. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/node.rbi +8750 -0
  223. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/node_ext.rbi +107 -0
  224. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/parse_result.rbi +404 -0
  225. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/reflection.rbi +58 -0
  226. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/string_query.rbi +12 -0
  227. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/translation/parser.rbi +11 -0
  228. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/translation/parser_versions.rbi +23 -0
  229. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/translation/ripper.rbi +15 -0
  230. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/visitor.rbi +473 -0
  231. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism.rbi +63 -0
  232. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/compiler.rbs +9 -0
  233. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/dispatcher.rbs +19 -0
  234. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/dot_visitor.rbs +6 -0
  235. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/dsl.rbs +351 -0
  236. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/inspect_visitor.rbs +22 -0
  237. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/lex_compat.rbs +10 -0
  238. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/mutation_compiler.rbs +159 -0
  239. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/node.rbs +4042 -0
  240. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/node_ext.rbs +149 -0
  241. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/pack.rbs +43 -0
  242. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/parse_result/comments.rbs +38 -0
  243. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/parse_result.rbs +197 -0
  244. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/pattern.rbs +13 -0
  245. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/reflection.rbs +50 -0
  246. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/relocation.rbs +185 -0
  247. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/serialize.rbs +8 -0
  248. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/string_query.rbs +11 -0
  249. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/visitor.rbs +169 -0
  250. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism.rbs +272 -0
  251. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/diagnostic.c +854 -0
  252. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/encoding.c +5340 -0
  253. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/node.c +8685 -0
  254. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/options.c +338 -0
  255. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/pack.c +509 -0
  256. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/prettyprint.c +8957 -0
  257. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/prism.c +22679 -0
  258. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/regexp.c +790 -0
  259. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/serialize.c +2274 -0
  260. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/static_literals.c +617 -0
  261. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/token_type.c +703 -0
  262. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_buffer.c +357 -0
  263. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_char.c +318 -0
  264. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_constant_pool.c +342 -0
  265. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_integer.c +670 -0
  266. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_list.c +49 -0
  267. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_memchr.c +35 -0
  268. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_newline_list.c +125 -0
  269. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_string.c +381 -0
  270. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_strncasecmp.c +36 -0
  271. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_strpbrk.c +206 -0
  272. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/History.rdoc +2454 -0
  273. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/MIT-LICENSE +21 -0
  274. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/README.rdoc +155 -0
  275. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/command_line_usage.rdoc +171 -0
  276. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/example/Rakefile1 +38 -0
  277. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/example/Rakefile2 +35 -0
  278. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/example/a.c +6 -0
  279. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/example/b.c +6 -0
  280. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/example/main.c +11 -0
  281. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/glossary.rdoc +42 -0
  282. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/jamis.rb +592 -0
  283. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/proto_rake.rdoc +127 -0
  284. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/rake.1 +156 -0
  285. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/rakefile.rdoc +635 -0
  286. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/rational.rdoc +151 -0
  287. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/exe/rake +27 -0
  288. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/application.rb +847 -0
  289. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/backtrace.rb +25 -0
  290. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/clean.rb +78 -0
  291. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/cloneable.rb +17 -0
  292. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/cpu_counter.rb +122 -0
  293. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/default_loader.rb +15 -0
  294. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/dsl_definition.rb +196 -0
  295. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/early_time.rb +22 -0
  296. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/ext/core.rb +26 -0
  297. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/ext/string.rb +176 -0
  298. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/file_creation_task.rb +25 -0
  299. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/file_list.rb +435 -0
  300. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/file_task.rb +58 -0
  301. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/file_utils.rb +137 -0
  302. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/file_utils_ext.rb +135 -0
  303. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/invocation_chain.rb +57 -0
  304. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/invocation_exception_mixin.rb +17 -0
  305. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/late_time.rb +18 -0
  306. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/linked_list.rb +112 -0
  307. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/loaders/makefile.rb +54 -0
  308. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/multi_task.rb +14 -0
  309. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/name_space.rb +38 -0
  310. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/options.rb +31 -0
  311. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/packagetask.rb +222 -0
  312. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/phony.rb +16 -0
  313. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/private_reader.rb +21 -0
  314. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/promise.rb +100 -0
  315. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/pseudo_status.rb +30 -0
  316. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/rake_module.rb +67 -0
  317. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/rake_test_loader.rb +27 -0
  318. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/rule_recursion_overflow_error.rb +20 -0
  319. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/scope.rb +43 -0
  320. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/task.rb +434 -0
  321. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/task_argument_error.rb +8 -0
  322. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/task_arguments.rb +113 -0
  323. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/task_manager.rb +333 -0
  324. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/tasklib.rb +12 -0
  325. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/testtask.rb +192 -0
  326. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/thread_history_display.rb +49 -0
  327. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/thread_pool.rb +157 -0
  328. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/trace_output.rb +23 -0
  329. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/version.rb +10 -0
  330. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/win32.rb +17 -0
  331. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake.rb +69 -0
  332. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/rake.gemspec +102 -0
  333. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/Gemfile +8 -0
  334. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/History.md +708 -0
  335. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/LICENSE.txt +20 -0
  336. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/README.md +505 -0
  337. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/Rakefile +15 -0
  338. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/appveyor.yml +22 -0
  339. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/bin/rake-compiler +24 -0
  340. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/cucumber.yml +4 -0
  341. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/compile.feature +79 -0
  342. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/cross-compile.feature +23 -0
  343. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/cross-package-multi.feature +15 -0
  344. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/cross-package.feature +14 -0
  345. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/java-compile.feature +22 -0
  346. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/java-no-native-compile.feature +33 -0
  347. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/java-package.feature +24 -0
  348. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/package.feature +40 -0
  349. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/step_definitions/compilation.rb +70 -0
  350. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/step_definitions/cross_compilation.rb +27 -0
  351. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/step_definitions/execution.rb +52 -0
  352. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/step_definitions/folders.rb +32 -0
  353. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/step_definitions/gem.rb +46 -0
  354. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/step_definitions/java_compilation.rb +7 -0
  355. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/support/env.rb +10 -0
  356. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/support/file_template_helpers.rb +137 -0
  357. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/support/generator_helpers.rb +123 -0
  358. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/support/platform_extension_helpers.rb +27 -0
  359. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/lib/rake/baseextensiontask.rb +90 -0
  360. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/lib/rake/compiler_config.rb +38 -0
  361. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/lib/rake/extensioncompiler.rb +51 -0
  362. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/lib/rake/extensiontask.rb +621 -0
  363. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/lib/rake/javaextensiontask.rb +321 -0
  364. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/tasks/bin/cross-ruby.rake +189 -0
  365. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/tasks/bootstrap.rake +11 -0
  366. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/tasks/common.rake +10 -0
  367. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/tasks/cucumber.rake +23 -0
  368. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/tasks/gem.rake +15 -0
  369. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/tasks/rspec.rake +9 -0
  370. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/CHANGELOG.md +446 -0
  371. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/CONTRIBUTING.md +109 -0
  372. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/Dockerfile.jruby +79 -0
  373. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/Dockerfile.mri.erb +282 -0
  374. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/Gemfile +8 -0
  375. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/LICENSE.txt +22 -0
  376. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/README.md +447 -0
  377. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/Rakefile +246 -0
  378. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/bin/rake-compiler-dock +18 -0
  379. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/buildkitd.toml +2 -0
  380. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/gem_helper.rb +54 -0
  381. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/mk_i686.rb +18 -0
  382. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/mk_musl_cross.sh +37 -0
  383. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/mk_osxcross.sh +45 -0
  384. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/mk_pkg_config.sh +24 -0
  385. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/parallel_docker_build.rb +169 -0
  386. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/patches/rake-compiler-1.3.1/0004-Enable-build-of-static-libruby.patch +38 -0
  387. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/patches/rake-compiler-1.3.1/0005-build-miniruby-first.patch +16 -0
  388. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/patches/rake-compiler-1.3.1/0006-ruby-4-rubyspec-capiext.patch +16 -0
  389. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/rcd-env.sh +6 -0
  390. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/runas +7 -0
  391. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/sigfw.c +45 -0
  392. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/strip_wrapper_codesign +17 -0
  393. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/strip_wrapper_vbox +30 -0
  394. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/sudoers +1 -0
  395. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/lib/rake_compiler_dock/colors.rb +43 -0
  396. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/lib/rake_compiler_dock/docker_check.rb +356 -0
  397. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/lib/rake_compiler_dock/predefined_user_group.rb +5 -0
  398. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/lib/rake_compiler_dock/starter.rb +206 -0
  399. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/lib/rake_compiler_dock/version.rb +4 -0
  400. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/lib/rake_compiler_dock.rb +151 -0
  401. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/mingw64-ucrt/Dockerfile +66 -0
  402. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/mingw64-ucrt/README.md +14 -0
  403. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/mingw64-ucrt/binutils-mingw-w64-ignore-check-errors.patch +13 -0
  404. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/mingw64-ucrt/gcc-mingw-w64-only-c-c++.patch +13 -0
  405. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/mingw64-ucrt/mingw-w64-enable-ucrt.patch +22 -0
  406. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/rake-compiler-dock.gemspec +34 -0
  407. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/env/Dockerfile.alpine +17 -0
  408. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/env/Dockerfile.debian +24 -0
  409. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/fixtures/mig_test_rpc.defs +8 -0
  410. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/Gemfile +11 -0
  411. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/Rakefile +97 -0
  412. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/ext/java/RcdTestExtService.java +19 -0
  413. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/ext/java/RubyRcdTest.java +16 -0
  414. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/ext/mri/extconf.rb +111 -0
  415. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/ext/mri/rcd_test_ext.c +65 -0
  416. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/ext/mri/rcd_test_ext.h +11 -0
  417. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/lib/rcd_test.rb +6 -0
  418. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/rcd_test.gemspec +28 -0
  419. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/test/test_basic.rb +49 -0
  420. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/test_environment_variables.rb +108 -0
  421. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/test_mig.rb +18 -0
  422. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/test_parallel_docker_build.rb +95 -0
  423. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/test_rubygems_plugins.rb +12 -0
  424. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/test_starter.rb +158 -0
  425. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/test_versions.rb +82 -0
  426. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/LICENSE-APACHE +190 -0
  427. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/LICENSE-MIT +21 -0
  428. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/README.md +42 -0
  429. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/certs/ianks.pem +21 -0
  430. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/exe/rb-sys-dock +495 -0
  431. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/cargo/config.rb +72 -0
  432. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/cargo/metadata.rb +158 -0
  433. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/cargo.rb +9 -0
  434. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/cargo_builder/link_flag_converter.rb +37 -0
  435. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/cargo_builder.rb +370 -0
  436. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/error.rb +43 -0
  437. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/extensiontask.rb +188 -0
  438. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/mkmf/config.rb +75 -0
  439. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/mkmf.rb +413 -0
  440. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/toolchain_info/data.rb +10 -0
  441. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/toolchain_info.rb +82 -0
  442. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/util/logger.rb +73 -0
  443. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/version.rb +5 -0
  444. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys.rb +8 -0
  445. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/BSDL +22 -0
  446. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/CHANGELOG.md +2463 -0
  447. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/COPYING +56 -0
  448. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/Dockerfile.jruby +53 -0
  449. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/README.md +240 -0
  450. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/Rakefile +1213 -0
  451. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/Steepfile +55 -0
  452. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/config.yml +920 -0
  453. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/array.rbs +4205 -0
  454. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/basic_object.rbs +376 -0
  455. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/binding.rbs +148 -0
  456. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/builtin.rbs +278 -0
  457. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/class.rbs +223 -0
  458. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/comparable.rbs +192 -0
  459. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/complex.rbs +812 -0
  460. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/constants.rbs +96 -0
  461. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/data.rbs +415 -0
  462. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/dir.rbs +993 -0
  463. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/encoding.rbs +1368 -0
  464. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/enumerable.rbs +2506 -0
  465. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/enumerator/arithmetic_sequence.rbs +70 -0
  466. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/enumerator/product.rbs +92 -0
  467. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/enumerator.rbs +705 -0
  468. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/env.rbs +6 -0
  469. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/errno.rbs +682 -0
  470. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/errors.rbs +789 -0
  471. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/exception.rbs +485 -0
  472. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/false_class.rbs +82 -0
  473. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/fiber.rbs +570 -0
  474. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/fiber_error.rbs +11 -0
  475. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/file.rbs +2045 -0
  476. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/file_constants.rbs +463 -0
  477. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/file_stat.rbs +534 -0
  478. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/file_test.rbs +331 -0
  479. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/float.rbs +1292 -0
  480. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/gc.rbs +788 -0
  481. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/global_variables.rbs +184 -0
  482. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/hash.rbs +2183 -0
  483. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/integer.rbs +1374 -0
  484. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/io/buffer.rbs +995 -0
  485. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/io/wait.rbs +48 -0
  486. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/io.rbs +3473 -0
  487. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/kernel.rbs +3172 -0
  488. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/marshal.rbs +207 -0
  489. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/match_data.rbs +637 -0
  490. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/math.rbs +770 -0
  491. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/method.rbs +422 -0
  492. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/module.rbs +1856 -0
  493. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/nil_class.rbs +210 -0
  494. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/numeric.rbs +832 -0
  495. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/object.rbs +108 -0
  496. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/object_space/weak_key_map.rbs +166 -0
  497. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/object_space.rbs +197 -0
  498. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/pathname.rbs +1312 -0
  499. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/proc.rbs +905 -0
  500. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/process.rbs +2316 -0
  501. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/ractor.rbs +914 -0
  502. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/random.rbs +255 -0
  503. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/range.rbs +1209 -0
  504. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rational.rbs +502 -0
  505. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rb_config.rbs +88 -0
  506. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rbs/ops.rbs +154 -0
  507. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rbs/unnamed/argf.rbs +1236 -0
  508. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rbs/unnamed/env_class.rbs +1214 -0
  509. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rbs/unnamed/main_class.rbs +123 -0
  510. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rbs/unnamed/random.rbs +186 -0
  511. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/refinement.rbs +59 -0
  512. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/regexp.rbs +1974 -0
  513. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/ruby.rbs +53 -0
  514. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/ruby_vm.rbs +809 -0
  515. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/basic_specification.rbs +6 -0
  516. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/config_file.rbs +38 -0
  517. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/dependency_installer.rbs +6 -0
  518. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/errors.rbs +112 -0
  519. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/installer.rbs +15 -0
  520. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/path_support.rbs +6 -0
  521. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/platform.rbs +7 -0
  522. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/request_set.rbs +49 -0
  523. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/requirement.rbs +138 -0
  524. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/rubygems.rbs +1108 -0
  525. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/source_list.rbs +15 -0
  526. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/specification.rbs +31 -0
  527. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/stream_ui.rbs +5 -0
  528. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/uninstaller.rbs +10 -0
  529. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/version.rbs +133 -0
  530. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/set.rbs +751 -0
  531. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/signal.rbs +110 -0
  532. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/string.rbs +5532 -0
  533. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/struct.rbs +668 -0
  534. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/symbol.rbs +482 -0
  535. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/thread.rbs +1821 -0
  536. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/thread_group.rbs +79 -0
  537. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/time.rbs +1793 -0
  538. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/trace_point.rbs +483 -0
  539. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/true_class.rbs +98 -0
  540. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/unbound_method.rbs +337 -0
  541. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/warning.rbs +87 -0
  542. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/CONTRIBUTING.md +107 -0
  543. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/aliases.md +79 -0
  544. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/architecture.md +110 -0
  545. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/collection.md +192 -0
  546. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/config.md +171 -0
  547. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/data_and_struct.md +86 -0
  548. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/encoding.md +56 -0
  549. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/gem.md +56 -0
  550. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/inline.md +634 -0
  551. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/rbs_by_example.md +309 -0
  552. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/release.md +303 -0
  553. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/repo.md +125 -0
  554. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/rust.md +96 -0
  555. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/sigs.md +167 -0
  556. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/stdlib.md +155 -0
  557. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/syntax.md +952 -0
  558. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/tools.md +17 -0
  559. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/type_fingerprint.md +21 -0
  560. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/wasm_serialization.md +80 -0
  561. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/exe/rbs +7 -0
  562. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/Makefile +273 -0
  563. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/ast_translation.c +1870 -0
  564. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/ast_translation.h +41 -0
  565. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/class_constants.c +189 -0
  566. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/class_constants.h +105 -0
  567. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/compat.h +10 -0
  568. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/extconf.rb +40 -0
  569. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/legacy_location.c +299 -0
  570. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/legacy_location.h +82 -0
  571. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/main.c +649 -0
  572. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/rbs_extension.h +16 -0
  573. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/rbs_string_bridging.c +9 -0
  574. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/rbs_string_bridging.h +24 -0
  575. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/goodcheck.yml +91 -0
  576. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/ast.h +1055 -0
  577. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/defines.h +104 -0
  578. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/lexer.h +208 -0
  579. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/location.h +40 -0
  580. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/parser.h +187 -0
  581. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/serialize.h +39 -0
  582. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/string.h +47 -0
  583. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/util/rbs_allocator.h +59 -0
  584. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/util/rbs_assert.h +20 -0
  585. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/util/rbs_buffer.h +83 -0
  586. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/util/rbs_constant_pool.h +155 -0
  587. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/util/rbs_encoding.h +282 -0
  588. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/util/rbs_unescape.h +24 -0
  589. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs.h +14 -0
  590. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ancestor_graph.rb +92 -0
  591. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/annotate/annotations.rb +199 -0
  592. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/annotate/formatter.rb +82 -0
  593. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/annotate/rdoc_annotator.rb +398 -0
  594. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/annotate/rdoc_source.rb +131 -0
  595. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/annotate.rb +8 -0
  596. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/annotation.rb +29 -0
  597. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/comment.rb +29 -0
  598. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/declarations.rb +472 -0
  599. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/directives.rb +49 -0
  600. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/members.rb +451 -0
  601. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/ruby/annotations.rb +451 -0
  602. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/ruby/comment_block.rb +247 -0
  603. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/ruby/declarations.rb +291 -0
  604. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/ruby/helpers/constant_helper.rb +28 -0
  605. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/ruby/helpers/location_helper.rb +15 -0
  606. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/ruby/members.rb +762 -0
  607. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/type_param.rb +235 -0
  608. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/visitor.rb +137 -0
  609. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/buffer.rb +189 -0
  610. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/builtin_names.rb +58 -0
  611. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/cli/colored_io.rb +48 -0
  612. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/cli/diff.rb +84 -0
  613. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/cli/validate.rb +294 -0
  614. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/cli.rb +1253 -0
  615. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/cleaner.rb +38 -0
  616. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/config/lockfile.rb +92 -0
  617. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/config/lockfile_generator.rb +269 -0
  618. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/config.rb +81 -0
  619. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/installer.rb +32 -0
  620. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/sources/base.rb +14 -0
  621. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/sources/git.rb +265 -0
  622. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/sources/local.rb +81 -0
  623. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/sources/rubygems.rb +48 -0
  624. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/sources/stdlib.rb +50 -0
  625. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/sources.rb +38 -0
  626. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection.rb +16 -0
  627. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/constant.rb +28 -0
  628. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/definition.rb +415 -0
  629. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/definition_builder/ancestor_builder.rb +681 -0
  630. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/definition_builder/method_builder.rb +295 -0
  631. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/definition_builder.rb +1057 -0
  632. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/diff.rb +131 -0
  633. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/environment/class_entry.rb +81 -0
  634. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/environment/module_entry.rb +91 -0
  635. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/environment/use_map.rb +77 -0
  636. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/environment.rb +1028 -0
  637. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/environment_loader.rb +167 -0
  638. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/environment_walker.rb +155 -0
  639. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/errors.rb +634 -0
  640. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/factory.rb +18 -0
  641. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/file_finder.rb +28 -0
  642. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/inline_parser/comment_association.rb +117 -0
  643. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/inline_parser.rb +568 -0
  644. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/location_aux.rb +170 -0
  645. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/locator.rb +247 -0
  646. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/method_type.rb +145 -0
  647. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/namespace.rb +154 -0
  648. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/parser/lex_result.rb +15 -0
  649. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/parser/token.rb +23 -0
  650. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/parser_aux.rb +144 -0
  651. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/helpers.rb +164 -0
  652. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/node_usage.rb +99 -0
  653. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/rb.rb +816 -0
  654. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/rbi.rb +793 -0
  655. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/runtime/helpers.rb +59 -0
  656. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/runtime/reflection.rb +19 -0
  657. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/runtime/value_object_generator.rb +278 -0
  658. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/runtime.rb +680 -0
  659. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/repository.rb +127 -0
  660. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/resolver/constant_resolver.rb +219 -0
  661. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/resolver/type_name_resolver.rb +167 -0
  662. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/rewriter.rb +70 -0
  663. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/sorter.rb +198 -0
  664. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/source.rb +99 -0
  665. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/substitution.rb +83 -0
  666. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/subtractor.rb +204 -0
  667. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/errors.rb +80 -0
  668. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/guaranteed.rb +30 -0
  669. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/hook.rb +212 -0
  670. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/observer.rb +19 -0
  671. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/setup.rb +84 -0
  672. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/setup_helper.rb +50 -0
  673. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/tester.rb +167 -0
  674. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/type_check.rb +457 -0
  675. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test.rb +112 -0
  676. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/type_alias_dependency.rb +100 -0
  677. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/type_alias_regularity.rb +126 -0
  678. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/type_name.rb +122 -0
  679. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/types.rb +1646 -0
  680. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/unit_test/convertibles.rb +177 -0
  681. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/unit_test/spy.rb +138 -0
  682. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/unit_test/type_assertions.rb +383 -0
  683. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/unit_test/with_aliases.rb +145 -0
  684. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/unit_test.rb +6 -0
  685. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/validator.rb +186 -0
  686. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/variance_calculator.rb +189 -0
  687. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/vendorer.rb +71 -0
  688. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/version.rb +5 -0
  689. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/wasm/deserializer.rb +213 -0
  690. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/wasm/location.rb +61 -0
  691. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/wasm/parser.rb +174 -0
  692. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/wasm/runtime.rb +211 -0
  693. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/wasm/serialization_schema.rb +111 -0
  694. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/writer.rb +424 -0
  695. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs.rb +117 -0
  696. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs_extension.so +0 -0
  697. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs_jars.rb +39 -0
  698. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rdoc/discover.rb +20 -0
  699. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rdoc_plugin/parser.rb +168 -0
  700. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/rbs.gemspec +77 -0
  701. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/annotation.json +14 -0
  702. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/comment.json +26 -0
  703. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/decls.json +326 -0
  704. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/function.json +98 -0
  705. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/location.json +56 -0
  706. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/members.json +266 -0
  707. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/methodType.json +50 -0
  708. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/typeParam.json +52 -0
  709. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/types.json +317 -0
  710. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ancestor_builder.rbs +163 -0
  711. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ancestor_graph.rbs +60 -0
  712. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/annotate/annotations.rbs +102 -0
  713. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/annotate/formatter.rbs +24 -0
  714. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/annotate/rdoc_annotater.rbs +85 -0
  715. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/annotate/rdoc_source.rbs +32 -0
  716. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/annotation.rbs +27 -0
  717. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ast/ruby/annotations.rbs +470 -0
  718. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ast/ruby/comment_block.rbs +127 -0
  719. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ast/ruby/declarations.rbs +158 -0
  720. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ast/ruby/helpers/constant_helper.rbs +11 -0
  721. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ast/ruby/helpers/location_helper.rbs +15 -0
  722. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ast/ruby/members.rbs +198 -0
  723. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/buffer.rbs +108 -0
  724. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/builtin_names.rbs +44 -0
  725. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/cli/colored_io.rbs +15 -0
  726. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/cli/diff.rbs +15 -0
  727. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/cli/validate.rbs +47 -0
  728. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/cli.rbs +89 -0
  729. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/collection/cleaner.rbs +13 -0
  730. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/collection/config/lockfile.rbs +74 -0
  731. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/collection/config/lockfile_generator.rbs +68 -0
  732. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/collection/config.rbs +46 -0
  733. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/collection/installer.rbs +17 -0
  734. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/collection/sources.rbs +214 -0
  735. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/collection.rbs +4 -0
  736. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/comment.rbs +26 -0
  737. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/constant.rbs +21 -0
  738. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/declarations.rbs +274 -0
  739. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/definition.rbs +232 -0
  740. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/definition_builder.rbs +181 -0
  741. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/diff.rbs +28 -0
  742. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/directives.rbs +77 -0
  743. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/environment/class_entry.rbs +56 -0
  744. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/environment/module_entry.rbs +65 -0
  745. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/environment.rbs +286 -0
  746. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/environment_loader.rbs +111 -0
  747. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/environment_walker.rbs +65 -0
  748. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/errors.rbs +408 -0
  749. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/factory.rbs +5 -0
  750. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/file_finder.rbs +28 -0
  751. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/inline_parser/comment_association.rbs +71 -0
  752. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/inline_parser.rbs +126 -0
  753. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/location.rbs +135 -0
  754. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/locator.rbs +56 -0
  755. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/manifest.yaml +5 -0
  756. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/members.rbs +258 -0
  757. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/method_builder.rbs +89 -0
  758. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/method_types.rbs +58 -0
  759. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/namespace.rbs +161 -0
  760. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/parser.rbs +164 -0
  761. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/prototype/helpers.rbs +29 -0
  762. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/prototype/node_usage.rbs +20 -0
  763. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/prototype/rb.rbs +96 -0
  764. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/prototype/rbi.rbs +104 -0
  765. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/prototype/runtime.rbs +182 -0
  766. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/rbs.rbs +21 -0
  767. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/rdoc/rbs.rbs +67 -0
  768. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/repository.rbs +85 -0
  769. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/resolver/constant_resolver.rbs +92 -0
  770. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/resolver/context.rbs +34 -0
  771. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/resolver/type_name_resolver.rbs +61 -0
  772. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/rewriter.rbs +45 -0
  773. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/shims/bundler.rbs +38 -0
  774. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/shims/enumerable.rbs +5 -0
  775. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/shims/rubygems.rbs +19 -0
  776. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/sorter.rbs +41 -0
  777. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/source.rbs +48 -0
  778. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/substitution.rbs +48 -0
  779. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/subtractor.rbs +37 -0
  780. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/test/errors.rbs +52 -0
  781. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/test/guranteed.rbs +9 -0
  782. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/test/type_check.rbs +19 -0
  783. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/test.rbs +82 -0
  784. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/type_alias_dependency.rbs +53 -0
  785. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/type_alias_regularity.rbs +98 -0
  786. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/type_param.rbs +115 -0
  787. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/typename.rbs +89 -0
  788. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/types.rbs +588 -0
  789. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/unit_test/convertibles.rbs +154 -0
  790. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/unit_test/spy.rbs +22 -0
  791. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/unit_test/type_assertions.rbs +211 -0
  792. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/unit_test/with_aliases.rbs +136 -0
  793. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/use_map.rbs +35 -0
  794. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/util.rbs +9 -0
  795. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/validator.rbs +63 -0
  796. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/variance_calculator.rbs +87 -0
  797. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/vendorer.rbs +51 -0
  798. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/version.rbs +3 -0
  799. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/visitor.rbs +47 -0
  800. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/wasm/deserializer.rbs +66 -0
  801. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/wasm/serialization_schema.rbs +13 -0
  802. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/writer.rbs +127 -0
  803. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/ast.c +1644 -0
  804. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/lexer.c +3223 -0
  805. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/lexer.re +187 -0
  806. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/lexstate.c +222 -0
  807. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/location.c +31 -0
  808. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/parser.c +4318 -0
  809. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/serialize.c +965 -0
  810. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/string.c +41 -0
  811. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/util/rbs_allocator.c +171 -0
  812. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/util/rbs_assert.c +19 -0
  813. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/util/rbs_buffer.c +54 -0
  814. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/util/rbs_constant_pool.c +268 -0
  815. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/util/rbs_encoding.c +21454 -0
  816. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/util/rbs_unescape.c +167 -0
  817. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/abbrev/0/abbrev.rbs +66 -0
  818. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/abbrev/0/array.rbs +26 -0
  819. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/base64/0/base64.rbs +355 -0
  820. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/benchmark/0/benchmark.rbs +452 -0
  821. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/bigdecimal/0/big_decimal.rbs +1647 -0
  822. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/bigdecimal-math/0/big_math.rbs +280 -0
  823. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/bigdecimal-math/0/manifest.yaml +2 -0
  824. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/cgi/0/core.rbs +911 -0
  825. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/cgi/0/manifest.yaml +4 -0
  826. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/cgi-escape/0/escape.rbs +171 -0
  827. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/coverage/0/coverage.rbs +266 -0
  828. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/csv/0/csv.rbs +3776 -0
  829. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/csv/0/manifest.yaml +3 -0
  830. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/date/0/date.rbs +1598 -0
  831. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/date/0/date_time.rbs +617 -0
  832. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/date/0/time.rbs +26 -0
  833. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/dbm/0/dbm.rbs +421 -0
  834. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/delegate/0/delegator.rbs +188 -0
  835. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/delegate/0/kernel.rbs +47 -0
  836. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/delegate/0/simple_delegator.rbs +96 -0
  837. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/did_you_mean/0/did_you_mean.rbs +344 -0
  838. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/digest/0/digest.rbs +693 -0
  839. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/erb/0/erb.rbs +933 -0
  840. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/etc/0/etc.rbs +884 -0
  841. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/fileutils/0/fileutils.rbs +1753 -0
  842. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/find/0/find.rbs +49 -0
  843. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/forwardable/0/forwardable.rbs +271 -0
  844. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/io-console/0/io-console.rbs +414 -0
  845. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/ipaddr/0/ipaddr.rbs +431 -0
  846. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/json/0/json.rbs +1963 -0
  847. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/kconv/0/kconv.rbs +166 -0
  848. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/logger/0/formatter.rbs +45 -0
  849. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/logger/0/log_device.rbs +100 -0
  850. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/logger/0/logger.rbs +796 -0
  851. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/logger/0/manifest.yaml +2 -0
  852. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/logger/0/period.rbs +17 -0
  853. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/logger/0/severity.rbs +34 -0
  854. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/kernel.rbs +42 -0
  855. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/abstract_reporter.rbs +52 -0
  856. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/assertion.rbs +17 -0
  857. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/assertions.rbs +590 -0
  858. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/backtrace_filter.rbs +23 -0
  859. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/bench_spec.rbs +102 -0
  860. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/benchmark.rbs +259 -0
  861. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/composite_reporter.rbs +25 -0
  862. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/compress.rbs +13 -0
  863. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/error_on_warning.rbs +3 -0
  864. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/expectation.rbs +2 -0
  865. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/expectations.rbs +21 -0
  866. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/guard.rbs +64 -0
  867. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/mock.rbs +64 -0
  868. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/parallel/executor.rbs +46 -0
  869. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/parallel/test/class_methods.rbs +5 -0
  870. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/parallel/test.rbs +3 -0
  871. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/parallel.rbs +2 -0
  872. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/pride_io.rbs +62 -0
  873. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/pride_lol.rbs +19 -0
  874. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/progress_reporter.rbs +11 -0
  875. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/reportable.rbs +53 -0
  876. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/reporter.rbs +5 -0
  877. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/result.rbs +28 -0
  878. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/runnable.rbs +163 -0
  879. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/skip.rbs +6 -0
  880. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs +48 -0
  881. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/spec/dsl.rbs +129 -0
  882. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/spec.rbs +11 -0
  883. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/statistics_reporter.rbs +81 -0
  884. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/summary_reporter.rbs +18 -0
  885. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/test/lifecycle_hooks.rbs +92 -0
  886. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/test.rbs +69 -0
  887. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/unexpected_error.rbs +12 -0
  888. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/unexpected_warning.rbs +6 -0
  889. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/unit/test_case.rbs +3 -0
  890. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/unit.rbs +4 -0
  891. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest.rbs +115 -0
  892. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/monitor/0/monitor.rbs +363 -0
  893. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/mutex_m/0/mutex_m.rbs +104 -0
  894. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/net-http/0/manifest.yaml +3 -0
  895. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/net-http/0/net-http.rbs +5580 -0
  896. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/net-protocol/0/manifest.yaml +2 -0
  897. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/net-protocol/0/net-protocol.rbs +56 -0
  898. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/net-smtp/0/manifest.yaml +2 -0
  899. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/net-smtp/0/net-smtp.rbs +55 -0
  900. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/nkf/0/nkf.rbs +402 -0
  901. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/objspace/0/objspace.rbs +470 -0
  902. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/observable/0/observable.rbs +217 -0
  903. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/open-uri/0/manifest.yaml +4 -0
  904. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/open-uri/0/open-uri.rbs +433 -0
  905. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/open3/0/open3.rbs +606 -0
  906. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/openssl/0/manifest.yaml +3 -0
  907. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/openssl/0/openssl.rbs +12237 -0
  908. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/optparse/0/optparse.rbs +1734 -0
  909. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/pathname/0/pathname.rbs +36 -0
  910. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/pp/0/manifest.yaml +2 -0
  911. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/pp/0/pp.rbs +301 -0
  912. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/prettyprint/0/prettyprint.rbs +383 -0
  913. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/pstore/0/pstore.rbs +608 -0
  914. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/psych/0/core_ext.rbs +12 -0
  915. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/psych/0/dbm.rbs +237 -0
  916. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/psych/0/manifest.yaml +3 -0
  917. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/psych/0/psych.rbs +455 -0
  918. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/psych/0/store.rbs +57 -0
  919. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/pty/0/pty.rbs +240 -0
  920. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/random-formatter/0/random-formatter.rbs +277 -0
  921. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/code_object.rbs +52 -0
  922. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/comment.rbs +61 -0
  923. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/context.rbs +153 -0
  924. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/markup.rbs +117 -0
  925. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/options.rbs +76 -0
  926. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/parser.rbs +56 -0
  927. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/rdoc.rbs +393 -0
  928. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/ri.rbs +17 -0
  929. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/store.rbs +48 -0
  930. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/top_level.rbs +97 -0
  931. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/resolv/0/manifest.yaml +3 -0
  932. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/resolv/0/resolv.rbs +1787 -0
  933. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/ripper/0/ripper.rbs +1654 -0
  934. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/securerandom/0/manifest.yaml +2 -0
  935. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/securerandom/0/securerandom.rbs +49 -0
  936. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/shellwords/0/shellwords.rbs +229 -0
  937. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/singleton/0/singleton.rbs +137 -0
  938. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/addrinfo.rbs +666 -0
  939. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/basic_socket.rbs +590 -0
  940. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/constants.rbs +2295 -0
  941. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/ip_socket.rbs +94 -0
  942. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/socket.rbs +4170 -0
  943. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/socket_error.rbs +5 -0
  944. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/tcp_server.rbs +192 -0
  945. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/tcp_socket.rbs +87 -0
  946. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/udp_socket.rbs +133 -0
  947. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/unix_server.rbs +169 -0
  948. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/unix_socket.rbs +172 -0
  949. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/stringio/0/stringio.rbs +1682 -0
  950. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/strscan/0/string_scanner.rbs +1648 -0
  951. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/tempfile/0/manifest.yaml +3 -0
  952. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/tempfile/0/tempfile.rbs +483 -0
  953. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/time/0/time.rbs +434 -0
  954. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/timeout/0/timeout.rbs +132 -0
  955. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/tmpdir/0/tmpdir.rbs +69 -0
  956. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/tsort/0/cyclic.rbs +8 -0
  957. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/tsort/0/interfaces.rbs +20 -0
  958. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/tsort/0/tsort.rbs +410 -0
  959. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/common.rbs +621 -0
  960. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/file.rbs +118 -0
  961. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/ftp.rbs +13 -0
  962. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/generic.rbs +1111 -0
  963. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/http.rbs +104 -0
  964. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/https.rbs +14 -0
  965. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/ldap.rbs +230 -0
  966. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/ldaps.rbs +14 -0
  967. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/mailto.rbs +92 -0
  968. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/rfc2396_parser.rbs +189 -0
  969. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/rfc3986_parser.rbs +2 -0
  970. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/ws.rbs +13 -0
  971. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/wss.rbs +9 -0
  972. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/yaml/0/manifest.yaml +2 -0
  973. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/yaml/0/yaml.rbs +1 -0
  974. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/buf_error.rbs +10 -0
  975. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/data_error.rbs +10 -0
  976. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/deflate.rbs +211 -0
  977. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/error.rbs +20 -0
  978. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/gzip_file/crc_error.rbs +12 -0
  979. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/gzip_file/error.rbs +23 -0
  980. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/gzip_file/length_error.rbs +12 -0
  981. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/gzip_file/no_footer.rbs +11 -0
  982. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/gzip_file.rbs +156 -0
  983. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/gzip_reader.rbs +293 -0
  984. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/gzip_writer.rbs +169 -0
  985. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/inflate.rbs +180 -0
  986. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/mem_error.rbs +10 -0
  987. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/need_dict.rbs +13 -0
  988. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/stream_end.rbs +11 -0
  989. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/stream_error.rbs +11 -0
  990. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/version_error.rbs +11 -0
  991. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/zlib.rbs +449 -0
  992. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/zstream.rbs +200 -0
  993. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/wasm/README.md +109 -0
  994. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/wasm/rbs_wasm.c +479 -0
  995. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/LICENSE +19 -0
  996. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/README.md +135 -0
  997. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/datetime.rb +54 -0
  998. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/dumper.rb +182 -0
  999. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/errors.rb +17 -0
  1000. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/inline_table.rb +18 -0
  1001. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/keyvalue.rb +45 -0
  1002. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/parser.rb +296 -0
  1003. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/string.rb +41 -0
  1004. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/table.rb +34 -0
  1005. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/table_array.rb +43 -0
  1006. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/version.rb +5 -0
  1007. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb.rb +90 -0
  1008. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/Gemfile +4 -0
  1009. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/LICENSE.txt +22 -0
  1010. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/README.md +72 -0
  1011. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/Rakefile +10 -0
  1012. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/bin/console +14 -0
  1013. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/bin/setup +8 -0
  1014. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/lib/tsort.rb +455 -0
  1015. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/tsort.gemspec +29 -0
  1016. data/vendor/bundle/ruby/3.4.0/specifications/drb-2.2.3.gemspec +22 -0
  1017. data/vendor/bundle/ruby/3.4.0/specifications/logger-1.7.0.gemspec +22 -0
  1018. data/vendor/bundle/ruby/3.4.0/specifications/minitest-6.0.6.gemspec +35 -0
  1019. data/vendor/bundle/ruby/3.4.0/specifications/prism-1.9.0.gemspec +24 -0
  1020. data/vendor/bundle/ruby/3.4.0/specifications/rake-13.4.2.gemspec +26 -0
  1021. data/vendor/bundle/ruby/3.4.0/specifications/rake-compiler-1.3.2.gemspec +33 -0
  1022. data/vendor/bundle/ruby/3.4.0/specifications/rake-compiler-dock-1.12.0.gemspec +28 -0
  1023. data/vendor/bundle/ruby/3.4.0/specifications/rb_sys-0.9.130.gemspec +29 -0
  1024. data/vendor/bundle/ruby/3.4.0/specifications/rbs-4.2.0.gemspec +33 -0
  1025. data/vendor/bundle/ruby/3.4.0/specifications/toml-rb-6.0.0.gemspec +27 -0
  1026. data/vendor/bundle/ruby/3.4.0/specifications/tsort-0.2.0.gemspec +23 -0
  1027. data/vendor/cache/Cargo.toml +21 -0
  1028. data/vendor/cache/LICENSE +21 -0
  1029. data/vendor/cache/README.md +5 -0
  1030. data/vendor/cache/src/hash.rs +85 -0
  1031. data/vendor/cache/src/lib.rs +751 -0
  1032. data/vendor/cache/src/loom_tests.rs +340 -0
  1033. data/vendor/cache/src/s3fifo.rs +648 -0
  1034. data/vendor/cache/src/sync.rs +25 -0
  1035. data/vendor/cache/src/tests.rs +260 -0
  1036. data/vendor/compaction/Cargo.toml +32 -0
  1037. data/vendor/compaction/LICENSE +21 -0
  1038. data/vendor/compaction/README.md +5 -0
  1039. data/vendor/compaction/src/blob.rs +478 -0
  1040. data/vendor/compaction/src/cursor.rs +700 -0
  1041. data/vendor/compaction/src/gc.rs +802 -0
  1042. data/vendor/compaction/src/job.rs +861 -0
  1043. data/vendor/compaction/src/lib.rs +102 -0
  1044. data/vendor/compaction/src/merge.rs +995 -0
  1045. data/vendor/compaction/src/picker.rs +681 -0
  1046. data/vendor/compaction/src/resolver.rs +1346 -0
  1047. data/vendor/engine/Cargo.toml +56 -0
  1048. data/vendor/engine/LICENSE +21 -0
  1049. data/vendor/engine/README.md +5 -0
  1050. data/vendor/engine/src/admission.rs +421 -0
  1051. data/vendor/engine/src/catalog.rs +1233 -0
  1052. data/vendor/engine/src/check.rs +1386 -0
  1053. data/vendor/engine/src/clock.rs +244 -0
  1054. data/vendor/engine/src/clock_loom.rs +482 -0
  1055. data/vendor/engine/src/close_gate.rs +325 -0
  1056. data/vendor/engine/src/compact.rs +1509 -0
  1057. data/vendor/engine/src/engine/hooks.rs +1654 -0
  1058. data/vendor/engine/src/engine/info.rs +229 -0
  1059. data/vendor/engine/src/engine.rs +6114 -0
  1060. data/vendor/engine/src/error.rs +490 -0
  1061. data/vendor/engine/src/feed.rs +960 -0
  1062. data/vendor/engine/src/feed_reader.rs +1600 -0
  1063. data/vendor/engine/src/flush.rs +839 -0
  1064. data/vendor/engine/src/flushed_roots.rs +158 -0
  1065. data/vendor/engine/src/flushed_through_loom.rs +77 -0
  1066. data/vendor/engine/src/health.rs +201 -0
  1067. data/vendor/engine/src/large.rs +372 -0
  1068. data/vendor/engine/src/large_settle.rs +201 -0
  1069. data/vendor/engine/src/lib.rs +112 -0
  1070. data/vendor/engine/src/load_slot.rs +324 -0
  1071. data/vendor/engine/src/maintenance.rs +935 -0
  1072. data/vendor/engine/src/manifest/flight.rs +563 -0
  1073. data/vendor/engine/src/manifest.rs +1516 -0
  1074. data/vendor/engine/src/nonblocking.rs +603 -0
  1075. data/vendor/engine/src/options.rs +334 -0
  1076. data/vendor/engine/src/position.rs +125 -0
  1077. data/vendor/engine/src/purge_guard.rs +220 -0
  1078. data/vendor/engine/src/read/keys.rs +1049 -0
  1079. data/vendor/engine/src/read/knn.rs +423 -0
  1080. data/vendor/engine/src/read/reduce.rs +2057 -0
  1081. data/vendor/engine/src/read/traverse.rs +1013 -0
  1082. data/vendor/engine/src/read.rs +2429 -0
  1083. data/vendor/engine/src/row_cache.rs +1101 -0
  1084. data/vendor/engine/src/shard/tablets.rs +3582 -0
  1085. data/vendor/engine/src/shard.rs +12215 -0
  1086. data/vendor/engine/src/snapshot.rs +1429 -0
  1087. data/vendor/engine/src/source.rs +1379 -0
  1088. data/vendor/engine/src/timer_state.rs +226 -0
  1089. data/vendor/engine/src/waker.rs +124 -0
  1090. data/vendor/engine/src/watermark_waiters.rs +674 -0
  1091. data/vendor/engine/src/write.rs +1321 -0
  1092. data/vendor/format/Cargo.toml +40 -0
  1093. data/vendor/format/LICENSE +21 -0
  1094. data/vendor/format/README.md +5 -0
  1095. data/vendor/format/src/blob.rs +101 -0
  1096. data/vendor/format/src/block.rs +1120 -0
  1097. data/vendor/format/src/bloom.rs +456 -0
  1098. data/vendor/format/src/buckets.rs +552 -0
  1099. data/vendor/format/src/bytes.rs +101 -0
  1100. data/vendor/format/src/checksum.rs +132 -0
  1101. data/vendor/format/src/compress.rs +196 -0
  1102. data/vendor/format/src/cursor.rs +110 -0
  1103. data/vendor/format/src/distance.rs +598 -0
  1104. data/vendor/format/src/error.rs +93 -0
  1105. data/vendor/format/src/exact.rs +602 -0
  1106. data/vendor/format/src/feed.rs +285 -0
  1107. data/vendor/format/src/filter.rs +157 -0
  1108. data/vendor/format/src/half.rs +182 -0
  1109. data/vendor/format/src/hash.rs +127 -0
  1110. data/vendor/format/src/hll.rs +500 -0
  1111. data/vendor/format/src/ids.rs +95 -0
  1112. data/vendor/format/src/key.rs +620 -0
  1113. data/vendor/format/src/kind_params.rs +101 -0
  1114. data/vendor/format/src/lib.rs +54 -0
  1115. data/vendor/format/src/manifest.rs +1287 -0
  1116. data/vendor/format/src/roaring.rs +865 -0
  1117. data/vendor/format/src/scan.rs +297 -0
  1118. data/vendor/format/src/shm.rs +805 -0
  1119. data/vendor/format/src/sst.rs +233 -0
  1120. data/vendor/format/src/superblock.rs +345 -0
  1121. data/vendor/format/src/value.rs +163 -0
  1122. data/vendor/format/src/varint.rs +87 -0
  1123. data/vendor/format/src/vector.rs +936 -0
  1124. data/vendor/format/src/version.rs +92 -0
  1125. data/vendor/format/src/wal.rs +999 -0
  1126. data/vendor/io/Cargo.toml +29 -0
  1127. data/vendor/io/LICENSE +21 -0
  1128. data/vendor/io/README.md +5 -0
  1129. data/vendor/io/src/async_poll.rs +44 -0
  1130. data/vendor/io/src/buf.rs +694 -0
  1131. data/vendor/io/src/completion.rs +444 -0
  1132. data/vendor/io/src/error.rs +110 -0
  1133. data/vendor/io/src/file.rs +206 -0
  1134. data/vendor/io/src/lib.rs +53 -0
  1135. data/vendor/io/src/nowait.rs +256 -0
  1136. data/vendor/io/src/os/mod.rs +149 -0
  1137. data/vendor/io/src/os/unix.rs +897 -0
  1138. data/vendor/io/src/os/windows.rs +552 -0
  1139. data/vendor/io/src/own.rs +257 -0
  1140. data/vendor/io/src/pread.rs +854 -0
  1141. data/vendor/io/src/ring_wake.rs +113 -0
  1142. data/vendor/io/src/shared.rs +410 -0
  1143. data/vendor/io/src/sim.rs +1545 -0
  1144. data/vendor/io/src/sys.rs +214 -0
  1145. data/vendor/io/src/uring.rs +1839 -0
  1146. data/vendor/io/src/vfs.rs +154 -0
  1147. data/vendor/memory/Cargo.toml +34 -0
  1148. data/vendor/memory/LICENSE +21 -0
  1149. data/vendor/memory/README.md +11 -0
  1150. data/vendor/memory/src/consolidate.rs +640 -0
  1151. data/vendor/memory/src/dedup.rs +231 -0
  1152. data/vendor/memory/src/error.rs +131 -0
  1153. data/vendor/memory/src/feed_loop.rs +572 -0
  1154. data/vendor/memory/src/forget.rs +724 -0
  1155. data/vendor/memory/src/hooks.rs +109 -0
  1156. data/vendor/memory/src/ivf.rs +204 -0
  1157. data/vendor/memory/src/layout.rs +340 -0
  1158. data/vendor/memory/src/lib.rs +61 -0
  1159. data/vendor/memory/src/recall.rs +1182 -0
  1160. data/vendor/memory/src/store.rs +1785 -0
  1161. data/vendor/memory/src/watch.rs +339 -0
  1162. data/vendor/memtable/Cargo.toml +24 -0
  1163. data/vendor/memtable/LICENSE +21 -0
  1164. data/vendor/memtable/README.md +5 -0
  1165. data/vendor/memtable/src/lib.rs +1658 -0
  1166. data/vendor/memtable/src/loom_tests.rs +274 -0
  1167. data/vendor/memtable/src/mem.rs +344 -0
  1168. data/vendor/memtable/src/tests.rs +1061 -0
  1169. data/vendor/pager/Cargo.toml +23 -0
  1170. data/vendor/pager/LICENSE +21 -0
  1171. data/vendor/pager/README.md +5 -0
  1172. data/vendor/pager/src/alloc.rs +1008 -0
  1173. data/vendor/pager/src/lib.rs +1710 -0
  1174. data/vendor/pigeonhole/Cargo.toml +42 -0
  1175. data/vendor/pigeonhole/LICENSE +21 -0
  1176. data/vendor/pigeonhole/README.md +99 -0
  1177. data/vendor/pigeonhole/src/cell.rs +829 -0
  1178. data/vendor/pigeonhole/src/check.rs +368 -0
  1179. data/vendor/pigeonhole/src/db.rs +2324 -0
  1180. data/vendor/pigeonhole/src/doc_support.rs +89 -0
  1181. data/vendor/pigeonhole/src/error.rs +257 -0
  1182. data/vendor/pigeonhole/src/feed.rs +696 -0
  1183. data/vendor/pigeonhole/src/info.rs +425 -0
  1184. data/vendor/pigeonhole/src/lib.rs +202 -0
  1185. data/vendor/pigeonhole/src/merge.rs +135 -0
  1186. data/vendor/pigeonhole/src/metrics.rs +476 -0
  1187. data/vendor/pigeonhole/src/nonblocking.rs +666 -0
  1188. data/vendor/pigeonhole/src/options.rs +2075 -0
  1189. data/vendor/pigeonhole/src/read/budget.rs +584 -0
  1190. data/vendor/pigeonhole/src/read.rs +2463 -0
  1191. data/vendor/pigeonhole/src/recovery.rs +876 -0
  1192. data/vendor/pigeonhole/src/retry.rs +358 -0
  1193. data/vendor/pigeonhole/src/set.rs +103 -0
  1194. data/vendor/pigeonhole/src/table.rs +861 -0
  1195. data/vendor/pigeonhole/src/vector.rs +351 -0
  1196. data/vendor/pigeonhole/src/write.rs +2815 -0
  1197. data/vendor/runtime/Cargo.toml +21 -0
  1198. data/vendor/runtime/LICENSE +21 -0
  1199. data/vendor/runtime/README.md +5 -0
  1200. data/vendor/runtime/src/completion.rs +629 -0
  1201. data/vendor/runtime/src/drivers.rs +1175 -0
  1202. data/vendor/runtime/src/lib.rs +1546 -0
  1203. data/vendor/runtime/src/pool.rs +992 -0
  1204. data/vendor/runtime/src/sched.rs +809 -0
  1205. data/vendor/runtime/src/signal.rs +532 -0
  1206. data/vendor/runtime/src/submit_gate.rs +144 -0
  1207. data/vendor/shm/Cargo.toml +24 -0
  1208. data/vendor/shm/LICENSE +21 -0
  1209. data/vendor/shm/README.md +5 -0
  1210. data/vendor/shm/src/lib.rs +427 -0
  1211. data/vendor/shm/src/lock.rs +153 -0
  1212. data/vendor/shm/src/region.rs +1609 -0
  1213. data/vendor/sst/Cargo.toml +26 -0
  1214. data/vendor/sst/LICENSE +21 -0
  1215. data/vendor/sst/README.md +5 -0
  1216. data/vendor/sst/src/blob.rs +380 -0
  1217. data/vendor/sst/src/iter.rs +803 -0
  1218. data/vendor/sst/src/lib.rs +695 -0
  1219. data/vendor/sst/src/reader.rs +814 -0
  1220. data/vendor/sst/src/writer.rs +596 -0
  1221. data/vendor/text/Cargo.toml +26 -0
  1222. data/vendor/text/LICENSE +21 -0
  1223. data/vendor/text/README.md +9 -0
  1224. data/vendor/text/src/error.rs +108 -0
  1225. data/vendor/text/src/fuzzy.rs +265 -0
  1226. data/vendor/text/src/highlight.rs +236 -0
  1227. data/vendor/text/src/index.rs +1152 -0
  1228. data/vendor/text/src/layout.rs +424 -0
  1229. data/vendor/text/src/lib.rs +75 -0
  1230. data/vendor/text/src/maxscore.rs +658 -0
  1231. data/vendor/text/src/query.rs +450 -0
  1232. data/vendor/text/src/search.rs +569 -0
  1233. data/vendor/text/src/sloppy.rs +460 -0
  1234. data/vendor/text/src/tokenizer.rs +163 -0
  1235. data/vendor/vector/Cargo.toml +28 -0
  1236. data/vendor/vector/LICENSE +21 -0
  1237. data/vendor/vector/README.md +9 -0
  1238. data/vendor/vector/src/error.rs +63 -0
  1239. data/vendor/vector/src/half.rs +167 -0
  1240. data/vendor/vector/src/hooks.rs +135 -0
  1241. data/vendor/vector/src/index.rs +2690 -0
  1242. data/vendor/vector/src/layout.rs +102 -0
  1243. data/vendor/vector/src/lib.rs +52 -0
  1244. data/vendor/vector/src/point.rs +500 -0
  1245. data/vendor/vector/src/rebalancer.rs +200 -0
  1246. data/vendor/vector/src/registry.rs +81 -0
  1247. data/vendor/wal/Cargo.toml +25 -0
  1248. data/vendor/wal/LICENSE +21 -0
  1249. data/vendor/wal/README.md +5 -0
  1250. data/vendor/wal/src/feed.rs +610 -0
  1251. data/vendor/wal/src/foreground.rs +122 -0
  1252. data/vendor/wal/src/lib.rs +458 -0
  1253. data/vendor/wal/src/mem.rs +166 -0
  1254. data/vendor/wal/src/recovery.rs +426 -0
  1255. data/vendor/wal/src/stream.rs +2382 -0
  1256. metadata +1310 -0
@@ -0,0 +1,3473 @@
1
+ # <!-- rdoc-file=io.c -->
2
+ # An instance of class IO (commonly called a *stream*) represents an
3
+ # input/output stream in the underlying operating system. Class IO is the basis
4
+ # for input and output in Ruby.
5
+ #
6
+ # Class File is the only class in the Ruby core that is a subclass of IO. Some
7
+ # classes in the Ruby standard library are also subclasses of IO; these include
8
+ # TCPSocket and UDPSocket.
9
+ #
10
+ # The global constant ARGF (also accessible as <code>$<</code>) provides an
11
+ # IO-like stream that allows access to all file paths found in ARGV (or found in
12
+ # STDIN if ARGV is empty). ARGF is not itself a subclass of IO.
13
+ #
14
+ # Class StringIO provides an IO-like stream that handles a String. StringIO is
15
+ # not itself a subclass of IO.
16
+ #
17
+ # Important objects based on IO include:
18
+ #
19
+ # * $stdin.
20
+ # * $stdout.
21
+ # * $stderr.
22
+ # * Instances of class File.
23
+ #
24
+ # An instance of IO may be created using:
25
+ #
26
+ # * IO.new: returns a new IO object for the given integer file descriptor.
27
+ # * IO.open: passes a new IO object to the given block.
28
+ # * IO.popen: returns a new IO object that is connected to the $stdin and
29
+ # $stdout of a newly-launched subprocess.
30
+ # * Kernel#open: Returns a new IO object connected to a given source: stream,
31
+ # file, or subprocess.
32
+ #
33
+ # Like a File stream, an IO stream has:
34
+ #
35
+ # * A read/write mode, which may be read-only, write-only, or read/write; see
36
+ # [Read/Write Mode](rdoc-ref:File@Read-2FWrite+Mode).
37
+ # * A data mode, which may be text-only or binary; see [Data
38
+ # Mode](rdoc-ref:File@Data+Mode).
39
+ # * Internal and external encodings; see [Encodings](rdoc-ref:File@Encodings).
40
+ #
41
+ # And like other IO streams, it has:
42
+ #
43
+ # * A position, which determines where in the stream the next read or write is
44
+ # to occur; see [Position](rdoc-ref:IO@Position).
45
+ # * A line number, which is a special, line-oriented, "position" (different
46
+ # from the position mentioned above); see [Line
47
+ # Number](rdoc-ref:IO@Line+Number).
48
+ #
49
+ # ## Extension <code>io/console</code>
50
+ #
51
+ # Extension <code>io/console</code> provides numerous methods for interacting
52
+ # with the console; requiring it adds numerous methods to class IO.
53
+ #
54
+ # ## Example Files
55
+ #
56
+ # Many examples here use these variables:
57
+ #
58
+ # # English text with newlines.
59
+ # text = <<~EOT
60
+ # First line
61
+ # Second line
62
+ #
63
+ # Fourth line
64
+ # Fifth line
65
+ # EOT
66
+ #
67
+ # # Russian text.
68
+ # russian = "\u{442 435 441 442}" # => "тест"
69
+ #
70
+ # # Binary data.
71
+ # data = "\u9990\u9991\u9992\u9993\u9994"
72
+ #
73
+ # # Text file.
74
+ # File.write('t.txt', text)
75
+ #
76
+ # # File with Russian text.
77
+ # File.write('t.rus', russian)
78
+ #
79
+ # # File with binary data.
80
+ # f = File.new('t.dat', 'wb:UTF-16')
81
+ # f.write(data)
82
+ # f.close
83
+ #
84
+ # ## Open Options
85
+ #
86
+ # A number of IO methods accept optional keyword arguments that determine how a
87
+ # new stream is to be opened:
88
+ #
89
+ # * <code>:mode</code>: Stream mode.
90
+ # * <code>:flags</code>: Integer file open flags; If `mode` is also given, the
91
+ # two are bitwise-ORed.
92
+ # * <code>:external_encoding</code>: External encoding for the stream.
93
+ # * <code>:internal_encoding</code>: Internal encoding for the stream.
94
+ # <code>'-'</code> is a synonym for the default internal encoding. If the
95
+ # value is `nil` no conversion occurs.
96
+ # * <code>:encoding</code>: Specifies external and internal encodings as
97
+ # <code>'extern:intern'</code>.
98
+ # * <code>:textmode</code>: If a truthy value, specifies the mode as
99
+ # text-only, binary otherwise.
100
+ # * <code>:binmode</code>: If a truthy value, specifies the mode as binary,
101
+ # text-only otherwise.
102
+ # * <code>:autoclose</code>: If a truthy value, specifies that the `fd` will
103
+ # close when the stream closes; otherwise it remains open.
104
+ # * <code>:path:</code> If a string value is provided, it is used in #inspect
105
+ # and is available as #path method.
106
+ #
107
+ # Also available are the options offered in String#encode, which may control
108
+ # conversion between external and internal encoding.
109
+ #
110
+ # ## Basic IO
111
+ #
112
+ # You can perform basic stream IO with these methods, which typically operate on
113
+ # multi-byte strings:
114
+ #
115
+ # * IO#read: Reads and returns some or all of the remaining bytes from the
116
+ # stream.
117
+ # * IO#write: Writes zero or more strings to the stream; each given object
118
+ # that is not already a string is converted via `to_s`.
119
+ #
120
+ # ### Position
121
+ #
122
+ # An IO stream has a nonnegative integer *position*, which is the byte offset at
123
+ # which the next read or write is to occur. A new stream has position zero (and
124
+ # line number zero); method `rewind` resets the position (and line number) to
125
+ # zero.
126
+ #
127
+ # These methods discard [buffers](rdoc-ref:IO@Buffering) and the
128
+ # Encoding::Converter instances used for that IO.
129
+ #
130
+ # The relevant methods:
131
+ #
132
+ # * IO#tell (aliased as <code>#pos</code>): Returns the current position (in
133
+ # bytes) in the stream.
134
+ # * IO#pos=: Sets the position of the stream to a given integer `new_position`
135
+ # (in bytes).
136
+ # * IO#seek: Sets the position of the stream to a given integer `offset` (in
137
+ # bytes), relative to a given position `whence` (indicating the beginning,
138
+ # end, or current position).
139
+ # * IO#rewind: Positions the stream at the beginning (also resetting the line
140
+ # number).
141
+ #
142
+ # ### Open and Closed Streams
143
+ #
144
+ # A new IO stream may be open for reading, open for writing, or both.
145
+ #
146
+ # A stream is automatically closed when claimed by the garbage collector.
147
+ #
148
+ # Attempted reading or writing on a closed stream raises an exception.
149
+ #
150
+ # The relevant methods:
151
+ #
152
+ # * IO#close: Closes the stream for both reading and writing.
153
+ # * IO#close_read: Closes the stream for reading.
154
+ # * IO#close_write: Closes the stream for writing.
155
+ # * IO#closed?: Returns whether the stream is closed.
156
+ #
157
+ # ### End-of-Stream
158
+ #
159
+ # You can query whether a stream is positioned at its end:
160
+ #
161
+ # * IO#eof? (also aliased as <code>#eof</code>): Returns whether the stream is
162
+ # at end-of-stream.
163
+ #
164
+ # You can reposition to end-of-stream by using method IO#seek:
165
+ #
166
+ # f = File.new('t.txt')
167
+ # f.eof? # => false
168
+ # f.seek(0, :END)
169
+ # f.eof? # => true
170
+ # f.close
171
+ #
172
+ # Or by reading all stream content (which is slower than using IO#seek):
173
+ #
174
+ # f.rewind
175
+ # f.eof? # => false
176
+ # f.read # => "First line\nSecond line\n\nFourth line\nFifth line\n"
177
+ # f.eof? # => true
178
+ #
179
+ # ## Line IO
180
+ #
181
+ # Class IO supports line-oriented [input](rdoc-ref:IO@Line+Input) and
182
+ # [output](rdoc-ref:IO@Line+Output)
183
+ #
184
+ # ### Line Input
185
+ #
186
+ # Class IO supports line-oriented input for [files](rdoc-ref:IO@File+Line+Input)
187
+ # and [IO streams](rdoc-ref:IO@Stream+Line+Input)
188
+ #
189
+ # #### File Line Input
190
+ #
191
+ # You can read lines from a file using these methods:
192
+ #
193
+ # * IO.foreach: Reads each line and passes it to the given block.
194
+ # * IO.readlines: Reads and returns all lines in an array.
195
+ #
196
+ # For each of these methods:
197
+ #
198
+ # * You can specify [open options](rdoc-ref:IO@Open+Options).
199
+ # * Line parsing depends on the effective *line separator*; see [Line
200
+ # Separator](rdoc-ref:IO@Line+Separator).
201
+ # * The length of each returned line depends on the effective *line limit*;
202
+ # see [Line Limit](rdoc-ref:IO@Line+Limit).
203
+ #
204
+ # #### Stream Line Input
205
+ #
206
+ # You can read lines from an IO stream using these methods:
207
+ #
208
+ # * IO#each_line: Reads each remaining line, passing it to the given block.
209
+ # * IO#gets: Returns the next line.
210
+ # * IO#readline: Like #gets, but raises an exception at end-of-stream.
211
+ # * IO#readlines: Returns all remaining lines in an array.
212
+ #
213
+ # For each of these methods:
214
+ #
215
+ # * Reading may begin mid-line, depending on the stream's *position*; see
216
+ # [Position](rdoc-ref:IO@Position).
217
+ # * Line parsing depends on the effective *line separator*; see [Line
218
+ # Separator](rdoc-ref:IO@Line+Separator).
219
+ # * The length of each returned line depends on the effective *line limit*;
220
+ # see [Line Limit](rdoc-ref:IO@Line+Limit).
221
+ #
222
+ # ##### Line Separator
223
+ #
224
+ # Each of the [line input methods](rdoc-ref:IO@Line+Input) uses a *line
225
+ # separator*: the string that determines what is considered a line; it is
226
+ # sometimes called the *input record separator*.
227
+ #
228
+ # The default line separator is taken from global variable <code>$/</code>,
229
+ # whose initial value is <code>"\n"</code>.
230
+ #
231
+ # Generally, the line to be read next is all data from the current
232
+ # [position](rdoc-ref:IO@Position) to the next line separator (but see [Special
233
+ # Line Separator Values](rdoc-ref:IO@Special+Line+Separator+Values)):
234
+ #
235
+ # f = File.new('t.txt')
236
+ # # Method gets with no sep argument returns the next line, according to $/.
237
+ # f.gets # => "First line\n"
238
+ # f.gets # => "Second line\n"
239
+ # f.gets # => "\n"
240
+ # f.gets # => "Fourth line\n"
241
+ # f.gets # => "Fifth line\n"
242
+ # f.close
243
+ #
244
+ # You can use a different line separator by passing argument `sep`:
245
+ #
246
+ # f = File.new('t.txt')
247
+ # f.gets('l') # => "First l"
248
+ # f.gets('li') # => "ine\nSecond li"
249
+ # f.gets('lin') # => "ne\n\nFourth lin"
250
+ # f.gets # => "e\n"
251
+ # f.close
252
+ #
253
+ # Or by setting global variable <code>$/</code>:
254
+ #
255
+ # f = File.new('t.txt')
256
+ # $/ = 'l'
257
+ # f.gets # => "First l"
258
+ # f.gets # => "ine\nSecond l"
259
+ # f.gets # => "ine\n\nFourth l"
260
+ # f.close
261
+ #
262
+ # ##### Special Line Separator Values
263
+ #
264
+ # Each of the [line input methods](rdoc-ref:IO@Line+Input) accepts two special
265
+ # values for parameter `sep`:
266
+ #
267
+ # * `nil`: The entire stream is to be read ("slurped") into a single string:
268
+ #
269
+ # f = File.new('t.txt')
270
+ # f.gets(nil) # => "First line\nSecond line\n\nFourth line\nFifth line\n"
271
+ # f.close
272
+ #
273
+ # * <code>''</code> (the empty string): The next "paragraph" is to be read
274
+ # (paragraphs being separated by two consecutive line separators):
275
+ #
276
+ # f = File.new('t.txt')
277
+ # f.gets('') # => "First line\nSecond line\n\n"
278
+ # f.gets('') # => "Fourth line\nFifth line\n"
279
+ # f.close
280
+ #
281
+ # ##### Line Limit
282
+ #
283
+ # Each of the [line input methods](rdoc-ref:IO@Line+Input) uses an integer *line
284
+ # limit*, which restricts the number of bytes that may be returned. (A
285
+ # multi-byte character will not be split, and so a returned line may be slightly
286
+ # longer than the limit).
287
+ #
288
+ # The default limit value is <code>-1</code>; any negative limit value means
289
+ # that there is no limit.
290
+ #
291
+ # If there is no limit, the line is determined only by `sep`.
292
+ #
293
+ # # Text with 1-byte characters.
294
+ # File.open('t.txt') {|f| f.gets(1) } # => "F"
295
+ # File.open('t.txt') {|f| f.gets(2) } # => "Fi"
296
+ # File.open('t.txt') {|f| f.gets(3) } # => "Fir"
297
+ # File.open('t.txt') {|f| f.gets(4) } # => "Firs"
298
+ # # No more than one line.
299
+ # File.open('t.txt') {|f| f.gets(10) } # => "First line"
300
+ # File.open('t.txt') {|f| f.gets(11) } # => "First line\n"
301
+ # File.open('t.txt') {|f| f.gets(12) } # => "First line\n"
302
+ #
303
+ # # Text with 2-byte characters, which will not be split.
304
+ # File.open('t.rus') {|f| f.gets(1).size } # => 1
305
+ # File.open('t.rus') {|f| f.gets(2).size } # => 1
306
+ # File.open('t.rus') {|f| f.gets(3).size } # => 2
307
+ # File.open('t.rus') {|f| f.gets(4).size } # => 2
308
+ #
309
+ # ##### Line Separator and Line Limit
310
+ #
311
+ # With arguments `sep` and `limit` given, combines the two behaviors:
312
+ #
313
+ # * Returns the next line as determined by line separator `sep`.
314
+ # * But returns no more bytes than are allowed by the limit `limit`.
315
+ #
316
+ # Example:
317
+ #
318
+ # File.open('t.txt') {|f| f.gets('li', 20) } # => "First li"
319
+ # File.open('t.txt') {|f| f.gets('li', 2) } # => "Fi"
320
+ #
321
+ # ##### Line Number
322
+ #
323
+ # A readable IO stream has a non-negative integer *line number*:
324
+ #
325
+ # * IO#lineno: Returns the line number.
326
+ # * IO#lineno=: Resets and returns the line number.
327
+ #
328
+ # Unless modified by a call to method IO#lineno=, the line number is the number
329
+ # of lines read by certain line-oriented methods, according to the effective
330
+ # [line separator](rdoc-ref:IO@Line+Separator):
331
+ #
332
+ # * IO.foreach: Increments the line number on each call to the block.
333
+ # * IO#each_line: Increments the line number on each call to the block.
334
+ # * IO#gets: Increments the line number.
335
+ # * IO#readline: Increments the line number.
336
+ # * IO#readlines: Increments the line number for each line read.
337
+ #
338
+ # A new stream is initially has line number zero (and position zero); method
339
+ # `rewind` resets the line number (and position) to zero:
340
+ #
341
+ # f = File.new('t.txt')
342
+ # f.lineno # => 0
343
+ # f.gets # => "First line\n"
344
+ # f.lineno # => 1
345
+ # f.rewind
346
+ # f.lineno # => 0
347
+ # f.close
348
+ #
349
+ # Reading lines from a stream usually changes its line number:
350
+ #
351
+ # f = File.new('t.txt', 'r')
352
+ # f.lineno # => 0
353
+ # f.readline # => "This is line one.\n"
354
+ # f.lineno # => 1
355
+ # f.readline # => "This is the second line.\n"
356
+ # f.lineno # => 2
357
+ # f.readline # => "Here's the third line.\n"
358
+ # f.lineno # => 3
359
+ # f.eof? # => true
360
+ # f.close
361
+ #
362
+ # Iterating over lines in a stream usually changes its line number:
363
+ #
364
+ # File.open('t.txt') do |f|
365
+ # f.each_line do |line|
366
+ # p "position=#{f.pos} eof?=#{f.eof?} lineno=#{f.lineno}"
367
+ # end
368
+ # end
369
+ #
370
+ # Output:
371
+ #
372
+ # "position=11 eof?=false lineno=1"
373
+ # "position=23 eof?=false lineno=2"
374
+ # "position=24 eof?=false lineno=3"
375
+ # "position=36 eof?=false lineno=4"
376
+ # "position=47 eof?=true lineno=5"
377
+ #
378
+ # Unlike the stream's [position](rdoc-ref:IO@Position), the line number does not
379
+ # affect where the next read or write will occur:
380
+ #
381
+ # f = File.new('t.txt')
382
+ # f.lineno = 1000
383
+ # f.lineno # => 1000
384
+ # f.gets # => "First line\n"
385
+ # f.lineno # => 1001
386
+ # f.close
387
+ #
388
+ # Associated with the line number is the global variable <code>$.</code>:
389
+ #
390
+ # * When a stream is opened, <code>$.</code> is not set; its value is left
391
+ # over from previous activity in the process:
392
+ #
393
+ # $. = 41
394
+ # f = File.new('t.txt')
395
+ # $. = 41
396
+ # # => 41
397
+ # f.close
398
+ #
399
+ # * When a stream is read, <code>$.</code> is set to the line number for that
400
+ # stream:
401
+ #
402
+ # f0 = File.new('t.txt')
403
+ # f1 = File.new('t.dat')
404
+ # f0.readlines # => ["First line\n", "Second line\n", "\n", "Fourth line\n", "Fifth line\n"]
405
+ # $. # => 5
406
+ # f1.readlines # => ["\xFE\xFF\x99\x90\x99\x91\x99\x92\x99\x93\x99\x94"]
407
+ # $. # => 1
408
+ # f0.close
409
+ # f1.close
410
+ #
411
+ # * Methods IO#rewind and IO#seek do not affect <code>$.</code>:
412
+ #
413
+ # f = File.new('t.txt')
414
+ # f.readlines # => ["First line\n", "Second line\n", "\n", "Fourth line\n", "Fifth line\n"]
415
+ # $. # => 5
416
+ # f.rewind
417
+ # f.seek(0, :SET)
418
+ # $. # => 5
419
+ # f.close
420
+ #
421
+ # ### Line Output
422
+ #
423
+ # You can write to an IO stream line-by-line using this method:
424
+ #
425
+ # * IO#puts: Writes objects to the stream.
426
+ #
427
+ # ## Character IO
428
+ #
429
+ # You can process an IO stream character-by-character using these methods:
430
+ #
431
+ # * IO#getc: Reads and returns the next character from the stream.
432
+ # * IO#readchar: Like #getc, but raises an exception at end-of-stream.
433
+ # * IO#ungetc: Pushes back ("unshifts") a character or integer onto the
434
+ # stream.
435
+ # * IO#putc: Writes a character to the stream.
436
+ # * IO#each_char: Reads each remaining character in the stream, passing the
437
+ # character to the given block.
438
+ #
439
+ # ## Byte IO
440
+ #
441
+ # You can process an IO stream byte-by-byte using these methods:
442
+ #
443
+ # * IO#getbyte: Returns the next 8-bit byte as an integer in range 0..255.
444
+ # * IO#readbyte: Like #getbyte, but raises an exception if at end-of-stream.
445
+ # * IO#ungetbyte: Pushes back ("unshifts") a byte back onto the stream.
446
+ # * IO#each_byte: Reads each remaining byte in the stream, passing the byte to
447
+ # the given block.
448
+ #
449
+ # ## Codepoint IO
450
+ #
451
+ # You can process an IO stream codepoint-by-codepoint:
452
+ #
453
+ # * IO#each_codepoint: Reads each remaining codepoint, passing it to the given
454
+ # block.
455
+ #
456
+ # ## What's Here
457
+ #
458
+ # First, what's elsewhere. Class IO:
459
+ #
460
+ # * Inherits from [class Object](rdoc-ref:Object@What-27s+Here).
461
+ # * Includes [module Enumerable](rdoc-ref:Enumerable@What-27s+Here), which
462
+ # provides dozens of additional methods.
463
+ #
464
+ # Here, class IO provides methods that are useful for:
465
+ #
466
+ # * [Creating](rdoc-ref:IO@Creating)
467
+ # * [Reading](rdoc-ref:IO@Reading)
468
+ # * [Writing](rdoc-ref:IO@Writing)
469
+ # * [Positioning](rdoc-ref:IO@Positioning)
470
+ # * [Iterating](rdoc-ref:IO@Iterating)
471
+ # * [Settings](rdoc-ref:IO@Settings)
472
+ # * [Querying](rdoc-ref:IO@Querying)
473
+ # * [Buffering](rdoc-ref:IO@Buffering)
474
+ # * [Low-Level Access](rdoc-ref:IO@Low-Level+Access)
475
+ # * [Other](rdoc-ref:IO@Other)
476
+ #
477
+ # ### Creating
478
+ #
479
+ # * ::new (aliased as ::for_fd): Creates and returns a new IO object for the
480
+ # given integer file descriptor.
481
+ # * ::open: Creates a new IO object.
482
+ # * ::pipe: Creates a connected pair of reader and writer IO objects.
483
+ # * ::popen: Creates an IO object to interact with a subprocess.
484
+ # * ::select: Selects which given IO instances are ready for reading, writing,
485
+ # or have pending exceptions.
486
+ #
487
+ # ### Reading
488
+ #
489
+ # * ::binread: Returns a binary string with all or a subset of bytes from the
490
+ # given file.
491
+ # * ::read: Returns a string with all or a subset of bytes from the given
492
+ # file.
493
+ # * ::readlines: Returns an array of strings, which are the lines from the
494
+ # given file.
495
+ # * #getbyte: Returns the next 8-bit byte read from `self` as an integer.
496
+ # * #getc: Returns the next character read from `self` as a string.
497
+ # * #gets: Returns the line read from `self`.
498
+ # * #pread: Returns all or the next *n* bytes read from `self`, not updating
499
+ # the receiver's offset.
500
+ # * #read: Returns all remaining or the next *n* bytes read from `self` for a
501
+ # given *n*.
502
+ # * #read_nonblock: the next *n* bytes read from `self` for a given *n*, in
503
+ # non-block mode.
504
+ # * #readbyte: Returns the next byte read from `self`; same as #getbyte, but
505
+ # raises an exception on end-of-stream.
506
+ # * #readchar: Returns the next character read from `self`; same as #getc, but
507
+ # raises an exception on end-of-stream.
508
+ # * #readline: Returns the next line read from `self`; same as #getline, but
509
+ # raises an exception of end-of-stream.
510
+ # * #readlines: Returns an array of all lines read read from `self`.
511
+ # * #readpartial: Returns up to the given number of bytes from `self`.
512
+ #
513
+ # ### Writing
514
+ #
515
+ # * ::binwrite: Writes the given string to the file at the given filepath, in
516
+ # binary mode.
517
+ # * ::write: Writes the given string to `self`.
518
+ # * #<<: Appends the given string to `self`.
519
+ # * #print: Prints last read line or given objects to `self`.
520
+ # * #printf: Writes to `self` based on the given format string and objects.
521
+ # * #putc: Writes a character to `self`.
522
+ # * #puts: Writes lines to `self`, making sure line ends with a newline.
523
+ # * #pwrite: Writes the given string at the given offset, not updating the
524
+ # receiver's offset.
525
+ # * #write: Writes one or more given strings to `self`.
526
+ # * #write_nonblock: Writes one or more given strings to `self` in
527
+ # non-blocking mode.
528
+ #
529
+ # ### Positioning
530
+ #
531
+ # * #lineno: Returns the current line number in `self`.
532
+ # * #lineno=: Sets the line number is `self`.
533
+ # * #pos (aliased as #tell): Returns the current byte offset in `self`.
534
+ # * #pos=: Sets the byte offset in `self`.
535
+ # * #reopen: Reassociates `self` with a new or existing IO stream.
536
+ # * #rewind: Positions `self` to the beginning of input.
537
+ # * #seek: Sets the offset for `self` relative to given position.
538
+ #
539
+ # ### Iterating
540
+ #
541
+ # * ::foreach: Yields each line of given file to the block.
542
+ # * #each (aliased as #each_line): Calls the given block with each successive
543
+ # line in `self`.
544
+ # * #each_byte: Calls the given block with each successive byte in `self` as
545
+ # an integer.
546
+ # * #each_char: Calls the given block with each successive character in `self`
547
+ # as a string.
548
+ # * #each_codepoint: Calls the given block with each successive codepoint in
549
+ # `self` as an integer.
550
+ #
551
+ # ### Settings
552
+ #
553
+ # * #autoclose=: Sets whether `self` auto-closes.
554
+ # * #binmode: Sets `self` to binary mode.
555
+ # * #close: Closes `self`.
556
+ # * #close_on_exec=: Sets the close-on-exec flag.
557
+ # * #close_read: Closes `self` for reading.
558
+ # * #close_write: Closes `self` for writing.
559
+ # * #set_encoding: Sets the encoding for `self`.
560
+ # * #set_encoding_by_bom: Sets the encoding for `self`, based on its Unicode
561
+ # byte-order-mark.
562
+ # * #sync=: Sets the sync-mode to the given value.
563
+ #
564
+ # ### Querying
565
+ #
566
+ # * #autoclose?: Returns whether `self` auto-closes.
567
+ # * #binmode?: Returns whether `self` is in binary mode.
568
+ # * #close_on_exec?: Returns the close-on-exec flag for `self`.
569
+ # * #closed?: Returns whether `self` is closed.
570
+ # * #eof? (aliased as #eof): Returns whether `self` is at end-of-stream.
571
+ # * #external_encoding: Returns the external encoding object for `self`.
572
+ # * #fileno (aliased as #to_i): Returns the integer file descriptor for `self`
573
+ # * #internal_encoding: Returns the internal encoding object for `self`.
574
+ # * #pid: Returns the process ID of a child process associated with `self`, if
575
+ # `self` was created by ::popen.
576
+ # * #stat: Returns the File::Stat object containing status information for
577
+ # `self`.
578
+ # * #sync: Returns whether `self` is in sync-mode.
579
+ # * #tty? (aliased as #isatty): Returns whether `self` is a terminal.
580
+ #
581
+ # ### Buffering
582
+ #
583
+ # * #fdatasync: Immediately writes all buffered data in `self` to disk.
584
+ # * #flush: Flushes any buffered data within `self` to the underlying
585
+ # operating system.
586
+ # * #fsync: Immediately writes all buffered data and attributes in `self` to
587
+ # disk.
588
+ # * #ungetbyte: Prepends buffer for `self` with given integer byte or string.
589
+ # * #ungetc: Prepends buffer for `self` with given string.
590
+ #
591
+ # ### Low-Level Access
592
+ #
593
+ # * ::sysopen: Opens the file given by its path, returning the integer file
594
+ # descriptor.
595
+ # * #advise: Announces the intention to access data from `self` in a specific
596
+ # way.
597
+ # * #fcntl: Passes a low-level command to the file specified by the given file
598
+ # descriptor.
599
+ # * #ioctl: Passes a low-level command to the device specified by the given
600
+ # file descriptor.
601
+ # * #sysread: Returns up to the next *n* bytes read from self using a
602
+ # low-level read.
603
+ # * #sysseek: Sets the offset for `self`.
604
+ # * #syswrite: Writes the given string to `self` using a low-level write.
605
+ #
606
+ # ### Other
607
+ #
608
+ # * ::copy_stream: Copies data from a source to a destination, each of which
609
+ # is a filepath or an IO-like object.
610
+ # * ::try_convert: Returns a new IO object resulting from converting the given
611
+ # object.
612
+ # * #inspect: Returns the string representation of `self`.
613
+ #
614
+ %a{annotate:rdoc:source:from=io.c}
615
+ class IO < Object
616
+ include File::Constants
617
+
618
+ include Enumerable[String]
619
+
620
+ # <!--
621
+ # rdoc-file=io.c
622
+ # - self << object -> self
623
+ # -->
624
+ # Writes the given `object` to `self`, which must be opened for writing (see
625
+ # [Access Modes](rdoc-ref:File@Access+Modes)); returns `self`; if `object` is
626
+ # not a string, it is converted via method `to_s`:
627
+ #
628
+ # $stdout << 'Hello' << ', ' << 'World!' << "\n"
629
+ # $stdout << 'foo' << :bar << 2 << "\n"
630
+ #
631
+ # Output:
632
+ #
633
+ # Hello, World!
634
+ # foobar2
635
+ #
636
+ def <<: (_ToS obj) -> self
637
+
638
+ # <!--
639
+ # rdoc-file=io.c
640
+ # - advise(advice, offset = 0, len = 0) -> nil
641
+ # -->
642
+ # Invokes Posix system call
643
+ # [posix_fadvise(2)](https://linux.die.net/man/2/posix_fadvise), which announces
644
+ # an intention to access data from the current file in a particular manner.
645
+ #
646
+ # The arguments and results are platform-dependent.
647
+ #
648
+ # The relevant data is specified by:
649
+ #
650
+ # * `offset`: The offset of the first byte of data.
651
+ # * `len`: The number of bytes to be accessed; if `len` is zero, or is larger
652
+ # than the number of bytes remaining, all remaining bytes will be accessed.
653
+ #
654
+ # Argument `advice` is one of the following symbols:
655
+ #
656
+ # * <code>:normal</code>: The application has no advice to give about its
657
+ # access pattern for the specified data. If no advice is given for an open
658
+ # file, this is the default assumption.
659
+ # * <code>:sequential</code>: The application expects to access the specified
660
+ # data sequentially (with lower offsets read before higher ones).
661
+ # * <code>:random</code>: The specified data will be accessed in random order.
662
+ # * <code>:noreuse</code>: The specified data will be accessed only once.
663
+ # * <code>:willneed</code>: The specified data will be accessed in the near
664
+ # future.
665
+ # * <code>:dontneed</code>: The specified data will not be accessed in the
666
+ # near future.
667
+ #
668
+ # Not implemented on all platforms.
669
+ #
670
+ def advise: (:normal | :sequential | :random | :willneed | :dontneed | :noreuse advise, ?Integer offset, ?Integer len) -> nil
671
+
672
+ # <!--
673
+ # rdoc-file=io.c
674
+ # - io.autoclose = bool -> true or false
675
+ # -->
676
+ # Sets auto-close flag.
677
+ #
678
+ # f = File.open(File::NULL)
679
+ # IO.for_fd(f.fileno).close
680
+ # f.gets # raises Errno::EBADF
681
+ #
682
+ # f = File.open(File::NULL)
683
+ # g = IO.for_fd(f.fileno)
684
+ # g.autoclose = false
685
+ # g.close
686
+ # f.gets # won't cause Errno::EBADF
687
+ #
688
+ def autoclose=: (boolish bool) -> boolish
689
+
690
+ # <!--
691
+ # rdoc-file=io.c
692
+ # - ios.autoclose? -> true or false
693
+ # -->
694
+ # Returns `true` if the underlying file descriptor of *ios* will be closed at
695
+ # its finalization or at calling #close, otherwise `false`.
696
+ #
697
+ def autoclose?: () -> bool
698
+
699
+ # <!--
700
+ # rdoc-file=io.c
701
+ # - binmode -> self
702
+ # -->
703
+ # Sets the stream's data mode as binary (see [Data
704
+ # Mode](rdoc-ref:File@Data+Mode)).
705
+ #
706
+ # A stream's data mode may not be changed from binary to text.
707
+ #
708
+ def binmode: () -> self
709
+
710
+ # <!--
711
+ # rdoc-file=io.c
712
+ # - binmode? -> true or false
713
+ # -->
714
+ # Returns `true` if the stream is on binary mode, `false` otherwise. See [Data
715
+ # Mode](rdoc-ref:File@Data+Mode).
716
+ #
717
+ def binmode?: () -> bool
718
+
719
+ # <!--
720
+ # rdoc-file=io.c
721
+ # - close -> nil
722
+ # -->
723
+ # Closes the stream for both reading and writing if open for either or both;
724
+ # returns `nil`. See [Open and Closed
725
+ # Streams](rdoc-ref:IO@Open+and+Closed+Streams).
726
+ #
727
+ # If the stream is open for writing, flushes any buffered writes to the
728
+ # operating system before closing.
729
+ #
730
+ # If the stream was opened by IO.popen, sets global variable <code>$?</code>
731
+ # (child exit status).
732
+ #
733
+ # It is not an error to close an IO object that has already been closed. It just
734
+ # returns nil.
735
+ #
736
+ # Example:
737
+ #
738
+ # IO.popen('ruby', 'r+') do |pipe|
739
+ # puts pipe.closed?
740
+ # pipe.close
741
+ # puts $?
742
+ # puts pipe.closed?
743
+ # end
744
+ #
745
+ # Output:
746
+ #
747
+ # false
748
+ # pid 13760 exit 0
749
+ # true
750
+ #
751
+ # Related: IO#close_read, IO#close_write, IO#closed?.
752
+ #
753
+ def close: () -> nil
754
+
755
+ # <!--
756
+ # rdoc-file=io.c
757
+ # - self.close_on_exec = bool -> true or false
758
+ # -->
759
+ # Sets a close-on-exec flag.
760
+ #
761
+ # f = File.open(File::NULL)
762
+ # f.close_on_exec = true
763
+ # system("cat", "/proc/self/fd/#{f.fileno}") # cat: /proc/self/fd/3: No such file or directory
764
+ # f.closed? #=> false
765
+ #
766
+ # Ruby sets close-on-exec flags of all file descriptors by default since Ruby
767
+ # 2.0.0. So you don't need to set by yourself. Also, unsetting a close-on-exec
768
+ # flag can cause file descriptor leak if another thread use fork() and exec()
769
+ # (via system() method for example). If you really needs file descriptor
770
+ # inheritance to child process, use spawn()'s argument such as fd=>fd.
771
+ #
772
+ def close_on_exec=: (boolish bool) -> nil
773
+
774
+ # <!--
775
+ # rdoc-file=io.c
776
+ # - close_on_exec? -> true or false
777
+ # -->
778
+ # Returns `true` if the stream will be closed on exec, `false` otherwise:
779
+ #
780
+ # f = File.open('t.txt')
781
+ # f.close_on_exec? # => true
782
+ # f.close_on_exec = false
783
+ # f.close_on_exec? # => false
784
+ # f.close
785
+ #
786
+ def close_on_exec?: () -> bool
787
+
788
+ # <!--
789
+ # rdoc-file=io.c
790
+ # - close_read -> nil
791
+ # -->
792
+ # Closes the stream for reading if open for reading; returns `nil`. See [Open
793
+ # and Closed Streams](rdoc-ref:IO@Open+and+Closed+Streams).
794
+ #
795
+ # If the stream was opened by IO.popen and is also closed for writing, sets
796
+ # global variable <code>$?</code> (child exit status).
797
+ #
798
+ # Example:
799
+ #
800
+ # IO.popen('ruby', 'r+') do |pipe|
801
+ # puts pipe.closed?
802
+ # pipe.close_write
803
+ # puts pipe.closed?
804
+ # pipe.close_read
805
+ # puts $?
806
+ # puts pipe.closed?
807
+ # end
808
+ #
809
+ # Output:
810
+ #
811
+ # false
812
+ # false
813
+ # pid 14748 exit 0
814
+ # true
815
+ #
816
+ # Related: IO#close, IO#close_write, IO#closed?.
817
+ #
818
+ def close_read: () -> nil
819
+
820
+ # <!--
821
+ # rdoc-file=io.c
822
+ # - close_write -> nil
823
+ # -->
824
+ # Closes the stream for writing if open for writing; returns `nil`. See [Open
825
+ # and Closed Streams](rdoc-ref:IO@Open+and+Closed+Streams).
826
+ #
827
+ # Flushes any buffered writes to the operating system before closing.
828
+ #
829
+ # If the stream was opened by IO.popen and is also closed for reading, sets
830
+ # global variable <code>$?</code> (child exit status).
831
+ #
832
+ # IO.popen('ruby', 'r+') do |pipe|
833
+ # puts pipe.closed?
834
+ # pipe.close_read
835
+ # puts pipe.closed?
836
+ # pipe.close_write
837
+ # puts $?
838
+ # puts pipe.closed?
839
+ # end
840
+ #
841
+ # Output:
842
+ #
843
+ # false
844
+ # false
845
+ # pid 15044 exit 0
846
+ # true
847
+ #
848
+ # Related: IO#close, IO#close_read, IO#closed?.
849
+ #
850
+ def close_write: () -> nil
851
+
852
+ # <!--
853
+ # rdoc-file=io.c
854
+ # - closed? -> true or false
855
+ # -->
856
+ # Returns `true` if the stream is closed for both reading and writing, `false`
857
+ # otherwise. See [Open and Closed Streams](rdoc-ref:IO@Open+and+Closed+Streams).
858
+ #
859
+ # IO.popen('ruby', 'r+') do |pipe|
860
+ # puts pipe.closed?
861
+ # pipe.close_read
862
+ # puts pipe.closed?
863
+ # pipe.close_write
864
+ # puts pipe.closed?
865
+ # end
866
+ #
867
+ # Output:
868
+ #
869
+ # false
870
+ # false
871
+ # true
872
+ #
873
+ # Related: IO#close_read, IO#close_write, IO#close.
874
+ #
875
+ def closed?: () -> bool
876
+
877
+ # <!--
878
+ # rdoc-file=io.c
879
+ # - each_byte {|byte| ... } -> self
880
+ # - each_byte -> enumerator
881
+ # -->
882
+ # Calls the given block with each byte (0..255) in the stream; returns `self`.
883
+ # See [Byte IO](rdoc-ref:IO@Byte+IO).
884
+ #
885
+ # f = File.new('t.rus')
886
+ # a = []
887
+ # f.each_byte {|b| a << b }
888
+ # a # => [209, 130, 208, 181, 209, 129, 209, 130]
889
+ # f.close
890
+ #
891
+ # Returns an Enumerator if no block is given.
892
+ #
893
+ # Related: IO#each_char, IO#each_codepoint.
894
+ #
895
+ def each_byte: () { (Integer byte) -> void } -> self
896
+ | () -> ::Enumerator[Integer, self]
897
+
898
+ # <!--
899
+ # rdoc-file=io.c
900
+ # - each_char {|c| ... } -> self
901
+ # - each_char -> enumerator
902
+ # -->
903
+ # Calls the given block with each character in the stream; returns `self`. See
904
+ # [Character IO](rdoc-ref:IO@Character+IO).
905
+ #
906
+ # f = File.new('t.rus')
907
+ # a = []
908
+ # f.each_char {|c| a << c.ord }
909
+ # a # => [1090, 1077, 1089, 1090]
910
+ # f.close
911
+ #
912
+ # Returns an Enumerator if no block is given.
913
+ #
914
+ # Related: IO#each_byte, IO#each_codepoint.
915
+ #
916
+ def each_char: () { (String c) -> void } -> self
917
+ | () -> ::Enumerator[String, self]
918
+
919
+ # <!--
920
+ # rdoc-file=io.c
921
+ # - each_codepoint {|c| ... } -> self
922
+ # - each_codepoint -> enumerator
923
+ # -->
924
+ # Calls the given block with each codepoint in the stream; returns `self`:
925
+ #
926
+ # f = File.new('t.rus')
927
+ # a = []
928
+ # f.each_codepoint {|c| a << c }
929
+ # a # => [1090, 1077, 1089, 1090]
930
+ # f.close
931
+ #
932
+ # Returns an Enumerator if no block is given.
933
+ #
934
+ # Related: IO#each_byte, IO#each_char.
935
+ #
936
+ def each_codepoint: () { (Integer c) -> void } -> self
937
+ | () -> ::Enumerator[Integer, self]
938
+
939
+ # <!--
940
+ # rdoc-file=io.c
941
+ # - eof -> true or false
942
+ # -->
943
+ # Returns `true` if the stream is positioned at its end, `false` otherwise; see
944
+ # [Position](rdoc-ref:IO@Position):
945
+ #
946
+ # f = File.open('t.txt')
947
+ # f.eof # => false
948
+ # f.seek(0, :END) # => 0
949
+ # f.eof # => true
950
+ # f.close
951
+ #
952
+ # Raises an exception unless the stream is opened for reading; see
953
+ # [Mode](rdoc-ref:File@Access+Modes).
954
+ #
955
+ # If `self` is a stream such as pipe or socket, this method blocks until the
956
+ # other end sends some data or closes it:
957
+ #
958
+ # r, w = IO.pipe
959
+ # Thread.new { sleep 1; w.close }
960
+ # r.eof? # => true # After 1-second wait.
961
+ #
962
+ # r, w = IO.pipe
963
+ # Thread.new { sleep 1; w.puts "a" }
964
+ # r.eof? # => false # After 1-second wait.
965
+ #
966
+ # r, w = IO.pipe
967
+ # r.eof? # blocks forever
968
+ #
969
+ # Note that this method reads data to the input byte buffer. So IO#sysread may
970
+ # not behave as you intend with IO#eof?, unless you call IO#rewind first (which
971
+ # is not available for some streams).
972
+ #
973
+ def eof: () -> bool
974
+
975
+ # <!--
976
+ # rdoc-file=io.c
977
+ # - fcntl(integer_cmd, argument) -> integer
978
+ # -->
979
+ # Invokes Posix system call [fcntl(2)](https://linux.die.net/man/2/fcntl), which
980
+ # provides a mechanism for issuing low-level commands to control or query a
981
+ # file-oriented I/O stream. Arguments and results are platform dependent.
982
+ #
983
+ # If `argument` is a number, its value is passed directly; if it is a string, it
984
+ # is interpreted as a binary sequence of bytes. (Array#pack might be a useful
985
+ # way to build this string.)
986
+ #
987
+ # Not implemented on all platforms.
988
+ #
989
+ def fcntl: (Integer integer_cmd, String | Integer argument) -> Integer
990
+
991
+ # <!--
992
+ # rdoc-file=io.c
993
+ # - fdatasync -> 0
994
+ # -->
995
+ # Immediately writes to disk all data buffered in the stream, via the operating
996
+ # system's: <code>fdatasync(2)</code>, if supported, otherwise via
997
+ # <code>fsync(2)</code>, if supported; otherwise raises an exception.
998
+ #
999
+ def fdatasync: () -> Integer?
1000
+
1001
+ # <!--
1002
+ # rdoc-file=io.c
1003
+ # - fileno -> integer
1004
+ # -->
1005
+ # Returns the integer file descriptor for the stream:
1006
+ #
1007
+ # $stdin.fileno # => 0
1008
+ # $stdout.fileno # => 1
1009
+ # $stderr.fileno # => 2
1010
+ # File.open('t.txt').fileno # => 10
1011
+ # f.close
1012
+ #
1013
+ def fileno: () -> Integer
1014
+
1015
+ # <!--
1016
+ # rdoc-file=io.c
1017
+ # - flush -> self
1018
+ # -->
1019
+ # Flushes data buffered in `self` to the operating system (but does not
1020
+ # necessarily flush data buffered in the operating system):
1021
+ #
1022
+ # $stdout.print 'no newline' # Not necessarily flushed.
1023
+ # $stdout.flush # Flushed.
1024
+ #
1025
+ def flush: () -> self
1026
+
1027
+ # <!--
1028
+ # rdoc-file=io.c
1029
+ # - fsync -> 0
1030
+ # -->
1031
+ # Immediately writes to disk all data buffered in the stream, via the operating
1032
+ # system's <code>fsync(2)</code>.
1033
+ #
1034
+ # Note this difference:
1035
+ #
1036
+ # * IO#sync=: Ensures that data is flushed from the stream's internal buffers,
1037
+ # but does not guarantee that the operating system actually writes the data
1038
+ # to disk.
1039
+ # * IO#fsync: Ensures both that data is flushed from internal buffers, and
1040
+ # that data is written to disk.
1041
+ #
1042
+ # Raises an exception if the operating system does not support
1043
+ # <code>fsync(2)</code>.
1044
+ #
1045
+ def fsync: () -> Integer?
1046
+
1047
+ # <!--
1048
+ # rdoc-file=io.c
1049
+ # - getbyte -> integer or nil
1050
+ # -->
1051
+ # Reads and returns the next byte (in range 0..255) from the stream; returns
1052
+ # `nil` if already at end-of-stream. See [Byte IO](rdoc-ref:IO@Byte+IO).
1053
+ #
1054
+ # f = File.open('t.txt')
1055
+ # f.getbyte # => 70
1056
+ # f.close
1057
+ # f = File.open('t.rus')
1058
+ # f.getbyte # => 209
1059
+ # f.close
1060
+ #
1061
+ # Related: IO#readbyte (may raise EOFError).
1062
+ #
1063
+ def getbyte: () -> Integer?
1064
+
1065
+ # <!--
1066
+ # rdoc-file=io.c
1067
+ # - getc -> character or nil
1068
+ # -->
1069
+ # Reads and returns the next 1-character string from the stream; returns `nil`
1070
+ # if already at end-of-stream. See [Character IO](rdoc-ref:IO@Character+IO).
1071
+ #
1072
+ # f = File.open('t.txt')
1073
+ # f.getc # => "F"
1074
+ # f.close
1075
+ # f = File.open('t.rus')
1076
+ # f.getc.ord # => 1090
1077
+ # f.close
1078
+ #
1079
+ # Related: IO#readchar (may raise EOFError).
1080
+ #
1081
+ def getc: () -> String?
1082
+
1083
+ # <!--
1084
+ # rdoc-file=io.c
1085
+ # - gets(sep = $/, chomp: false) -> string or nil
1086
+ # - gets(limit, chomp: false) -> string or nil
1087
+ # - gets(sep, limit, chomp: false) -> string or nil
1088
+ # -->
1089
+ # Reads and returns a line from the stream; assigns the return value to
1090
+ # <code>$_</code>. See [Line IO](rdoc-ref:IO@Line+IO).
1091
+ #
1092
+ # With no arguments given, returns the next line as determined by line separator
1093
+ # <code>$/</code>, or `nil` if none:
1094
+ #
1095
+ # f = File.open('t.txt')
1096
+ # f.gets # => "First line\n"
1097
+ # $_ # => "First line\n"
1098
+ # f.gets # => "\n"
1099
+ # f.gets # => "Fourth line\n"
1100
+ # f.gets # => "Fifth line\n"
1101
+ # f.gets # => nil
1102
+ # f.close
1103
+ #
1104
+ # With only string argument `sep` given, returns the next line as determined by
1105
+ # line separator `sep`, or `nil` if none; see [Line
1106
+ # Separator](rdoc-ref:IO@Line+Separator):
1107
+ #
1108
+ # f = File.new('t.txt')
1109
+ # f.gets('l') # => "First l"
1110
+ # f.gets('li') # => "ine\nSecond li"
1111
+ # f.gets('lin') # => "ne\n\nFourth lin"
1112
+ # f.gets # => "e\n"
1113
+ # f.close
1114
+ #
1115
+ # The two special values for `sep` are honored:
1116
+ #
1117
+ # f = File.new('t.txt')
1118
+ # # Get all.
1119
+ # f.gets(nil) # => "First line\nSecond line\n\nFourth line\nFifth line\n"
1120
+ # f.rewind
1121
+ # # Get paragraph (up to two line separators).
1122
+ # f.gets('') # => "First line\nSecond line\n\n"
1123
+ # f.close
1124
+ #
1125
+ # With only integer argument `limit` given, limits the number of bytes in the
1126
+ # line; see [Line Limit](rdoc-ref:IO@Line+Limit):
1127
+ #
1128
+ # # No more than one line.
1129
+ # File.open('t.txt') {|f| f.gets(10) } # => "First line"
1130
+ # File.open('t.txt') {|f| f.gets(11) } # => "First line\n"
1131
+ # File.open('t.txt') {|f| f.gets(12) } # => "First line\n"
1132
+ #
1133
+ # With arguments `sep` and `limit` given, combines the two behaviors (see [Line
1134
+ # Separator and Line Limit](rdoc-ref:IO@Line+Separator+and+Line+Limit)).
1135
+ #
1136
+ # Optional keyword argument `chomp` specifies whether line separators are to be
1137
+ # omitted:
1138
+ #
1139
+ # f = File.open('t.txt')
1140
+ # # Chomp the lines.
1141
+ # f.gets(chomp: true) # => "First line"
1142
+ # f.gets(chomp: true) # => "Second line"
1143
+ # f.gets(chomp: true) # => ""
1144
+ # f.gets(chomp: true) # => "Fourth line"
1145
+ # f.gets(chomp: true) # => "Fifth line"
1146
+ # f.gets(chomp: true) # => nil
1147
+ # f.close
1148
+ #
1149
+ def gets: (string? sep, ?int limit, ?chomp: boolish) -> String?
1150
+ | (?int limit, ?chomp: boolish) -> String?
1151
+
1152
+ # <!--
1153
+ # rdoc-file=io.c
1154
+ # - IO.new(fd, mode = 'r', **opts) -> io
1155
+ # -->
1156
+ # Creates and returns a new IO object (file stream) from a file descriptor.
1157
+ #
1158
+ # IO.new may be useful for interaction with low-level libraries. For
1159
+ # higher-level interactions, it may be simpler to create the file stream using
1160
+ # File.open.
1161
+ #
1162
+ # Argument `fd` must be a valid file descriptor (integer):
1163
+ #
1164
+ # path = 't.tmp'
1165
+ # fd = IO.sysopen(path) # => 3
1166
+ # IO.new(fd) # => #<IO:fd 3>
1167
+ #
1168
+ # The new IO object does not inherit encoding (because the integer file
1169
+ # descriptor does not have an encoding):
1170
+ #
1171
+ # fd = IO.sysopen('t.rus', 'rb')
1172
+ # io = IO.new(fd)
1173
+ # io.external_encoding # => #<Encoding:UTF-8> # Not ASCII-8BIT.
1174
+ #
1175
+ # Optional argument `mode` (defaults to 'r') must specify a valid mode; see
1176
+ # [Access Modes](rdoc-ref:File@Access+Modes):
1177
+ #
1178
+ # IO.new(fd, 'w') # => #<IO:fd 3>
1179
+ # IO.new(fd, File::WRONLY) # => #<IO:fd 3>
1180
+ #
1181
+ # Optional keyword arguments `opts` specify:
1182
+ #
1183
+ # * [Open Options](rdoc-ref:IO@Open+Options).
1184
+ # * [Encoding options](rdoc-ref:encodings.rdoc@Encoding+Options).
1185
+ #
1186
+ # Examples:
1187
+ #
1188
+ # IO.new(fd, internal_encoding: nil) # => #<IO:fd 3>
1189
+ # IO.new(fd, autoclose: true) # => #<IO:fd 3>
1190
+ #
1191
+ def initialize: ( int fd, ?string | int mode, ?path: string?, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String) -> void
1192
+
1193
+ # <!--
1194
+ # rdoc-file=io.c
1195
+ # - inspect -> string
1196
+ # -->
1197
+ # Returns a string representation of `self`:
1198
+ #
1199
+ # f = File.open('t.txt')
1200
+ # f.inspect # => "#<File:t.txt>"
1201
+ # f.close
1202
+ #
1203
+ def inspect: () -> String
1204
+
1205
+ # <!--
1206
+ # rdoc-file=io.c
1207
+ # - internal_encoding -> encoding or nil
1208
+ # -->
1209
+ # Returns the Encoding object that represents the encoding of the internal
1210
+ # string, if conversion is specified, or `nil` otherwise.
1211
+ #
1212
+ # See [Encodings](rdoc-ref:File@Encodings).
1213
+ #
1214
+ def internal_encoding: () -> Encoding
1215
+
1216
+ # <!--
1217
+ # rdoc-file=io.c
1218
+ # - ioctl(integer_cmd, argument) -> integer
1219
+ # -->
1220
+ # Invokes Posix system call [ioctl(2)](https://linux.die.net/man/2/ioctl), which
1221
+ # issues a low-level command to an I/O device.
1222
+ #
1223
+ # Issues a low-level command to an I/O device. The arguments and returned value
1224
+ # are platform-dependent. The effect of the call is platform-dependent.
1225
+ #
1226
+ # If argument `argument` is an integer, it is passed directly; if it is a
1227
+ # string, it is interpreted as a binary sequence of bytes.
1228
+ #
1229
+ # Not implemented on all platforms.
1230
+ #
1231
+ def ioctl: (Integer integer_cmd, String | Integer argument) -> Integer
1232
+
1233
+ # <!--
1234
+ # rdoc-file=ext/etc/etc.c
1235
+ # - pathconf(name) -> Integer
1236
+ # -->
1237
+ # Returns pathname configuration variable using fpathconf().
1238
+ #
1239
+ # *name* should be a constant under `Etc` which begins with `PC_`.
1240
+ #
1241
+ # The return value is an integer or nil. nil means indefinite limit.
1242
+ # (fpathconf() returns -1 but errno is not set.)
1243
+ #
1244
+ # require 'etc'
1245
+ # IO.pipe {|r, w|
1246
+ # p w.pathconf(Etc::PC_PIPE_BUF) #=> 4096
1247
+ # }
1248
+ #
1249
+ def pathconf: (Integer name) -> Integer?
1250
+
1251
+ # <!--
1252
+ # rdoc-file=io.c
1253
+ # - isatty -> true or false
1254
+ # -->
1255
+ # Returns `true` if the stream is associated with a terminal device (tty),
1256
+ # `false` otherwise:
1257
+ #
1258
+ # f = File.new('t.txt').isatty #=> false
1259
+ # f.close
1260
+ # f = File.new('/dev/tty').isatty #=> true
1261
+ # f.close
1262
+ #
1263
+ def isatty: () -> bool
1264
+
1265
+ # <!--
1266
+ # rdoc-file=io.c
1267
+ # - lineno -> integer
1268
+ # -->
1269
+ # Returns the current line number for the stream; see [Line
1270
+ # Number](rdoc-ref:IO@Line+Number).
1271
+ #
1272
+ def lineno: () -> Integer
1273
+
1274
+ # <!--
1275
+ # rdoc-file=io.c
1276
+ # - lineno = integer -> integer
1277
+ # -->
1278
+ # Sets and returns the line number for the stream; see [Line
1279
+ # Number](rdoc-ref:IO@Line+Number).
1280
+ #
1281
+ def lineno=: (Integer integer) -> Integer
1282
+
1283
+ # <!--
1284
+ # rdoc-file=io.c
1285
+ # - path -> string or nil
1286
+ # -->
1287
+ # Returns the path associated with the IO, or `nil` if there is no path
1288
+ # associated with the IO. It is not guaranteed that the path exists on the
1289
+ # filesystem.
1290
+ #
1291
+ # $stdin.path # => "<STDIN>"
1292
+ #
1293
+ # File.open("testfile") {|f| f.path} # => "testfile"
1294
+ #
1295
+ def path: () -> String?
1296
+
1297
+ # <!--
1298
+ # rdoc-file=io.c
1299
+ # - pid -> integer or nil
1300
+ # -->
1301
+ # Returns the process ID of a child process associated with the stream, which
1302
+ # will have been set by IO#popen, or `nil` if the stream was not created by
1303
+ # IO#popen:
1304
+ #
1305
+ # pipe = IO.popen("-")
1306
+ # if pipe
1307
+ # $stderr.puts "In parent, child pid is #{pipe.pid}"
1308
+ # else
1309
+ # $stderr.puts "In child, pid is #{$$}"
1310
+ # end
1311
+ #
1312
+ # Output:
1313
+ #
1314
+ # In child, pid is 26209
1315
+ # In parent, child pid is 26209
1316
+ #
1317
+ def pid: () -> Integer
1318
+
1319
+ # <!--
1320
+ # rdoc-file=io.c
1321
+ # - pos = new_position -> new_position
1322
+ # -->
1323
+ # Seeks to the given `new_position` (in bytes); see
1324
+ # [Position](rdoc-ref:IO@Position):
1325
+ #
1326
+ # f = File.open('t.txt')
1327
+ # f.tell # => 0
1328
+ # f.pos = 20 # => 20
1329
+ # f.tell # => 20
1330
+ # f.close
1331
+ #
1332
+ # Related: IO#seek, IO#tell.
1333
+ #
1334
+ def pos=: (Integer new_position) -> Integer
1335
+
1336
+ # <!--
1337
+ # rdoc-file=io.c
1338
+ # - print(*objects) -> nil
1339
+ # -->
1340
+ # Writes the given objects to the stream; returns `nil`. Appends the output
1341
+ # record separator <code>$OUTPUT_RECORD_SEPARATOR</code> (<code>$\</code>), if
1342
+ # it is not `nil`. See [Line IO](rdoc-ref:IO@Line+IO).
1343
+ #
1344
+ # With argument `objects` given, for each object:
1345
+ #
1346
+ # * Converts via its method `to_s` if not a string.
1347
+ # * Writes to the stream.
1348
+ # * If not the last object, writes the output field separator
1349
+ # <code>$OUTPUT_FIELD_SEPARATOR</code> (<code>$,</code>) if it is not `nil`.
1350
+ #
1351
+ # With default separators:
1352
+ #
1353
+ # f = File.open('t.tmp', 'w+')
1354
+ # objects = [0, 0.0, Rational(0, 1), Complex(0, 0), :zero, 'zero']
1355
+ # p $OUTPUT_RECORD_SEPARATOR
1356
+ # p $OUTPUT_FIELD_SEPARATOR
1357
+ # f.print(*objects)
1358
+ # f.rewind
1359
+ # p f.read
1360
+ # f.close
1361
+ #
1362
+ # Output:
1363
+ #
1364
+ # nil
1365
+ # nil
1366
+ # "00.00/10+0izerozero"
1367
+ #
1368
+ # With specified separators:
1369
+ #
1370
+ # $\ = "\n"
1371
+ # $, = ','
1372
+ # f.rewind
1373
+ # f.print(*objects)
1374
+ # f.rewind
1375
+ # p f.read
1376
+ #
1377
+ # Output:
1378
+ #
1379
+ # "0,0.0,0/1,0+0i,zero,zero\n"
1380
+ #
1381
+ # With no argument given, writes the content of <code>$_</code> (which is
1382
+ # usually the most recent user input):
1383
+ #
1384
+ # f = File.open('t.tmp', 'w+')
1385
+ # gets # Sets $_ to the most recent user input.
1386
+ # f.print
1387
+ # f.close
1388
+ #
1389
+ def print: (*untyped objects) -> nil
1390
+
1391
+ # <!--
1392
+ # rdoc-file=io.c
1393
+ # - printf(format_string, *objects) -> nil
1394
+ # -->
1395
+ # Formats and writes `objects` to the stream.
1396
+ #
1397
+ # For details on `format_string`, see [Format
1398
+ # Specifications](rdoc-ref:language/format_specifications.rdoc).
1399
+ #
1400
+ def printf: (String format_string, *untyped objects) -> nil
1401
+
1402
+ # <!--
1403
+ # rdoc-file=io.c
1404
+ # - putc(object) -> object
1405
+ # -->
1406
+ # Writes a character to the stream. See [Character
1407
+ # IO](rdoc-ref:IO@Character+IO).
1408
+ #
1409
+ # If `object` is numeric, converts to integer if necessary, then writes the
1410
+ # character whose code is the least significant byte; if `object` is a string,
1411
+ # writes the first character:
1412
+ #
1413
+ # $stdout.putc "A"
1414
+ # $stdout.putc 65
1415
+ #
1416
+ # Output:
1417
+ #
1418
+ # AA
1419
+ #
1420
+ def putc: (real) -> real
1421
+ | (String) -> String
1422
+
1423
+ # <!--
1424
+ # rdoc-file=io.c
1425
+ # - puts(*objects) -> nil
1426
+ # -->
1427
+ # Writes the given `objects` to the stream, which must be open for writing;
1428
+ # returns `nil`.\ Writes a newline after each that does not already end with a
1429
+ # newline sequence. If called without arguments, writes a newline. See [Line
1430
+ # IO](rdoc-ref:IO@Line+IO).
1431
+ #
1432
+ # Note that each added newline is the character <code>"\n"<//tt>, not the output
1433
+ # record separator (<tt>$\</code>).
1434
+ #
1435
+ # Treatment for each object:
1436
+ #
1437
+ # * String: writes the string.
1438
+ # * Neither string nor array: writes <code>object.to_s</code>.
1439
+ # * Array: writes each element of the array; arrays may be nested.
1440
+ #
1441
+ # To keep these examples brief, we define this helper method:
1442
+ #
1443
+ # def show(*objects)
1444
+ # # Puts objects to file.
1445
+ # f = File.new('t.tmp', 'w+')
1446
+ # f.puts(objects)
1447
+ # # Return file content.
1448
+ # f.rewind
1449
+ # p f.read
1450
+ # f.close
1451
+ # end
1452
+ #
1453
+ # # Strings without newlines.
1454
+ # show('foo', 'bar', 'baz') # => "foo\nbar\nbaz\n"
1455
+ # # Strings, some with newlines.
1456
+ # show("foo\n", 'bar', "baz\n") # => "foo\nbar\nbaz\n"
1457
+ #
1458
+ # # Neither strings nor arrays:
1459
+ # show(0, 0.0, Rational(0, 1), Complex(9, 0), :zero)
1460
+ # # => "0\n0.0\n0/1\n9+0i\nzero\n"
1461
+ #
1462
+ # # Array of strings.
1463
+ # show(['foo', "bar\n", 'baz']) # => "foo\nbar\nbaz\n"
1464
+ # # Nested arrays.
1465
+ # show([[[0, 1], 2, 3], 4, 5]) # => "0\n1\n2\n3\n4\n5\n"
1466
+ #
1467
+ def puts: (*untyped objects) -> nil
1468
+
1469
+ # <!--
1470
+ # rdoc-file=io.c
1471
+ # - pread(maxlen, offset) -> string
1472
+ # - pread(maxlen, offset, out_string) -> string
1473
+ # -->
1474
+ # Behaves like IO#readpartial, except that it:
1475
+ #
1476
+ # * Reads at the given `offset` (in bytes).
1477
+ # * Disregards, and does not modify, the stream's position (see
1478
+ # [Position](rdoc-ref:IO@Position)).
1479
+ # * Bypasses any user space buffering in the stream.
1480
+ #
1481
+ # Because this method does not disturb the stream's state (its position, in
1482
+ # particular), `pread` allows multiple threads and processes to use the same IO
1483
+ # object for reading at various offsets.
1484
+ #
1485
+ # f = File.open('t.txt')
1486
+ # f.read # => "First line\nSecond line\n\nFourth line\nFifth line\n"
1487
+ # f.pos # => 52
1488
+ # # Read 12 bytes at offset 0.
1489
+ # f.pread(12, 0) # => "First line\n"
1490
+ # # Read 9 bytes at offset 8.
1491
+ # f.pread(9, 8) # => "ne\nSecon"
1492
+ # f.close
1493
+ #
1494
+ # Not available on some platforms.
1495
+ #
1496
+ def pread: (int maxlen, int offset, ?string? out_string) -> String
1497
+
1498
+ # <!--
1499
+ # rdoc-file=io.c
1500
+ # - pwrite(object, offset) -> integer
1501
+ # -->
1502
+ # Behaves like IO#write, except that it:
1503
+ #
1504
+ # * Writes at the given `offset` (in bytes).
1505
+ # * Disregards, and does not modify, the stream's position (see
1506
+ # [Position](rdoc-ref:IO@Position)).
1507
+ # * Bypasses any user space buffering in the stream.
1508
+ #
1509
+ # Because this method does not disturb the stream's state (its position, in
1510
+ # particular), `pwrite` allows multiple threads and processes to use the same IO
1511
+ # object for writing at various offsets.
1512
+ #
1513
+ # f = File.open('t.tmp', 'w+')
1514
+ # # Write 6 bytes at offset 3.
1515
+ # f.pwrite('ABCDEF', 3) # => 6
1516
+ # f.rewind
1517
+ # f.read # => "\u0000\u0000\u0000ABCDEF"
1518
+ # f.close
1519
+ #
1520
+ # Not available on some platforms.
1521
+ #
1522
+ def pwrite: (_ToS object, int offset) -> Integer
1523
+
1524
+ # <!--
1525
+ # rdoc-file=io.c
1526
+ # - read(maxlen = nil, out_string = nil) -> new_string, out_string, or nil
1527
+ # -->
1528
+ # Reads bytes from the stream; the stream must be opened for reading (see
1529
+ # [Access Modes](rdoc-ref:File@Access+Modes)):
1530
+ #
1531
+ # * If `maxlen` is `nil`, reads all bytes using the stream's data mode.
1532
+ # * Otherwise reads up to `maxlen` bytes in binary mode.
1533
+ #
1534
+ # Returns a string (either a new string or the given `out_string`) containing
1535
+ # the bytes read. The encoding of the string depends on both `maxLen` and
1536
+ # `out_string`:
1537
+ #
1538
+ # * `maxlen` is `nil`: uses internal encoding of `self` (regardless of whether
1539
+ # `out_string` was given).
1540
+ # * `maxlen` not `nil`:
1541
+ #
1542
+ # * `out_string` given: encoding of `out_string` not modified.
1543
+ # * `out_string` not given: ASCII-8BIT is used.
1544
+ #
1545
+ # <strong>Without Argument `out_string`</strong>
1546
+ #
1547
+ # When argument `out_string` is omitted, the returned value is a new string:
1548
+ #
1549
+ # f = File.new('t.txt')
1550
+ # f.read
1551
+ # # => "First line\nSecond line\n\nFourth line\nFifth line\n"
1552
+ # f.rewind
1553
+ # f.read(30) # => "First line\r\nSecond line\r\n\r\nFou"
1554
+ # f.read(30) # => "rth line\r\nFifth line\r\n"
1555
+ # f.read(30) # => nil
1556
+ # f.close
1557
+ #
1558
+ # If `maxlen` is zero, returns an empty string.
1559
+ #
1560
+ # <strong> With Argument `out_string`</strong>
1561
+ #
1562
+ # When argument `out_string` is given, the returned value is `out_string`, whose
1563
+ # content is replaced:
1564
+ #
1565
+ # f = File.new('t.txt')
1566
+ # s = 'foo' # => "foo"
1567
+ # f.read(nil, s) # => "First line\nSecond line\n\nFourth line\nFifth line\n"
1568
+ # s # => "First line\nSecond line\n\nFourth line\nFifth line\n"
1569
+ # f.rewind
1570
+ # s = 'bar'
1571
+ # f.read(30, s) # => "First line\r\nSecond line\r\n\r\nFou"
1572
+ # s # => "First line\r\nSecond line\r\n\r\nFou"
1573
+ # s = 'baz'
1574
+ # f.read(30, s) # => "rth line\r\nFifth line\r\n"
1575
+ # s # => "rth line\r\nFifth line\r\n"
1576
+ # s = 'bat'
1577
+ # f.read(30, s) # => nil
1578
+ # s # => ""
1579
+ # f.close
1580
+ #
1581
+ # Note that this method behaves like the fread() function in C. This means it
1582
+ # retries to invoke read(2) system calls to read data with the specified maxlen
1583
+ # (or until EOF).
1584
+ #
1585
+ # This behavior is preserved even if the stream is in non-blocking mode. (This
1586
+ # method is non-blocking-flag insensitive as other methods.)
1587
+ #
1588
+ # If you need the behavior like a single read(2) system call, consider
1589
+ # #readpartial, #read_nonblock, and #sysread.
1590
+ #
1591
+ # Related: IO#write.
1592
+ #
1593
+ def read: (?nil, ?string? outbuf) -> String
1594
+ | (int? length, ?string? outbuf) -> String?
1595
+
1596
+ # <!--
1597
+ # rdoc-file=io.rb
1598
+ # - ios.read_nonblock(maxlen [, options]) -> string
1599
+ # - ios.read_nonblock(maxlen, outbuf [, options]) -> outbuf
1600
+ # -->
1601
+ # Reads at most *maxlen* bytes from *ios* using the read(2) system call after
1602
+ # O_NONBLOCK is set for the underlying file descriptor.
1603
+ #
1604
+ # If the optional *outbuf* argument is present, it must reference a String,
1605
+ # which will receive the data. The *outbuf* will contain only the received data
1606
+ # after the method call even if it is not empty at the beginning.
1607
+ #
1608
+ # read_nonblock just calls the read(2) system call. It causes all errors the
1609
+ # read(2) system call causes: Errno::EWOULDBLOCK, Errno::EINTR, etc. The caller
1610
+ # should care such errors.
1611
+ #
1612
+ # If the exception is Errno::EWOULDBLOCK or Errno::EAGAIN, it is extended by
1613
+ # IO::WaitReadable. So IO::WaitReadable can be used to rescue the exceptions for
1614
+ # retrying read_nonblock.
1615
+ #
1616
+ # read_nonblock causes EOFError on EOF.
1617
+ #
1618
+ # On some platforms, such as Windows, non-blocking mode is not supported on IO
1619
+ # objects other than sockets. In such cases, Errno::EBADF will be raised.
1620
+ #
1621
+ # If the read byte buffer is not empty, read_nonblock reads from the buffer like
1622
+ # readpartial. In this case, the read(2) system call is not called.
1623
+ #
1624
+ # When read_nonblock raises an exception kind of IO::WaitReadable, read_nonblock
1625
+ # should not be called until io is readable for avoiding busy loop. This can be
1626
+ # done as follows.
1627
+ #
1628
+ # # emulates blocking read (readpartial).
1629
+ # begin
1630
+ # result = io.read_nonblock(maxlen)
1631
+ # rescue IO::WaitReadable
1632
+ # IO.select([io])
1633
+ # retry
1634
+ # end
1635
+ #
1636
+ # Although IO#read_nonblock doesn't raise IO::WaitWritable.
1637
+ # OpenSSL::Buffering#read_nonblock can raise IO::WaitWritable. If IO and SSL
1638
+ # should be used polymorphically, IO::WaitWritable should be rescued too. See
1639
+ # the document of OpenSSL::Buffering#read_nonblock for sample code.
1640
+ #
1641
+ # Note that this method is identical to readpartial except the non-blocking flag
1642
+ # is set.
1643
+ #
1644
+ # By specifying a keyword argument *exception* to `false`, you can indicate that
1645
+ # read_nonblock should not raise an IO::WaitReadable exception, but return the
1646
+ # symbol <code>:wait_readable</code> instead. At EOF, it will return nil instead
1647
+ # of raising EOFError.
1648
+ #
1649
+ def read_nonblock: (int len, ?string? buf, ?exception: true) -> String
1650
+ | (int len, ?string? buf, exception: false) -> (String | :wait_readable | nil)
1651
+
1652
+ # <!--
1653
+ # rdoc-file=io.c
1654
+ # - readbyte -> integer
1655
+ # -->
1656
+ # Reads and returns the next byte (in range 0..255) from the stream; raises
1657
+ # EOFError if already at end-of-stream. See [Byte IO](rdoc-ref:IO@Byte+IO).
1658
+ #
1659
+ # f = File.open('t.txt')
1660
+ # f.readbyte # => 70
1661
+ # f.close
1662
+ # f = File.open('t.rus')
1663
+ # f.readbyte # => 209
1664
+ # f.close
1665
+ #
1666
+ # Related: IO#getbyte (will not raise EOFError).
1667
+ #
1668
+ def readbyte: () -> Integer
1669
+
1670
+ # <!--
1671
+ # rdoc-file=io.c
1672
+ # - readchar -> string
1673
+ # -->
1674
+ # Reads and returns the next 1-character string from the stream; raises EOFError
1675
+ # if already at end-of-stream. See [Character IO](rdoc-ref:IO@Character+IO).
1676
+ #
1677
+ # f = File.open('t.txt')
1678
+ # f.readchar # => "F"
1679
+ # f.close
1680
+ # f = File.open('t.rus')
1681
+ # f.readchar.ord # => 1090
1682
+ # f.close
1683
+ #
1684
+ # Related: IO#getc (will not raise EOFError).
1685
+ #
1686
+ def readchar: () -> String
1687
+
1688
+ # <!--
1689
+ # rdoc-file=io.rb
1690
+ # - readline(sep = $/, chomp: false) -> string
1691
+ # - readline(limit, chomp: false) -> string
1692
+ # - readline(sep, limit, chomp: false) -> string
1693
+ # -->
1694
+ # Reads a line as with IO#gets, but raises EOFError if already at end-of-stream.
1695
+ #
1696
+ # Optional keyword argument `chomp` specifies whether line separators are to be
1697
+ # omitted.
1698
+ #
1699
+ def readline: (?String sep, ?Integer limit, ?chomp: boolish) -> String
1700
+
1701
+ # <!--
1702
+ # rdoc-file=io.c
1703
+ # - readlines(sep = $/, chomp: false) -> array
1704
+ # - readlines(limit, chomp: false) -> array
1705
+ # - readlines(sep, limit, chomp: false) -> array
1706
+ # -->
1707
+ # Reads and returns all remaining line from the stream; does not modify
1708
+ # <code>$_</code>. See [Line IO](rdoc-ref:IO@Line+IO).
1709
+ #
1710
+ # With no arguments given, returns lines as determined by line separator
1711
+ # <code>$/</code>, or `nil` if none:
1712
+ #
1713
+ # f = File.new('t.txt')
1714
+ # f.readlines
1715
+ # # => ["First line\n", "Second line\n", "\n", "Fourth line\n", "Fifth line\n"]
1716
+ # f.readlines # => []
1717
+ # f.close
1718
+ #
1719
+ # With only string argument `sep` given, returns lines as determined by line
1720
+ # separator `sep`, or `nil` if none; see [Line
1721
+ # Separator](rdoc-ref:IO@Line+Separator):
1722
+ #
1723
+ # f = File.new('t.txt')
1724
+ # f.readlines('li')
1725
+ # # => ["First li", "ne\nSecond li", "ne\n\nFourth li", "ne\nFifth li", "ne\n"]
1726
+ # f.close
1727
+ #
1728
+ # The two special values for `sep` are honored:
1729
+ #
1730
+ # f = File.new('t.txt')
1731
+ # # Get all into one string.
1732
+ # f.readlines(nil)
1733
+ # # => ["First line\nSecond line\n\nFourth line\nFifth line\n"]
1734
+ # # Get paragraphs (up to two line separators).
1735
+ # f.rewind
1736
+ # f.readlines('')
1737
+ # # => ["First line\nSecond line\n\n", "Fourth line\nFifth line\n"]
1738
+ # f.close
1739
+ #
1740
+ # With only integer argument `limit` given, limits the number of bytes in each
1741
+ # line; see [Line Limit](rdoc-ref:IO@Line+Limit):
1742
+ #
1743
+ # f = File.new('t.txt')
1744
+ # f.readlines(8)
1745
+ # # => ["First li", "ne\n", "Second l", "ine\n", "\n", "Fourth l", "ine\n", "Fifth li", "ne\n"]
1746
+ # f.close
1747
+ #
1748
+ # With arguments `sep` and `limit` given, combines the two behaviors (see [Line
1749
+ # Separator and Line Limit](rdoc-ref:IO@Line+Separator+and+Line+Limit)).
1750
+ #
1751
+ # Optional keyword argument `chomp` specifies whether line separators are to be
1752
+ # omitted:
1753
+ #
1754
+ # f = File.new('t.txt')
1755
+ # f.readlines(chomp: true)
1756
+ # # => ["First line", "Second line", "", "Fourth line", "Fifth line"]
1757
+ # f.close
1758
+ #
1759
+ def readlines: (?String sep, ?Integer limit, ?chomp: boolish) -> ::Array[String]
1760
+
1761
+ # <!--
1762
+ # rdoc-file=io.c
1763
+ # - readpartial(maxlen) -> string
1764
+ # - readpartial(maxlen, out_string) -> out_string
1765
+ # -->
1766
+ # Reads up to `maxlen` bytes from the stream; returns a string (either a new
1767
+ # string or the given `out_string`). Its encoding is:
1768
+ #
1769
+ # * The unchanged encoding of `out_string`, if `out_string` is given.
1770
+ # * ASCII-8BIT, otherwise.
1771
+ #
1772
+ # * Contains `maxlen` bytes from the stream, if available.
1773
+ # * Otherwise contains all available bytes, if any available.
1774
+ # * Otherwise is an empty string.
1775
+ #
1776
+ # With the single non-negative integer argument `maxlen` given, returns a new
1777
+ # string:
1778
+ #
1779
+ # f = File.new('t.txt')
1780
+ # f.readpartial(20) # => "First line\nSecond l"
1781
+ # f.readpartial(20) # => "ine\n\nFourth line\n"
1782
+ # f.readpartial(20) # => "Fifth line\n"
1783
+ # f.readpartial(20) # Raises EOFError.
1784
+ # f.close
1785
+ #
1786
+ # With both argument `maxlen` and string argument `out_string` given, returns
1787
+ # modified `out_string`:
1788
+ #
1789
+ # f = File.new('t.txt')
1790
+ # s = 'foo'
1791
+ # f.readpartial(20, s) # => "First line\nSecond l"
1792
+ # s = 'bar'
1793
+ # f.readpartial(0, s) # => ""
1794
+ # f.close
1795
+ #
1796
+ # This method is useful for a stream such as a pipe, a socket, or a tty. It
1797
+ # blocks only when no data is immediately available. This means that it blocks
1798
+ # only when *all* of the following are true:
1799
+ #
1800
+ # * The byte buffer in the stream is empty.
1801
+ # * The content of the stream is empty.
1802
+ # * The stream is not at EOF.
1803
+ #
1804
+ # When blocked, the method waits for either more data or EOF on the stream:
1805
+ #
1806
+ # * If more data is read, the method returns the data.
1807
+ # * If EOF is reached, the method raises EOFError.
1808
+ #
1809
+ # When not blocked, the method responds immediately:
1810
+ #
1811
+ # * Returns data from the buffer if there is any.
1812
+ # * Otherwise returns data from the stream if there is any.
1813
+ # * Otherwise raises EOFError if the stream has reached EOF.
1814
+ #
1815
+ # Note that this method is similar to sysread. The differences are:
1816
+ #
1817
+ # * If the byte buffer is not empty, read from the byte buffer instead of
1818
+ # "sysread for buffered IO (IOError)".
1819
+ # * It doesn't cause Errno::EWOULDBLOCK and Errno::EINTR. When readpartial
1820
+ # meets EWOULDBLOCK and EINTR by read system call, readpartial retries the
1821
+ # system call.
1822
+ #
1823
+ # The latter means that readpartial is non-blocking-flag insensitive. It blocks
1824
+ # on the situation IO#sysread causes Errno::EWOULDBLOCK as if the fd is blocking
1825
+ # mode.
1826
+ #
1827
+ # Examples:
1828
+ #
1829
+ # # # Returned Buffer Content Pipe Content
1830
+ # r, w = IO.pipe #
1831
+ # w << 'abc' # "" "abc".
1832
+ # r.readpartial(4096) # => "abc" "" ""
1833
+ # r.readpartial(4096) # (Blocks because buffer and pipe are empty.)
1834
+ #
1835
+ # # # Returned Buffer Content Pipe Content
1836
+ # r, w = IO.pipe #
1837
+ # w << 'abc' # "" "abc"
1838
+ # w.close # "" "abc" EOF
1839
+ # r.readpartial(4096) # => "abc" "" EOF
1840
+ # r.readpartial(4096) # raises EOFError
1841
+ #
1842
+ # # # Returned Buffer Content Pipe Content
1843
+ # r, w = IO.pipe #
1844
+ # w << "abc\ndef\n" # "" "abc\ndef\n"
1845
+ # r.gets # => "abc\n" "def\n" ""
1846
+ # w << "ghi\n" # "def\n" "ghi\n"
1847
+ # r.readpartial(4096) # => "def\n" "" "ghi\n"
1848
+ # r.readpartial(4096) # => "ghi\n" "" ""
1849
+ #
1850
+ def readpartial: (int maxlen, ?string? outbuf) -> String
1851
+
1852
+ # <!--
1853
+ # rdoc-file=io.c
1854
+ # - reopen(other_io) -> self
1855
+ # - reopen(path, mode = 'r', **opts) -> self
1856
+ # -->
1857
+ # Reassociates the stream with another stream, which may be of a different
1858
+ # class. This method may be used to redirect an existing stream to a new
1859
+ # destination.
1860
+ #
1861
+ # With argument `other_io` given, reassociates with that stream:
1862
+ #
1863
+ # # Redirect $stdin from a file.
1864
+ # f = File.open('t.txt')
1865
+ # $stdin.reopen(f)
1866
+ # f.close
1867
+ #
1868
+ # # Redirect $stdout to a file.
1869
+ # f = File.open('t.tmp', 'w')
1870
+ # $stdout.reopen(f)
1871
+ # f.close
1872
+ #
1873
+ # With argument `path` given, reassociates with a new stream to that file path:
1874
+ #
1875
+ # $stdin.reopen('t.txt')
1876
+ # $stdout.reopen('t.tmp', 'w')
1877
+ #
1878
+ # Optional keyword arguments `opts` specify:
1879
+ #
1880
+ # * [Open Options](rdoc-ref:IO@Open+Options).
1881
+ # * [Encoding options](rdoc-ref:encodings.rdoc@Encoding+Options).
1882
+ #
1883
+ def reopen: (IO other_IO_or_path) -> IO
1884
+ | (String other_IO_or_path, ?String mode_str) -> IO
1885
+
1886
+ # <!--
1887
+ # rdoc-file=io.c
1888
+ # - rewind -> 0
1889
+ # -->
1890
+ # Repositions the stream to its beginning, setting both the position and the
1891
+ # line number to zero; see [Position](rdoc-ref:IO@Position) and [Line
1892
+ # Number](rdoc-ref:IO@Line+Number):
1893
+ #
1894
+ # f = File.open('t.txt')
1895
+ # f.tell # => 0
1896
+ # f.lineno # => 0
1897
+ # f.gets # => "First line\n"
1898
+ # f.tell # => 12
1899
+ # f.lineno # => 1
1900
+ # f.rewind # => 0
1901
+ # f.tell # => 0
1902
+ # f.lineno # => 0
1903
+ # f.close
1904
+ #
1905
+ # Note that this method cannot be used with streams such as pipes, ttys, and
1906
+ # sockets.
1907
+ #
1908
+ def rewind: () -> Integer
1909
+
1910
+ # <!--
1911
+ # rdoc-file=io.c
1912
+ # - seek(offset, whence = IO::SEEK_SET) -> 0
1913
+ # -->
1914
+ # Seeks to the position given by integer `offset` (see
1915
+ # [Position](rdoc-ref:IO@Position)) and constant `whence`, which is one of:
1916
+ #
1917
+ # * <code>:CUR</code> or <code>IO::SEEK_CUR</code>: Repositions the stream to
1918
+ # its current position plus the given `offset`:
1919
+ #
1920
+ # f = File.open('t.txt')
1921
+ # f.tell # => 0
1922
+ # f.seek(20, :CUR) # => 0
1923
+ # f.tell # => 20
1924
+ # f.seek(-10, :CUR) # => 0
1925
+ # f.tell # => 10
1926
+ # f.close
1927
+ #
1928
+ # * <code>:END</code> or <code>IO::SEEK_END</code>: Repositions the stream to
1929
+ # its end plus the given `offset`:
1930
+ #
1931
+ # f = File.open('t.txt')
1932
+ # f.tell # => 0
1933
+ # f.seek(0, :END) # => 0 # Repositions to stream end.
1934
+ # f.tell # => 52
1935
+ # f.seek(-20, :END) # => 0
1936
+ # f.tell # => 32
1937
+ # f.seek(-40, :END) # => 0
1938
+ # f.tell # => 12
1939
+ # f.close
1940
+ #
1941
+ # * <code>:SET</code> or <code>IO:SEEK_SET</code>: Repositions the stream to
1942
+ # the given `offset`:
1943
+ #
1944
+ # f = File.open('t.txt')
1945
+ # f.tell # => 0
1946
+ # f.seek(20, :SET) # => 0
1947
+ # f.tell # => 20
1948
+ # f.seek(40, :SET) # => 0
1949
+ # f.tell # => 40
1950
+ # f.close
1951
+ #
1952
+ # Related: IO#pos=, IO#tell.
1953
+ #
1954
+ def seek: (Integer amount, ?Integer whence) -> Integer
1955
+
1956
+ # <!--
1957
+ # rdoc-file=io.c
1958
+ # - set_encoding(ext_enc) -> self
1959
+ # - set_encoding(ext_enc, int_enc, **enc_opts) -> self
1960
+ # - set_encoding('ext_enc:int_enc', **enc_opts) -> self
1961
+ # -->
1962
+ # See [Encodings](rdoc-ref:File@Encodings).
1963
+ #
1964
+ # Argument `ext_enc`, if given, must be an Encoding object or a String with the
1965
+ # encoding name; it is assigned as the encoding for the stream.
1966
+ #
1967
+ # Argument `int_enc`, if given, must be an Encoding object or a String with the
1968
+ # encoding name; it is assigned as the encoding for the internal string.
1969
+ #
1970
+ # Argument <code>'ext_enc:int_enc'</code>, if given, is a string containing two
1971
+ # colon-separated encoding names; corresponding Encoding objects are assigned as
1972
+ # the external and internal encodings for the stream.
1973
+ #
1974
+ # If the external encoding of a string is binary/ASCII-8BIT, the internal
1975
+ # encoding of the string is set to nil, since no transcoding is needed.
1976
+ #
1977
+ # Optional keyword arguments `enc_opts` specify [Encoding
1978
+ # options](rdoc-ref:encodings.rdoc@Encoding+Options).
1979
+ #
1980
+ def set_encoding: (?String | Encoding ext_or_ext_int_enc) -> self
1981
+ | (?String | Encoding ext_or_ext_int_enc, ?String | Encoding int_enc) -> self
1982
+
1983
+ # <!--
1984
+ # rdoc-file=io.c
1985
+ # - set_encoding_by_bom -> encoding or nil
1986
+ # -->
1987
+ # If the stream begins with a BOM ([byte order
1988
+ # marker](https://en.wikipedia.org/wiki/Byte_order_mark)), consumes the BOM and
1989
+ # sets the external encoding accordingly; returns the result encoding if found,
1990
+ # or `nil` otherwise:
1991
+ #
1992
+ # File.write('t.tmp', "\u{FEFF}abc")
1993
+ # io = File.open('t.tmp', 'rb')
1994
+ # io.set_encoding_by_bom # => #<Encoding:UTF-8>
1995
+ # io.close
1996
+ #
1997
+ # File.write('t.tmp', 'abc')
1998
+ # io = File.open('t.tmp', 'rb')
1999
+ # io.set_encoding_by_bom # => nil
2000
+ # io.close
2001
+ #
2002
+ # Raises an exception if the stream is not binmode or its encoding has already
2003
+ # been set.
2004
+ #
2005
+ def set_encoding_by_bom: () -> Encoding?
2006
+
2007
+ # <!--
2008
+ # rdoc-file=file.c
2009
+ # - ios.stat -> stat
2010
+ # -->
2011
+ # Returns status information for *ios* as an object of type File::Stat.
2012
+ #
2013
+ # f = File.new("testfile")
2014
+ # s = f.stat
2015
+ # "%o" % s.mode #=> "100644"
2016
+ # s.blksize #=> 4096
2017
+ # s.atime #=> Wed Apr 09 08:53:54 CDT 2003
2018
+ #
2019
+ def stat: () -> File::Stat
2020
+
2021
+ # <!--
2022
+ # rdoc-file=io.c
2023
+ # - sync -> true or false
2024
+ # -->
2025
+ # Returns the current sync mode of the stream. When sync mode is true, all
2026
+ # output is immediately flushed to the underlying operating system and is not
2027
+ # buffered by Ruby internally. See also #fsync.
2028
+ #
2029
+ # f = File.open('t.tmp', 'w')
2030
+ # f.sync # => false
2031
+ # f.sync = true
2032
+ # f.sync # => true
2033
+ # f.close
2034
+ #
2035
+ def sync: () -> bool
2036
+
2037
+ # <!--
2038
+ # rdoc-file=io.c
2039
+ # - sync = boolean -> boolean
2040
+ # -->
2041
+ # Sets the *sync* *mode* for the stream to the given value; returns the given
2042
+ # value.
2043
+ #
2044
+ # Values for the sync mode:
2045
+ #
2046
+ # * `true`: All output is immediately flushed to the underlying operating
2047
+ # system and is not buffered internally.
2048
+ # * `false`: Output may be buffered internally.
2049
+ #
2050
+ # Example;
2051
+ #
2052
+ # f = File.open('t.tmp', 'w')
2053
+ # f.sync # => false
2054
+ # f.sync = true
2055
+ # f.sync # => true
2056
+ # f.close
2057
+ #
2058
+ # Related: IO#fsync.
2059
+ #
2060
+ def sync=: (boolish boolean) -> boolish
2061
+
2062
+ # <!--
2063
+ # rdoc-file=io.c
2064
+ # - sysread(maxlen) -> string
2065
+ # - sysread(maxlen, out_string) -> string
2066
+ # -->
2067
+ # Behaves like IO#readpartial, except that it uses low-level system functions.
2068
+ #
2069
+ # This method should not be used with other stream-reader methods.
2070
+ #
2071
+ def sysread: (Integer maxlen, ?String? outbuf) -> String
2072
+
2073
+ # <!--
2074
+ # rdoc-file=io.c
2075
+ # - sysseek(offset, whence = IO::SEEK_SET) -> integer
2076
+ # -->
2077
+ # Behaves like IO#seek, except that it:
2078
+ #
2079
+ # * Uses low-level system functions.
2080
+ # * Returns the new position.
2081
+ #
2082
+ def sysseek: (Integer amount, ?Integer whence) -> Integer
2083
+
2084
+ # <!--
2085
+ # rdoc-file=io.c
2086
+ # - syswrite(object) -> integer
2087
+ # -->
2088
+ # Writes the given `object` to self, which must be opened for writing (see
2089
+ # Modes); returns the number bytes written. If `object` is not a string is
2090
+ # converted via method to_s:
2091
+ #
2092
+ # f = File.new('t.tmp', 'w')
2093
+ # f.syswrite('foo') # => 3
2094
+ # f.syswrite(30) # => 2
2095
+ # f.syswrite(:foo) # => 3
2096
+ # f.close
2097
+ #
2098
+ # This methods should not be used with other stream-writer methods.
2099
+ #
2100
+ def syswrite: (_ToS object) -> Integer
2101
+
2102
+ # <!--
2103
+ # rdoc-file=io.c
2104
+ # - tell -> integer
2105
+ # -->
2106
+ # Returns the current position (in bytes) in `self` (see
2107
+ # [Position](rdoc-ref:IO@Position)):
2108
+ #
2109
+ # f = File.open('t.txt')
2110
+ # f.tell # => 0
2111
+ # f.gets # => "First line\n"
2112
+ # f.tell # => 12
2113
+ # f.close
2114
+ #
2115
+ # Related: IO#pos=, IO#seek.
2116
+ #
2117
+ def tell: () -> Integer
2118
+
2119
+ # <!-- rdoc-file=io.c -->
2120
+ # Returns the current position (in bytes) in `self` (see
2121
+ # [Position](rdoc-ref:IO@Position)):
2122
+ #
2123
+ # f = File.open('t.txt')
2124
+ # f.tell # => 0
2125
+ # f.gets # => "First line\n"
2126
+ # f.tell # => 12
2127
+ # f.close
2128
+ #
2129
+ # Related: IO#pos=, IO#seek.
2130
+ #
2131
+ alias pos tell
2132
+
2133
+ # <!--
2134
+ # rdoc-file=io.c
2135
+ # - timeout -> duration or nil
2136
+ # -->
2137
+ # Get the internal timeout duration or nil if it was not set.
2138
+ #
2139
+ def timeout: () -> io_timeout
2140
+
2141
+ # The type used for timeouts in `IO`.
2142
+ #
2143
+ # Technically, this type should be `Time::_Timeout?`. However, in the vast majority of use-cases,
2144
+ # people aren't going to pass their own `_Timeout` in, so `Numeric` is returned for ergonomics
2145
+ # (eg `io.timeout += 10`).
2146
+ type io_timeout = Numeric?
2147
+
2148
+ # <!--
2149
+ # rdoc-file=io.c
2150
+ # - timeout = duration -> duration
2151
+ # - timeout = nil -> nil
2152
+ # -->
2153
+ # Sets the internal timeout to the specified duration or nil. The timeout
2154
+ # applies to all blocking operations where possible.
2155
+ #
2156
+ # When the operation performs longer than the timeout set, IO::TimeoutError is
2157
+ # raised.
2158
+ #
2159
+ # This affects the following methods (but is not limited to): #gets, #puts,
2160
+ # #read, #write, #wait_readable and #wait_writable. This also affects blocking
2161
+ # socket operations like Socket#accept and Socket#connect.
2162
+ #
2163
+ # Some operations like File#open and IO#close are not affected by the timeout. A
2164
+ # timeout during a write operation may leave the IO in an inconsistent state,
2165
+ # e.g. data was partially written. Generally speaking, a timeout is a last ditch
2166
+ # effort to prevent an application from hanging on slow I/O operations, such as
2167
+ # those that occur during a slowloris attack.
2168
+ #
2169
+ def timeout=: (io_timeout duration) -> void
2170
+
2171
+ # <!--
2172
+ # rdoc-file=io.c
2173
+ # - to_io -> self
2174
+ # -->
2175
+ # Returns `self`.
2176
+ #
2177
+ def to_io: () -> self
2178
+
2179
+ # <!-- rdoc-file=io.c -->
2180
+ # Returns `true` if the stream is associated with a terminal device (tty),
2181
+ # `false` otherwise:
2182
+ #
2183
+ # f = File.new('t.txt').isatty #=> false
2184
+ # f.close
2185
+ # f = File.new('/dev/tty').isatty #=> true
2186
+ # f.close
2187
+ #
2188
+ alias tty? isatty
2189
+
2190
+ # <!--
2191
+ # rdoc-file=io.c
2192
+ # - ungetbyte(integer) -> nil
2193
+ # - ungetbyte(string) -> nil
2194
+ # -->
2195
+ # Pushes back ("unshifts") the given data onto the stream's buffer, placing the
2196
+ # data so that it is next to be read; returns `nil`. See [Byte
2197
+ # IO](rdoc-ref:IO@Byte+IO).
2198
+ #
2199
+ # Note that:
2200
+ #
2201
+ # * Calling the method has no effect with unbuffered reads (such as
2202
+ # IO#sysread).
2203
+ # * Calling #rewind on the stream discards the pushed-back data.
2204
+ #
2205
+ # When argument `integer` is given, uses only its low-order byte:
2206
+ #
2207
+ # File.write('t.tmp', '012')
2208
+ # f = File.open('t.tmp')
2209
+ # f.ungetbyte(0x41) # => nil
2210
+ # f.read # => "A012"
2211
+ # f.rewind
2212
+ # f.ungetbyte(0x4243) # => nil
2213
+ # f.read # => "C012"
2214
+ # f.close
2215
+ #
2216
+ # When argument `string` is given, uses all bytes:
2217
+ #
2218
+ # File.write('t.tmp', '012')
2219
+ # f = File.open('t.tmp')
2220
+ # f.ungetbyte('A') # => nil
2221
+ # f.read # => "A012"
2222
+ # f.rewind
2223
+ # f.ungetbyte('BCDE') # => nil
2224
+ # f.read # => "BCDE012"
2225
+ # f.close
2226
+ #
2227
+ def ungetbyte: (String | Integer object) -> nil
2228
+
2229
+ # <!--
2230
+ # rdoc-file=io.c
2231
+ # - ungetc(integer) -> nil
2232
+ # - ungetc(string) -> nil
2233
+ # -->
2234
+ # Pushes back ("unshifts") the given data onto the stream's buffer, placing the
2235
+ # data so that it is next to be read; returns `nil`. See [Character
2236
+ # IO](rdoc-ref:IO@Character+IO).
2237
+ #
2238
+ # Note that:
2239
+ #
2240
+ # * Calling the method has no effect with unbuffered reads (such as
2241
+ # IO#sysread).
2242
+ # * Calling #rewind on the stream discards the pushed-back data.
2243
+ #
2244
+ # When argument `integer` is given, interprets the integer as a character:
2245
+ #
2246
+ # File.write('t.tmp', '012')
2247
+ # f = File.open('t.tmp')
2248
+ # f.ungetc(0x41) # => nil
2249
+ # f.read # => "A012"
2250
+ # f.rewind
2251
+ # f.ungetc(0x0442) # => nil
2252
+ # f.getc.ord # => 1090
2253
+ # f.close
2254
+ #
2255
+ # When argument `string` is given, uses all characters:
2256
+ #
2257
+ # File.write('t.tmp', '012')
2258
+ # f = File.open('t.tmp')
2259
+ # f.ungetc('A') # => nil
2260
+ # f.read # => "A012"
2261
+ # f.rewind
2262
+ # f.ungetc("\u0442\u0435\u0441\u0442") # => nil
2263
+ # f.getc.ord # => 1090
2264
+ # f.getc.ord # => 1077
2265
+ # f.getc.ord # => 1089
2266
+ # f.getc.ord # => 1090
2267
+ # f.close
2268
+ #
2269
+ def ungetc: (String object) -> nil
2270
+
2271
+ # <!--
2272
+ # rdoc-file=io.c
2273
+ # - write(*objects) -> integer
2274
+ # -->
2275
+ # Writes each of the given `objects` to `self`, which must be opened for writing
2276
+ # (see [Access Modes](rdoc-ref:File@Access+Modes)); returns the total number
2277
+ # bytes written; each of `objects` that is not a string is converted via method
2278
+ # `to_s`:
2279
+ #
2280
+ # $stdout.write('Hello', ', ', 'World!', "\n") # => 14
2281
+ # $stdout.write('foo', :bar, 2, "\n") # => 8
2282
+ #
2283
+ # Output:
2284
+ #
2285
+ # Hello, World!
2286
+ # foobar2
2287
+ #
2288
+ # Related: IO#read.
2289
+ #
2290
+ def write: (*_ToS string) -> Integer
2291
+
2292
+ # <!--
2293
+ # rdoc-file=io.rb
2294
+ # - ios.write_nonblock(string) -> integer
2295
+ # - ios.write_nonblock(string [, options]) -> integer
2296
+ # -->
2297
+ # Writes the given string to *ios* using the write(2) system call after
2298
+ # O_NONBLOCK is set for the underlying file descriptor.
2299
+ #
2300
+ # It returns the number of bytes written.
2301
+ #
2302
+ # write_nonblock just calls the write(2) system call. It causes all errors the
2303
+ # write(2) system call causes: Errno::EWOULDBLOCK, Errno::EINTR, etc. The result
2304
+ # may also be smaller than string.length (partial write). The caller should care
2305
+ # such errors and partial write.
2306
+ #
2307
+ # If the exception is Errno::EWOULDBLOCK or Errno::EAGAIN, it is extended by
2308
+ # IO::WaitWritable. So IO::WaitWritable can be used to rescue the exceptions for
2309
+ # retrying write_nonblock.
2310
+ #
2311
+ # # Creates a pipe.
2312
+ # r, w = IO.pipe
2313
+ #
2314
+ # # write_nonblock writes only 65536 bytes and return 65536.
2315
+ # # (The pipe size is 65536 bytes on this environment.)
2316
+ # s = "a" * 100000
2317
+ # p w.write_nonblock(s) #=> 65536
2318
+ #
2319
+ # # write_nonblock cannot write a byte and raise EWOULDBLOCK (EAGAIN).
2320
+ # p w.write_nonblock("b") # Resource temporarily unavailable (Errno::EAGAIN)
2321
+ #
2322
+ # If the write buffer is not empty, it is flushed at first.
2323
+ #
2324
+ # When write_nonblock raises an exception kind of IO::WaitWritable,
2325
+ # write_nonblock should not be called until io is writable for avoiding busy
2326
+ # loop. This can be done as follows.
2327
+ #
2328
+ # begin
2329
+ # result = io.write_nonblock(string)
2330
+ # rescue IO::WaitWritable, Errno::EINTR
2331
+ # IO.select(nil, [io])
2332
+ # retry
2333
+ # end
2334
+ #
2335
+ # Note that this doesn't guarantee to write all data in string. The length
2336
+ # written is reported as result and it should be checked later.
2337
+ #
2338
+ # On some platforms such as Windows, write_nonblock is not supported according
2339
+ # to the kind of the IO object. In such cases, write_nonblock raises
2340
+ # <code>Errno::EBADF</code>.
2341
+ #
2342
+ # By specifying a keyword argument *exception* to `false`, you can indicate that
2343
+ # write_nonblock should not raise an IO::WaitWritable exception, but return the
2344
+ # symbol <code>:wait_writable</code> instead.
2345
+ #
2346
+ def write_nonblock: (_ToS s, ?exception: true) -> Integer
2347
+ | (_ToS s, exception: false) -> (Integer | :wait_writable | nil)
2348
+
2349
+ # <!--
2350
+ # rdoc-file=io.c
2351
+ # - IO.binread(path, length = nil, offset = 0) -> string or nil
2352
+ # -->
2353
+ # Behaves like IO.read, except that the stream is opened in binary mode with
2354
+ # ASCII-8BIT encoding.
2355
+ #
2356
+ def self.binread: (path name, ?Integer? length, ?Integer offset) -> String
2357
+
2358
+ # <!--
2359
+ # rdoc-file=io.c
2360
+ # - IO.binwrite(path, string, offset = 0) -> integer
2361
+ # -->
2362
+ # Behaves like IO.write, except that the stream is opened in binary mode with
2363
+ # ASCII-8BIT encoding.
2364
+ #
2365
+ def self.binwrite: (path name, _ToS string, ?Integer offset, ?mode: String mode) -> Integer
2366
+
2367
+ # <!--
2368
+ # rdoc-file=io.c
2369
+ # - IO.copy_stream(src, dst, src_length = nil, src_offset = 0) -> integer
2370
+ # -->
2371
+ # Copies from the given `src` to the given `dst`, returning the number of bytes
2372
+ # copied.
2373
+ #
2374
+ # * The given `src` must be one of the following:
2375
+ #
2376
+ # * The path to a readable file, from which source data is to be read.
2377
+ # * An IO-like object, opened for reading and capable of responding to
2378
+ # method <code>:readpartial</code> or method <code>:read</code>.
2379
+ #
2380
+ # * The given `dst` must be one of the following:
2381
+ #
2382
+ # * The path to a writable file, to which data is to be written.
2383
+ # * An IO-like object, opened for writing and capable of responding to
2384
+ # method <code>:write</code>.
2385
+ #
2386
+ # The examples here use file <code>t.txt</code> as source:
2387
+ #
2388
+ # File.read('t.txt')
2389
+ # # => "First line\nSecond line\n\nThird line\nFourth line\n"
2390
+ # File.read('t.txt').size # => 47
2391
+ #
2392
+ # If only arguments `src` and `dst` are given, the entire source stream is
2393
+ # copied:
2394
+ #
2395
+ # # Paths.
2396
+ # IO.copy_stream('t.txt', 't.tmp') # => 47
2397
+ #
2398
+ # # IOs (recall that a File is also an IO).
2399
+ # src_io = File.open('t.txt', 'r') # => #<File:t.txt>
2400
+ # dst_io = File.open('t.tmp', 'w') # => #<File:t.tmp>
2401
+ # IO.copy_stream(src_io, dst_io) # => 47
2402
+ # src_io.close
2403
+ # dst_io.close
2404
+ #
2405
+ # With argument `src_length` a non-negative integer, no more than that many
2406
+ # bytes are copied:
2407
+ #
2408
+ # IO.copy_stream('t.txt', 't.tmp', 10) # => 10
2409
+ # File.read('t.tmp') # => "First line"
2410
+ #
2411
+ # With argument `src_offset` also given, the source stream is read beginning at
2412
+ # that offset:
2413
+ #
2414
+ # IO.copy_stream('t.txt', 't.tmp', 11, 11) # => 11
2415
+ # IO.read('t.tmp') # => "Second line"
2416
+ #
2417
+ def self.copy_stream: (String | _Reader | _ReaderPartial src, String | _Writer dst, ?Integer? copy_length, ?Integer src_offset) -> Integer
2418
+
2419
+ # <!--
2420
+ # rdoc-file=io.c
2421
+ # - IO.popen(env = {}, cmd, mode = 'r', **opts) -> io
2422
+ # - IO.popen(env = {}, cmd, mode = 'r', **opts) {|io| ... } -> object
2423
+ # -->
2424
+ # Executes the given command `cmd` as a subprocess whose $stdin and $stdout are
2425
+ # connected to a new stream `io`.
2426
+ #
2427
+ # This method has potential security vulnerabilities if called with untrusted
2428
+ # input; see [Command Injection](rdoc-ref:security/command_injection.rdoc).
2429
+ #
2430
+ # If no block is given, returns the new stream, which depending on given `mode`
2431
+ # may be open for reading, writing, or both. The stream should be explicitly
2432
+ # closed (eventually) to avoid resource leaks.
2433
+ #
2434
+ # If a block is given, the stream is passed to the block (again, open for
2435
+ # reading, writing, or both); when the block exits, the stream is closed, the
2436
+ # block's value is returned, and the global variable <code>$?</code> is set to
2437
+ # the child's exit status.
2438
+ #
2439
+ # Optional argument `mode` may be any valid IO mode. See [Access
2440
+ # Modes](rdoc-ref:File@Access+Modes).
2441
+ #
2442
+ # Required argument `cmd` determines which of the following occurs:
2443
+ #
2444
+ # * The process forks.
2445
+ # * A specified program runs in a shell.
2446
+ # * A specified program runs with specified arguments.
2447
+ # * A specified program runs with specified arguments and a specified `argv0`.
2448
+ #
2449
+ # Each of these is detailed below.
2450
+ #
2451
+ # The optional hash argument `env` specifies name/value pairs that are to be
2452
+ # added to the environment variables for the subprocess:
2453
+ #
2454
+ # IO.popen({'FOO' => 'bar'}, 'ruby', 'r+') do |pipe|
2455
+ # pipe.puts 'puts ENV["FOO"]'
2456
+ # pipe.close_write
2457
+ # pipe.gets
2458
+ # end => "bar\n"
2459
+ #
2460
+ # Optional keyword arguments `opts` specify:
2461
+ #
2462
+ # * [Open options](rdoc-ref:IO@Open+Options).
2463
+ # * [Encoding options](rdoc-ref:encodings.rdoc@Encoding+Options).
2464
+ # * Options for Kernel#spawn.
2465
+ #
2466
+ # **Forked Process**
2467
+ #
2468
+ # When argument `cmd` is the 1-character string <code>'-'</code>, causes the
2469
+ # process to fork:
2470
+ # IO.popen('-') do |pipe|
2471
+ # if pipe
2472
+ # $stderr.puts "In parent, child pid is #{pipe.pid}\n"
2473
+ # else
2474
+ # $stderr.puts "In child, pid is #{$$}\n"
2475
+ # end
2476
+ # end
2477
+ #
2478
+ # Output:
2479
+ #
2480
+ # In parent, child pid is 26253
2481
+ # In child, pid is 26253
2482
+ #
2483
+ # Note that this is not supported on all platforms.
2484
+ #
2485
+ # **Shell Subprocess**
2486
+ #
2487
+ # When argument `cmd` is a single string (but not <code>'-'</code>), the program
2488
+ # named `cmd` is run as a shell command:
2489
+ #
2490
+ # IO.popen('uname') do |pipe|
2491
+ # pipe.readlines
2492
+ # end
2493
+ #
2494
+ # Output:
2495
+ #
2496
+ # ["Linux\n"]
2497
+ #
2498
+ # Another example:
2499
+ #
2500
+ # IO.popen('/bin/sh', 'r+') do |pipe|
2501
+ # pipe.puts('ls')
2502
+ # pipe.close_write
2503
+ # $stderr.puts pipe.readlines.size
2504
+ # end
2505
+ #
2506
+ # Output:
2507
+ #
2508
+ # 213
2509
+ #
2510
+ # **Program Subprocess**
2511
+ #
2512
+ # When argument `cmd` is an array of strings, the program named
2513
+ # <code>cmd[0]</code> is run with all elements of `cmd` as its arguments:
2514
+ #
2515
+ # IO.popen(['du', '..', '.']) do |pipe|
2516
+ # $stderr.puts pipe.readlines.size
2517
+ # end
2518
+ #
2519
+ # Output:
2520
+ #
2521
+ # 1111
2522
+ #
2523
+ # <strong>Program Subprocess with `argv0`</strong>
2524
+ #
2525
+ # When argument `cmd` is an array whose first element is a 2-element string
2526
+ # array and whose remaining elements (if any) are strings:
2527
+ #
2528
+ # * <code>cmd[0][0]</code> (the first string in the nested array) is the name
2529
+ # of a program that is run.
2530
+ # * <code>cmd[0][1]</code> (the second string in the nested array) is set as
2531
+ # the program's <code>argv[0]</code>.
2532
+ # * <code>cmd[1..-1]</code> (the strings in the outer array) are the program's
2533
+ # arguments.
2534
+ #
2535
+ # Example (sets <code>$0</code> to 'foo'):
2536
+ #
2537
+ # IO.popen([['/bin/sh', 'foo'], '-c', 'echo $0']).read # => "foo\n"
2538
+ #
2539
+ # **Some Special Examples**
2540
+ #
2541
+ # # Set IO encoding.
2542
+ # IO.popen("nkf -e filename", :external_encoding=>"EUC-JP") {|nkf_io|
2543
+ # euc_jp_string = nkf_io.read
2544
+ # }
2545
+ #
2546
+ # # Merge standard output and standard error using Kernel#spawn option. See Kernel#spawn.
2547
+ # IO.popen(["ls", "/", :err=>[:child, :out]]) do |io|
2548
+ # ls_result_with_error = io.read
2549
+ # end
2550
+ #
2551
+ # # Use mixture of spawn options and IO options.
2552
+ # IO.popen(["ls", "/"], :err=>[:child, :out]) do |io|
2553
+ # ls_result_with_error = io.read
2554
+ # end
2555
+ #
2556
+ # f = IO.popen("uname")
2557
+ # p f.readlines
2558
+ # f.close
2559
+ # puts "Parent is #{Process.pid}"
2560
+ # IO.popen("date") {|f| puts f.gets }
2561
+ # IO.popen("-") {|f| $stderr.puts "#{Process.pid} is here, f is #{f.inspect}"}
2562
+ # p $?
2563
+ # IO.popen(%w"sed -e s|^|<foo>| -e s&$&;zot;&", "r+") {|f|
2564
+ # f.puts "bar"; f.close_write; puts f.gets
2565
+ # }
2566
+ #
2567
+ # Output (from last section):
2568
+ #
2569
+ # ["Linux\n"]
2570
+ # Parent is 21346
2571
+ # Thu Jan 15 22:41:19 JST 2009
2572
+ # 21346 is here, f is #<IO:fd 3>
2573
+ # 21352 is here, f is nil
2574
+ # #<Process::Status: pid 21352 exit 0>
2575
+ # <foo>bar;zot;
2576
+ #
2577
+ # Raises exceptions that IO.pipe and Kernel.spawn raise.
2578
+ #
2579
+ def self.popen: (string | cmd_array cmd, ?string | int mode, ?path: string?, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String, ?unsetenv_others: bool, ?pgroup: true | Integer, ?umask: Integer, ?in: Kernel::redirect_fd, ?out: Kernel::redirect_fd, ?err: Kernel::redirect_fd, ?close_others: bool, ?chdir: String) -> instance
2580
+ | (Hash[string, string?] env, string | cmd_array cmd, ?string | int mode, ?path: string?, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String, ?unsetenv_others: bool, ?pgroup: true | Integer, ?umask: Integer, ?in: Kernel::redirect_fd, ?out: Kernel::redirect_fd, ?err: Kernel::redirect_fd, ?close_others: bool, ?chdir: String) -> instance
2581
+ | [X] (string | cmd_array cmd, ?string | int mode, ?path: string?, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String, ?unsetenv_others: bool, ?pgroup: true | Integer, ?umask: Integer, ?in: Kernel::redirect_fd, ?out: Kernel::redirect_fd, ?err: Kernel::redirect_fd, ?close_others: bool, ?chdir: String) { (instance) -> X } -> X
2582
+ | [X] (Hash[string, string?] env, string | cmd_array cmd, ?string | int mode, ?path: string?, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String, ?unsetenv_others: bool, ?pgroup: true | Integer, ?umask: Integer, ?in: Kernel::redirect_fd, ?out: Kernel::redirect_fd, ?err: Kernel::redirect_fd, ?close_others: bool, ?chdir: String) { (instance) -> X } -> X
2583
+
2584
+ # The command can be given as:
2585
+ #
2586
+ # * Array of string `["ruby", "-v"]`, or
2587
+ # * Array of string with the first element of array `[["ruby", "RUBY"], "-v"]`
2588
+ #
2589
+ # But RBS cannot define such a type. So this is simply a union of `string` or `[String, String]`.
2590
+ #
2591
+ type cmd_array = array[string | [String, String]]
2592
+
2593
+ # <!--
2594
+ # rdoc-file=io.c
2595
+ # - IO.foreach(path, sep = $/, **opts) {|line| block } -> nil
2596
+ # - IO.foreach(path, limit, **opts) {|line| block } -> nil
2597
+ # - IO.foreach(path, sep, limit, **opts) {|line| block } -> nil
2598
+ # - IO.foreach(...) -> an_enumerator
2599
+ # -->
2600
+ # Calls the block with each successive line read from the stream.
2601
+ #
2602
+ # The first argument must be a string that is the path to a file.
2603
+ #
2604
+ # With only argument `path` given, parses lines from the file at the given
2605
+ # `path`, as determined by the default line separator, and calls the block with
2606
+ # each successive line:
2607
+ #
2608
+ # File.foreach('t.txt') {|line| p line }
2609
+ #
2610
+ # Output: the same as above.
2611
+ #
2612
+ # For both forms, command and path, the remaining arguments are the same.
2613
+ #
2614
+ # With argument `sep` given, parses lines as determined by that line separator
2615
+ # (see [Line Separator](rdoc-ref:IO@Line+Separator)):
2616
+ #
2617
+ # File.foreach('t.txt', 'li') {|line| p line }
2618
+ #
2619
+ # Output:
2620
+ #
2621
+ # "First li"
2622
+ # "ne\nSecond li"
2623
+ # "ne\n\nThird li"
2624
+ # "ne\nFourth li"
2625
+ # "ne\n"
2626
+ #
2627
+ # Each paragraph:
2628
+ #
2629
+ # File.foreach('t.txt', '') {|paragraph| p paragraph }
2630
+ #
2631
+ # Output:
2632
+ #
2633
+ # "First line\nSecond line\n\n"
2634
+ # "Third line\nFourth line\n"
2635
+ #
2636
+ # With argument `limit` given, parses lines as determined by the default line
2637
+ # separator and the given line-length limit (see [Line
2638
+ # Separator](rdoc-ref:IO@Line+Separator) and [Line
2639
+ # Limit](rdoc-ref:IO@Line+Limit)):
2640
+ #
2641
+ # File.foreach('t.txt', 7) {|line| p line }
2642
+ #
2643
+ # Output:
2644
+ #
2645
+ # "First l"
2646
+ # "ine\n"
2647
+ # "Second "
2648
+ # "line\n"
2649
+ # "\n"
2650
+ # "Third l"
2651
+ # "ine\n"
2652
+ # "Fourth l"
2653
+ # "line\n"
2654
+ #
2655
+ # With arguments `sep` and `limit` given, combines the two behaviors (see [Line
2656
+ # Separator and Line Limit](rdoc-ref:IO@Line+Separator+and+Line+Limit)).
2657
+ #
2658
+ # Optional keyword arguments `opts` specify:
2659
+ #
2660
+ # * [Open Options](rdoc-ref:IO@Open+Options).
2661
+ # * [Encoding options](rdoc-ref:encodings.rdoc@Encoding+Options).
2662
+ # * [Line Options](rdoc-ref:IO@Line+IO).
2663
+ #
2664
+ # Returns an Enumerator if no block is given.
2665
+ #
2666
+ def self.foreach: (path path, ?String sep, ?Integer limit, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String, ?chomp: boolish) { (String line) -> void } -> nil
2667
+ | (path path, ?String sep, ?Integer limit, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String, ?chomp: boolish) -> ::Enumerator[String, nil]
2668
+
2669
+ # <!--
2670
+ # rdoc-file=io.c
2671
+ # - IO.pipe(**opts) -> [read_io, write_io]
2672
+ # - IO.pipe(enc, **opts) -> [read_io, write_io]
2673
+ # - IO.pipe(ext_enc, int_enc, **opts) -> [read_io, write_io]
2674
+ # - IO.pipe(**opts) {|read_io, write_io| ...} -> object
2675
+ # - IO.pipe(enc, **opts) {|read_io, write_io| ...} -> object
2676
+ # - IO.pipe(ext_enc, int_enc, **opts) {|read_io, write_io| ...} -> object
2677
+ # -->
2678
+ # Creates a pair of pipe endpoints, `read_io` and `write_io`, connected to each
2679
+ # other.
2680
+ #
2681
+ # If argument `enc_string` is given, it must be a string containing one of:
2682
+ #
2683
+ # * The name of the encoding to be used as the external encoding.
2684
+ # * The colon-separated names of two encodings to be used as the external and
2685
+ # internal encodings.
2686
+ #
2687
+ # If argument `int_enc` is given, it must be an Encoding object or encoding name
2688
+ # string that specifies the internal encoding to be used; if argument `ext_enc`
2689
+ # is also given, it must be an Encoding object or encoding name string that
2690
+ # specifies the external encoding to be used.
2691
+ #
2692
+ # The string read from `read_io` is tagged with the external encoding; if an
2693
+ # internal encoding is also specified, the string is converted to, and tagged
2694
+ # with, that encoding.
2695
+ #
2696
+ # If any encoding is specified, optional hash arguments specify the conversion
2697
+ # option.
2698
+ #
2699
+ # Optional keyword arguments `opts` specify:
2700
+ #
2701
+ # * [Open Options](rdoc-ref:IO@Open+Options).
2702
+ # * [Encoding Options](rdoc-ref:encodings.rdoc@Encoding+Options).
2703
+ #
2704
+ # With no block given, returns the two endpoints in an array:
2705
+ #
2706
+ # IO.pipe # => [#<IO:fd 4>, #<IO:fd 5>]
2707
+ #
2708
+ # With a block given, calls the block with the two endpoints; closes both
2709
+ # endpoints and returns the value of the block:
2710
+ #
2711
+ # IO.pipe {|read_io, write_io| p read_io; p write_io }
2712
+ #
2713
+ # Output:
2714
+ #
2715
+ # #<IO:fd 6>
2716
+ # #<IO:fd 7>
2717
+ #
2718
+ # Not available on all platforms.
2719
+ #
2720
+ # In the example below, the two processes close the ends of the pipe that they
2721
+ # are not using. This is not just a cosmetic nicety. The read end of a pipe will
2722
+ # not generate an end of file condition if there are any writers with the pipe
2723
+ # still open. In the case of the parent process, the <code>rd.read</code> will
2724
+ # never return if it does not first issue a <code>wr.close</code>:
2725
+ #
2726
+ # rd, wr = IO.pipe
2727
+ #
2728
+ # if fork
2729
+ # wr.close
2730
+ # puts "Parent got: <#{rd.read}>"
2731
+ # rd.close
2732
+ # Process.wait
2733
+ # else
2734
+ # rd.close
2735
+ # puts 'Sending message to parent'
2736
+ # wr.write "Hi Dad"
2737
+ # wr.close
2738
+ # end
2739
+ #
2740
+ # <em>produces:</em>
2741
+ #
2742
+ # Sending message to parent
2743
+ # Parent got: <Hi Dad>
2744
+ #
2745
+ def self.pipe: (?String | Encoding | nil ext_or_ext_int_enc, ?String | Encoding | nil int_enc, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String, ?chomp: boolish) -> [IO, IO]
2746
+ | [X] (?String | Encoding | nil ext_or_ext_int_enc, ?String | Encoding | nil int_enc, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String, ?chomp: boolish) { (IO read_io, IO write_io) -> X } -> X
2747
+
2748
+ # <!--
2749
+ # rdoc-file=io.c
2750
+ # - IO.read(path, length = nil, offset = 0, **opts) -> string or nil
2751
+ # -->
2752
+ # Opens the stream, reads and returns some or all of its content, and closes the
2753
+ # stream; returns `nil` if no bytes were read.
2754
+ #
2755
+ # The first argument must be a string that is the path to a file.
2756
+ #
2757
+ # With only argument `path` given, reads in text mode and returns the entire
2758
+ # content of the file at the given path:
2759
+ #
2760
+ # IO.read('t.txt')
2761
+ # # => "First line\nSecond line\n\nThird line\nFourth line\n"
2762
+ #
2763
+ # On Windows, text mode can terminate reading and leave bytes in the file unread
2764
+ # when encountering certain special bytes. Consider using IO.binread if all
2765
+ # bytes in the file should be read.
2766
+ #
2767
+ # With argument `length`, returns `length` bytes if available:
2768
+ #
2769
+ # IO.read('t.txt', 7) # => "First l"
2770
+ # IO.read('t.txt', 700)
2771
+ # # => "First line\r\nSecond line\r\n\r\nFourth line\r\nFifth line\r\n"
2772
+ #
2773
+ # With arguments `length` and `offset`, returns `length` bytes if available,
2774
+ # beginning at the given `offset`:
2775
+ #
2776
+ # IO.read('t.txt', 10, 2) # => "rst line\nS"
2777
+ # IO.read('t.txt', 10, 200) # => nil
2778
+ #
2779
+ # Optional keyword arguments `opts` specify:
2780
+ #
2781
+ # * [Open Options](rdoc-ref:IO@Open+Options).
2782
+ # * [Encoding options](rdoc-ref:encodings.rdoc@Encoding+Options).
2783
+ #
2784
+ def self.read: (path name, ?Integer? length, ?Integer offset, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String) -> String
2785
+
2786
+ # <!--
2787
+ # rdoc-file=io.c
2788
+ # - IO.readlines(path, sep = $/, **opts) -> array
2789
+ # - IO.readlines(path, limit, **opts) -> array
2790
+ # - IO.readlines(path, sep, limit, **opts) -> array
2791
+ # -->
2792
+ # Returns an array of all lines read from the stream.
2793
+ #
2794
+ # The first argument must be a string that is the path to a file.
2795
+ #
2796
+ # With only argument `path` given, parses lines from the file at the given
2797
+ # `path`, as determined by the default line separator, and returns those lines
2798
+ # in an array:
2799
+ #
2800
+ # IO.readlines('t.txt')
2801
+ # # => ["First line\n", "Second line\n", "\n", "Third line\n", "Fourth line\n"]
2802
+ #
2803
+ # With argument `sep` given, parses lines as determined by that line separator
2804
+ # (see [Line Separator](rdoc-ref:IO@Line+Separator)):
2805
+ #
2806
+ # # Ordinary separator.
2807
+ # IO.readlines('t.txt', 'li')
2808
+ # # =>["First li", "ne\nSecond li", "ne\n\nThird li", "ne\nFourth li", "ne\n"]
2809
+ # # Get-paragraphs separator.
2810
+ # IO.readlines('t.txt', '')
2811
+ # # => ["First line\nSecond line\n\n", "Third line\nFourth line\n"]
2812
+ # # Get-all separator.
2813
+ # IO.readlines('t.txt', nil)
2814
+ # # => ["First line\nSecond line\n\nThird line\nFourth line\n"]
2815
+ #
2816
+ # With argument `limit` given, parses lines as determined by the default line
2817
+ # separator and the given line-length limit (see [Line
2818
+ # Separator](rdoc-ref:IO@Line+Separator) and [Line
2819
+ # Limit](rdoc-ref:IO@Line+Limit):
2820
+ #
2821
+ # IO.readlines('t.txt', 7)
2822
+ # # => ["First l", "ine\n", "Second ", "line\n", "\n", "Third l", "ine\n", "Fourth ", "line\n"]
2823
+ #
2824
+ # With arguments `sep` and `limit` given, combines the two behaviors (see [Line
2825
+ # Separator and Line Limit](rdoc-ref:IO@Line+Separator+and+Line+Limit)).
2826
+ #
2827
+ # Optional keyword arguments `opts` specify:
2828
+ #
2829
+ # * [Open Options](rdoc-ref:IO@Open+Options).
2830
+ # * [Encoding options](rdoc-ref:encodings.rdoc@Encoding+Options).
2831
+ # * [Line Options](rdoc-ref:IO@Line+IO).
2832
+ #
2833
+ def self.readlines: (path name, ?String sep, ?Integer limit, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String, ?chomp: boolish) -> ::Array[String]
2834
+
2835
+ # <!--
2836
+ # rdoc-file=io.c
2837
+ # - IO.select(read_ios, write_ios = [], error_ios = [], timeout = nil) -> array or nil
2838
+ # -->
2839
+ # Invokes system call [select(2)](https://linux.die.net/man/2/select), which
2840
+ # monitors multiple file descriptors, waiting until one or more of the file
2841
+ # descriptors becomes ready for some class of I/O operation.
2842
+ #
2843
+ # Not implemented on all platforms.
2844
+ #
2845
+ # Each of the arguments `read_ios`, `write_ios`, and `error_ios` is an array of
2846
+ # IO objects.
2847
+ #
2848
+ # Argument `timeout` is a numeric value (such as integer or float) timeout
2849
+ # interval in seconds. `timeout` can also be `nil` or
2850
+ # <code>Float::INFINITY</code>. `nil` and <code>Float::INFINITY</code> means no
2851
+ # timeout.
2852
+ #
2853
+ # The method monitors the IO objects given in all three arrays, waiting for some
2854
+ # to be ready; returns a 3-element array whose elements are:
2855
+ #
2856
+ # * An array of the objects in `read_ios` that are ready for reading.
2857
+ # * An array of the objects in `write_ios` that are ready for writing.
2858
+ # * An array of the objects in `error_ios` have pending exceptions.
2859
+ #
2860
+ # If no object becomes ready within the given `timeout`, `nil` is returned.
2861
+ #
2862
+ # IO.select peeks the buffer of IO objects for testing readability. If the IO
2863
+ # buffer is not empty, IO.select immediately notifies readability. This "peek"
2864
+ # only happens for IO objects. It does not happen for IO-like objects such as
2865
+ # OpenSSL::SSL::SSLSocket.
2866
+ #
2867
+ # The best way to use IO.select is invoking it after non-blocking methods such
2868
+ # as #read_nonblock, #write_nonblock, etc. The methods raise an exception which
2869
+ # is extended by IO::WaitReadable or IO::WaitWritable. The modules notify how
2870
+ # the caller should wait with IO.select. If IO::WaitReadable is raised, the
2871
+ # caller should wait for reading. If IO::WaitWritable is raised, the caller
2872
+ # should wait for writing.
2873
+ #
2874
+ # So, blocking read (#readpartial) can be emulated using #read_nonblock and
2875
+ # IO.select as follows:
2876
+ #
2877
+ # begin
2878
+ # result = io_like.read_nonblock(maxlen)
2879
+ # rescue IO::WaitReadable
2880
+ # IO.select([io_like])
2881
+ # retry
2882
+ # rescue IO::WaitWritable
2883
+ # IO.select(nil, [io_like])
2884
+ # retry
2885
+ # end
2886
+ #
2887
+ # Especially, the combination of non-blocking methods and IO.select is preferred
2888
+ # for IO like objects such as OpenSSL::SSL::SSLSocket. It has #to_io method to
2889
+ # return underlying IO object. IO.select calls #to_io to obtain the file
2890
+ # descriptor to wait.
2891
+ #
2892
+ # This means that readability notified by IO.select doesn't mean readability
2893
+ # from OpenSSL::SSL::SSLSocket object.
2894
+ #
2895
+ # The most likely situation is that OpenSSL::SSL::SSLSocket buffers some data.
2896
+ # IO.select doesn't see the buffer. So IO.select can block when
2897
+ # OpenSSL::SSL::SSLSocket#readpartial doesn't block.
2898
+ #
2899
+ # However, several more complicated situations exist.
2900
+ #
2901
+ # SSL is a protocol which is sequence of records. The record consists of
2902
+ # multiple bytes. So, the remote side of SSL sends a partial record, IO.select
2903
+ # notifies readability but OpenSSL::SSL::SSLSocket cannot decrypt a byte and
2904
+ # OpenSSL::SSL::SSLSocket#readpartial will block.
2905
+ #
2906
+ # Also, the remote side can request SSL renegotiation which forces the local SSL
2907
+ # engine to write some data. This means OpenSSL::SSL::SSLSocket#readpartial may
2908
+ # invoke #write system call and it can block. In such a situation,
2909
+ # OpenSSL::SSL::SSLSocket#read_nonblock raises IO::WaitWritable instead of
2910
+ # blocking. So, the caller should wait for ready for writability as above
2911
+ # example.
2912
+ #
2913
+ # The combination of non-blocking methods and IO.select is also useful for
2914
+ # streams such as tty, pipe socket socket when multiple processes read from a
2915
+ # stream.
2916
+ #
2917
+ # Finally, Linux kernel developers don't guarantee that readability of select(2)
2918
+ # means readability of following read(2) even for a single process; see
2919
+ # [select(2)](https://linux.die.net/man/2/select)
2920
+ #
2921
+ # Invoking IO.select before IO#readpartial works well as usual. However it is
2922
+ # not the best way to use IO.select.
2923
+ #
2924
+ # The writability notified by select(2) doesn't show how many bytes are
2925
+ # writable. IO#write method blocks until given whole string is written. So,
2926
+ # <code>IO#write(two or more bytes)</code> can block after writability is
2927
+ # notified by IO.select. IO#write_nonblock is required to avoid the blocking.
2928
+ #
2929
+ # Blocking write (#write) can be emulated using #write_nonblock and IO.select as
2930
+ # follows: IO::WaitReadable should also be rescued for SSL renegotiation in
2931
+ # OpenSSL::SSL::SSLSocket.
2932
+ #
2933
+ # while 0 < string.bytesize
2934
+ # begin
2935
+ # written = io_like.write_nonblock(string)
2936
+ # rescue IO::WaitReadable
2937
+ # IO.select([io_like])
2938
+ # retry
2939
+ # rescue IO::WaitWritable
2940
+ # IO.select(nil, [io_like])
2941
+ # retry
2942
+ # end
2943
+ # string = string.byteslice(written..-1)
2944
+ # end
2945
+ #
2946
+ # Example:
2947
+ #
2948
+ # rp, wp = IO.pipe
2949
+ # mesg = "ping "
2950
+ # 100.times {
2951
+ # # IO.select follows IO#read. Not the best way to use IO.select.
2952
+ # rs, ws, = IO.select([rp], [wp])
2953
+ # if r = rs[0]
2954
+ # ret = r.read(5)
2955
+ # print ret
2956
+ # case ret
2957
+ # when /ping/
2958
+ # mesg = "pong\n"
2959
+ # when /pong/
2960
+ # mesg = "ping "
2961
+ # end
2962
+ # end
2963
+ # if w = ws[0]
2964
+ # w.write(mesg)
2965
+ # end
2966
+ # }
2967
+ #
2968
+ # Output:
2969
+ #
2970
+ # ping pong
2971
+ # ping pong
2972
+ # ping pong
2973
+ # (snipped)
2974
+ # ping
2975
+ #
2976
+ def self.select: [X, Y, Z] (::Array[X & io]? read_array, ?::Array[Y & io]? write_array, ?::Array[Z & io]? error_array) -> [ Array[X], Array[Y], Array[Z] ]
2977
+ | [X, Y, Z] (::Array[X & io]? read_array, ?::Array[Y & io]? write_array, ?::Array[Z & io]? error_array, Time::_Timeout? timeout) -> [ Array[X], Array[Y], Array[Z] ]?
2978
+
2979
+ # <!--
2980
+ # rdoc-file=io.c
2981
+ # - IO.sysopen(path, mode = 'r', perm = 0666) -> integer
2982
+ # -->
2983
+ # Opens the file at the given path with the given mode and permissions; returns
2984
+ # the integer file descriptor.
2985
+ #
2986
+ # If the file is to be readable, it must exist; if the file is to be writable
2987
+ # and does not exist, it is created with the given permissions:
2988
+ #
2989
+ # File.write('t.tmp', '') # => 0
2990
+ # IO.sysopen('t.tmp') # => 8
2991
+ # IO.sysopen('t.tmp', 'w') # => 9
2992
+ #
2993
+ def self.sysopen: (String path, ?String mode, ?String perm) -> Integer
2994
+
2995
+ # <!--
2996
+ # rdoc-file=io.c
2997
+ # - IO.try_convert(object) -> new_io or nil
2998
+ # -->
2999
+ # Attempts to convert `object` into an IO object via method `to_io`; returns the
3000
+ # new IO object if successful, or `nil` otherwise:
3001
+ #
3002
+ # IO.try_convert(STDOUT) # => #<IO:<STDOUT>>
3003
+ # IO.try_convert(ARGF) # => #<IO:<STDIN>>
3004
+ # IO.try_convert('STDOUT') # => nil
3005
+ #
3006
+ def self.try_convert: (_ToIO obj) -> IO
3007
+ | (untyped obj) -> IO?
3008
+
3009
+ # <!--
3010
+ # rdoc-file=io.c
3011
+ # - IO.write(path, data, offset = 0, **opts) -> integer
3012
+ # -->
3013
+ # Opens the stream, writes the given `data` to it, and closes the stream;
3014
+ # returns the number of bytes written.
3015
+ #
3016
+ # The first argument must be a string that is the path to a file.
3017
+ #
3018
+ # With only argument `path` given, writes the given `data` to the file at that
3019
+ # path:
3020
+ #
3021
+ # IO.write('t.tmp', 'abc') # => 3
3022
+ # File.read('t.tmp') # => "abc"
3023
+ #
3024
+ # If `offset` is zero (the default), the file is overwritten:
3025
+ #
3026
+ # IO.write('t.tmp', 'A') # => 1
3027
+ # File.read('t.tmp') # => "A"
3028
+ #
3029
+ # If `offset` in within the file content, the file is partly overwritten:
3030
+ #
3031
+ # IO.write('t.tmp', 'abcdef') # => 3
3032
+ # File.read('t.tmp') # => "abcdef"
3033
+ # # Offset within content.
3034
+ # IO.write('t.tmp', '012', 2) # => 3
3035
+ # File.read('t.tmp') # => "ab012f"
3036
+ #
3037
+ # If `offset` is outside the file content, the file is padded with null
3038
+ # characters <code>"\u0000"</code>:
3039
+ #
3040
+ # IO.write('t.tmp', 'xyz', 10) # => 3
3041
+ # File.read('t.tmp') # => "ab012f\u0000\u0000\u0000\u0000xyz"
3042
+ #
3043
+ # Optional keyword arguments `opts` specify:
3044
+ #
3045
+ # * [Open Options](rdoc-ref:IO@Open+Options).
3046
+ # * [Encoding options](rdoc-ref:encodings.rdoc@Encoding+Options).
3047
+ #
3048
+ def self.write: (path path, _ToS data, ?Integer offset, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String) -> Integer
3049
+
3050
+ # <!--
3051
+ # rdoc-file=io.c
3052
+ # - IO.for_fd(fd, mode = 'r', **opts) -> io
3053
+ # -->
3054
+ # Synonym for IO.new.
3055
+ #
3056
+ alias self.for_fd self.new
3057
+
3058
+ # <!--
3059
+ # rdoc-file=io.c
3060
+ # - IO.open(fd, mode = 'r', **opts) -> io
3061
+ # - IO.open(fd, mode = 'r', **opts) {|io| ... } -> object
3062
+ # -->
3063
+ # Creates a new IO object, via IO.new with the given arguments.
3064
+ #
3065
+ # With no block given, returns the IO object.
3066
+ #
3067
+ # With a block given, calls the block with the IO object and returns the block's
3068
+ # value.
3069
+ #
3070
+ def self.open: (int fd, ?string | int mode, ?path: string?, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String) -> instance
3071
+ | [X] (int fd, ?string | int mode, ?path: string?, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String) { (instance) -> X } -> X
3072
+
3073
+ # <!-- rdoc-file=io.c -->
3074
+ # Calls the block with each remaining line read from the stream; returns `self`.
3075
+ # Does nothing if already at end-of-stream; See [Line IO](rdoc-ref:IO@Line+IO).
3076
+ #
3077
+ # With no arguments given, reads lines as determined by line separator
3078
+ # <code>$/</code>:
3079
+ #
3080
+ # f = File.new('t.txt')
3081
+ # f.each_line {|line| p line }
3082
+ # f.each_line {|line| fail 'Cannot happen' }
3083
+ # f.close
3084
+ #
3085
+ # Output:
3086
+ #
3087
+ # "First line\n"
3088
+ # "Second line\n"
3089
+ # "\n"
3090
+ # "Fourth line\n"
3091
+ # "Fifth line\n"
3092
+ #
3093
+ # With only string argument `sep` given, reads lines as determined by line
3094
+ # separator `sep`; see [Line Separator](rdoc-ref:IO@Line+Separator):
3095
+ #
3096
+ # f = File.new('t.txt')
3097
+ # f.each_line('li') {|line| p line }
3098
+ # f.close
3099
+ #
3100
+ # Output:
3101
+ #
3102
+ # "First li"
3103
+ # "ne\nSecond li"
3104
+ # "ne\n\nFourth li"
3105
+ # "ne\nFifth li"
3106
+ # "ne\n"
3107
+ #
3108
+ # The two special values for `sep` are honored:
3109
+ #
3110
+ # f = File.new('t.txt')
3111
+ # # Get all into one string.
3112
+ # f.each_line(nil) {|line| p line }
3113
+ # f.close
3114
+ #
3115
+ # Output:
3116
+ #
3117
+ # "First line\nSecond line\n\nFourth line\nFifth line\n"
3118
+ #
3119
+ # f.rewind
3120
+ # # Get paragraphs (up to two line separators).
3121
+ # f.each_line('') {|line| p line }
3122
+ #
3123
+ # Output:
3124
+ #
3125
+ # "First line\nSecond line\n\n"
3126
+ # "Fourth line\nFifth line\n"
3127
+ #
3128
+ # With only integer argument `limit` given, limits the number of bytes in each
3129
+ # line; see [Line Limit](rdoc-ref:IO@Line+Limit):
3130
+ #
3131
+ # f = File.new('t.txt')
3132
+ # f.each_line(8) {|line| p line }
3133
+ # f.close
3134
+ #
3135
+ # Output:
3136
+ #
3137
+ # "First li"
3138
+ # "ne\n"
3139
+ # "Second l"
3140
+ # "ine\n"
3141
+ # "\n"
3142
+ # "Fourth l"
3143
+ # "ine\n"
3144
+ # "Fifth li"
3145
+ # "ne\n"
3146
+ #
3147
+ # With arguments `sep` and `limit` given, combines the two behaviors (see [Line
3148
+ # Separator and Line Limit](rdoc-ref:IO@Line+Separator+and+Line+Limit)).
3149
+ #
3150
+ # Optional keyword argument `chomp` specifies whether line separators are to be
3151
+ # omitted:
3152
+ #
3153
+ # f = File.new('t.txt')
3154
+ # f.each_line(chomp: true) {|line| p line }
3155
+ # f.close
3156
+ #
3157
+ # Output:
3158
+ #
3159
+ # "First line"
3160
+ # "Second line"
3161
+ # ""
3162
+ # "Fourth line"
3163
+ # "Fifth line"
3164
+ #
3165
+ # Returns an Enumerator if no block is given.
3166
+ #
3167
+ def each_line: (?string sep, ?int limit, ?chomp: boolish) { (String line) -> void } -> self
3168
+ | (?string sep, ?int limit, ?chomp: boolish) -> ::Enumerator[String, self]
3169
+
3170
+ # <!--
3171
+ # rdoc-file=io.c
3172
+ # - each_line(sep = $/, chomp: false) {|line| ... } -> self
3173
+ # - each_line(limit, chomp: false) {|line| ... } -> self
3174
+ # - each_line(sep, limit, chomp: false) {|line| ... } -> self
3175
+ # - each_line -> enumerator
3176
+ # -->
3177
+ # Calls the block with each remaining line read from the stream; returns `self`.
3178
+ # Does nothing if already at end-of-stream; See [Line IO](rdoc-ref:IO@Line+IO).
3179
+ #
3180
+ # With no arguments given, reads lines as determined by line separator
3181
+ # <code>$/</code>:
3182
+ #
3183
+ # f = File.new('t.txt')
3184
+ # f.each_line {|line| p line }
3185
+ # f.each_line {|line| fail 'Cannot happen' }
3186
+ # f.close
3187
+ #
3188
+ # Output:
3189
+ #
3190
+ # "First line\n"
3191
+ # "Second line\n"
3192
+ # "\n"
3193
+ # "Fourth line\n"
3194
+ # "Fifth line\n"
3195
+ #
3196
+ # With only string argument `sep` given, reads lines as determined by line
3197
+ # separator `sep`; see [Line Separator](rdoc-ref:IO@Line+Separator):
3198
+ #
3199
+ # f = File.new('t.txt')
3200
+ # f.each_line('li') {|line| p line }
3201
+ # f.close
3202
+ #
3203
+ # Output:
3204
+ #
3205
+ # "First li"
3206
+ # "ne\nSecond li"
3207
+ # "ne\n\nFourth li"
3208
+ # "ne\nFifth li"
3209
+ # "ne\n"
3210
+ #
3211
+ # The two special values for `sep` are honored:
3212
+ #
3213
+ # f = File.new('t.txt')
3214
+ # # Get all into one string.
3215
+ # f.each_line(nil) {|line| p line }
3216
+ # f.close
3217
+ #
3218
+ # Output:
3219
+ #
3220
+ # "First line\nSecond line\n\nFourth line\nFifth line\n"
3221
+ #
3222
+ # f.rewind
3223
+ # # Get paragraphs (up to two line separators).
3224
+ # f.each_line('') {|line| p line }
3225
+ #
3226
+ # Output:
3227
+ #
3228
+ # "First line\nSecond line\n\n"
3229
+ # "Fourth line\nFifth line\n"
3230
+ #
3231
+ # With only integer argument `limit` given, limits the number of bytes in each
3232
+ # line; see [Line Limit](rdoc-ref:IO@Line+Limit):
3233
+ #
3234
+ # f = File.new('t.txt')
3235
+ # f.each_line(8) {|line| p line }
3236
+ # f.close
3237
+ #
3238
+ # Output:
3239
+ #
3240
+ # "First li"
3241
+ # "ne\n"
3242
+ # "Second l"
3243
+ # "ine\n"
3244
+ # "\n"
3245
+ # "Fourth l"
3246
+ # "ine\n"
3247
+ # "Fifth li"
3248
+ # "ne\n"
3249
+ #
3250
+ # With arguments `sep` and `limit` given, combines the two behaviors (see [Line
3251
+ # Separator and Line Limit](rdoc-ref:IO@Line+Separator+and+Line+Limit)).
3252
+ #
3253
+ # Optional keyword argument `chomp` specifies whether line separators are to be
3254
+ # omitted:
3255
+ #
3256
+ # f = File.new('t.txt')
3257
+ # f.each_line(chomp: true) {|line| p line }
3258
+ # f.close
3259
+ #
3260
+ # Output:
3261
+ #
3262
+ # "First line"
3263
+ # "Second line"
3264
+ # ""
3265
+ # "Fourth line"
3266
+ # "Fifth line"
3267
+ #
3268
+ # Returns an Enumerator if no block is given.
3269
+ #
3270
+ alias each each_line
3271
+
3272
+ # <!-- rdoc-file=io.c -->
3273
+ # Returns `true` if the stream is positioned at its end, `false` otherwise; see
3274
+ # [Position](rdoc-ref:IO@Position):
3275
+ #
3276
+ # f = File.open('t.txt')
3277
+ # f.eof # => false
3278
+ # f.seek(0, :END) # => 0
3279
+ # f.eof # => true
3280
+ # f.close
3281
+ #
3282
+ # Raises an exception unless the stream is opened for reading; see
3283
+ # [Mode](rdoc-ref:File@Access+Modes).
3284
+ #
3285
+ # If `self` is a stream such as pipe or socket, this method blocks until the
3286
+ # other end sends some data or closes it:
3287
+ #
3288
+ # r, w = IO.pipe
3289
+ # Thread.new { sleep 1; w.close }
3290
+ # r.eof? # => true # After 1-second wait.
3291
+ #
3292
+ # r, w = IO.pipe
3293
+ # Thread.new { sleep 1; w.puts "a" }
3294
+ # r.eof? # => false # After 1-second wait.
3295
+ #
3296
+ # r, w = IO.pipe
3297
+ # r.eof? # blocks forever
3298
+ #
3299
+ # Note that this method reads data to the input byte buffer. So IO#sysread may
3300
+ # not behave as you intend with IO#eof?, unless you call IO#rewind first (which
3301
+ # is not available for some streams).
3302
+ #
3303
+ alias eof? eof
3304
+
3305
+ # <!-- rdoc-file=io.c -->
3306
+ # Returns the integer file descriptor for the stream:
3307
+ #
3308
+ # $stdin.fileno # => 0
3309
+ # $stdout.fileno # => 1
3310
+ # $stderr.fileno # => 2
3311
+ # File.open('t.txt').fileno # => 10
3312
+ # f.close
3313
+ #
3314
+ alias to_i fileno
3315
+
3316
+ interface _ForFd[RET]
3317
+ def for_fd: (?) -> RET
3318
+ end
3319
+ end
3320
+
3321
+ IO::APPEND: Integer
3322
+
3323
+ IO::BINARY: Integer
3324
+
3325
+ IO::CREAT: Integer
3326
+
3327
+ IO::DIRECT: Integer
3328
+
3329
+ IO::DSYNC: Integer
3330
+
3331
+ IO::EXCL: Integer
3332
+
3333
+ IO::FNM_CASEFOLD: Integer
3334
+
3335
+ IO::FNM_DOTMATCH: Integer
3336
+
3337
+ IO::FNM_EXTGLOB: Integer
3338
+
3339
+ IO::FNM_NOESCAPE: Integer
3340
+
3341
+ IO::FNM_PATHNAME: Integer
3342
+
3343
+ IO::FNM_SHORTNAME: Integer
3344
+
3345
+ IO::FNM_SYSCASE: Integer
3346
+
3347
+ IO::LOCK_EX: Integer
3348
+
3349
+ IO::LOCK_NB: Integer
3350
+
3351
+ IO::LOCK_SH: Integer
3352
+
3353
+ IO::LOCK_UN: Integer
3354
+
3355
+ IO::NOATIME: Integer
3356
+
3357
+ IO::NOCTTY: Integer
3358
+
3359
+ IO::NOFOLLOW: Integer
3360
+
3361
+ IO::NONBLOCK: Integer
3362
+
3363
+ IO::NULL: String
3364
+
3365
+ IO::RDONLY: Integer
3366
+
3367
+ IO::RDWR: Integer
3368
+
3369
+ IO::RSYNC: Integer
3370
+
3371
+ # <!-- rdoc-file=io.c -->
3372
+ # Set I/O position from the current position
3373
+ #
3374
+ IO::SEEK_CUR: Integer
3375
+
3376
+ # <!-- rdoc-file=io.c -->
3377
+ # Set I/O position to the next location containing data
3378
+ #
3379
+ IO::SEEK_DATA: Integer
3380
+
3381
+ # <!-- rdoc-file=io.c -->
3382
+ # Set I/O position from the end
3383
+ #
3384
+ IO::SEEK_END: Integer
3385
+
3386
+ # <!-- rdoc-file=io.c -->
3387
+ # Set I/O position to the next hole
3388
+ #
3389
+ IO::SEEK_HOLE: Integer
3390
+
3391
+ # <!-- rdoc-file=io.c -->
3392
+ # Set I/O position from the beginning
3393
+ #
3394
+ IO::SEEK_SET: Integer
3395
+
3396
+ IO::SHARE_DELETE: Integer
3397
+
3398
+ IO::SYNC: Integer
3399
+
3400
+ IO::TMPFILE: Integer
3401
+
3402
+ IO::TRUNC: Integer
3403
+
3404
+ IO::WRONLY: Integer
3405
+
3406
+ # <!-- rdoc-file=io.c -->
3407
+ # Readable event mask for IO#wait.
3408
+ #
3409
+ IO::READABLE: Integer
3410
+
3411
+ # <!-- rdoc-file=io.c -->
3412
+ # Writable event mask for IO#wait.
3413
+ #
3414
+ IO::WRITABLE: Integer
3415
+
3416
+ # <!-- rdoc-file=io.c -->
3417
+ # Priority event mask for IO#wait.
3418
+ #
3419
+ IO::PRIORITY: Integer
3420
+
3421
+ # <!-- rdoc-file=io.c -->
3422
+ # exception to wait for reading by EAGAIN. see IO.select.
3423
+ #
3424
+ class IO::EAGAINWaitReadable < Errno::EAGAIN
3425
+ include IO::WaitReadable
3426
+ end
3427
+
3428
+ IO::EAGAINWaitReadable::Errno: Integer
3429
+
3430
+ # <!-- rdoc-file=io.c -->
3431
+ # exception to wait for writing by EAGAIN. see IO.select.
3432
+ #
3433
+ class IO::EAGAINWaitWritable < Errno::EAGAIN
3434
+ include IO::WaitWritable
3435
+ end
3436
+
3437
+ IO::EAGAINWaitWritable::Errno: Integer
3438
+
3439
+ # <!-- rdoc-file=io.c -->
3440
+ # exception to wait for reading by EINPROGRESS. see IO.select.
3441
+ #
3442
+ class IO::EINPROGRESSWaitReadable < Errno::EINPROGRESS
3443
+ include IO::WaitReadable
3444
+ end
3445
+
3446
+ IO::EINPROGRESSWaitReadable::Errno: Integer
3447
+
3448
+ # <!-- rdoc-file=io.c -->
3449
+ # exception to wait for writing by EINPROGRESS. see IO.select.
3450
+ #
3451
+ class IO::EINPROGRESSWaitWritable < Errno::EINPROGRESS
3452
+ include IO::WaitWritable
3453
+ end
3454
+
3455
+ IO::EINPROGRESSWaitWritable::Errno: Integer
3456
+
3457
+ # <!-- rdoc-file=io.c -->
3458
+ # exception to wait for reading. see IO.select.
3459
+ #
3460
+ module IO::WaitReadable
3461
+ end
3462
+
3463
+ # <!-- rdoc-file=io.c -->
3464
+ # exception to wait for writing. see IO.select.
3465
+ #
3466
+ module IO::WaitWritable
3467
+ end
3468
+
3469
+ # <!-- rdoc-file=io.c -->
3470
+ # Can be raised by IO operations when IO#timeout= is set.
3471
+ #
3472
+ class IO::TimeoutError < IOError
3473
+ end