rbs 4.1.0-java

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 (569) hide show
  1. checksums.yaml +7 -0
  2. data/.clang-format +75 -0
  3. data/.clangd +2 -0
  4. data/.dockerignore +37 -0
  5. data/.github/dependabot.yml +24 -0
  6. data/.github/workflows/bundle-update.yml +63 -0
  7. data/.github/workflows/c-check.yml +66 -0
  8. data/.github/workflows/comments.yml +37 -0
  9. data/.github/workflows/dependabot.yml +30 -0
  10. data/.github/workflows/jruby.yml +79 -0
  11. data/.github/workflows/milestone.yml +91 -0
  12. data/.github/workflows/ruby.yml +158 -0
  13. data/.github/workflows/rust.yml +186 -0
  14. data/.github/workflows/truffleruby.yml +54 -0
  15. data/.github/workflows/typecheck.yml +39 -0
  16. data/.github/workflows/wasm.yml +55 -0
  17. data/.github/workflows/windows.yml +49 -0
  18. data/.gitignore +39 -0
  19. data/.rubocop.yml +72 -0
  20. data/BSDL +22 -0
  21. data/CHANGELOG.md +2380 -0
  22. data/COPYING +56 -0
  23. data/Dockerfile.jruby +53 -0
  24. data/README.md +240 -0
  25. data/Rakefile +856 -0
  26. data/Steepfile +55 -0
  27. data/config.yml +913 -0
  28. data/core/array.rbs +4205 -0
  29. data/core/basic_object.rbs +376 -0
  30. data/core/binding.rbs +148 -0
  31. data/core/builtin.rbs +278 -0
  32. data/core/class.rbs +223 -0
  33. data/core/comparable.rbs +192 -0
  34. data/core/complex.rbs +812 -0
  35. data/core/constants.rbs +96 -0
  36. data/core/data.rbs +415 -0
  37. data/core/dir.rbs +993 -0
  38. data/core/encoding.rbs +1368 -0
  39. data/core/enumerable.rbs +2506 -0
  40. data/core/enumerator/arithmetic_sequence.rbs +70 -0
  41. data/core/enumerator/product.rbs +92 -0
  42. data/core/enumerator.rbs +705 -0
  43. data/core/env.rbs +6 -0
  44. data/core/errno.rbs +682 -0
  45. data/core/errors.rbs +789 -0
  46. data/core/exception.rbs +485 -0
  47. data/core/false_class.rbs +82 -0
  48. data/core/fiber.rbs +570 -0
  49. data/core/fiber_error.rbs +11 -0
  50. data/core/file.rbs +2045 -0
  51. data/core/file_constants.rbs +463 -0
  52. data/core/file_stat.rbs +534 -0
  53. data/core/file_test.rbs +331 -0
  54. data/core/float.rbs +1292 -0
  55. data/core/gc.rbs +788 -0
  56. data/core/global_variables.rbs +184 -0
  57. data/core/hash.rbs +2183 -0
  58. data/core/integer.rbs +1374 -0
  59. data/core/io/buffer.rbs +995 -0
  60. data/core/io/wait.rbs +48 -0
  61. data/core/io.rbs +3472 -0
  62. data/core/kernel.rbs +3172 -0
  63. data/core/marshal.rbs +207 -0
  64. data/core/match_data.rbs +637 -0
  65. data/core/math.rbs +770 -0
  66. data/core/method.rbs +422 -0
  67. data/core/module.rbs +1856 -0
  68. data/core/nil_class.rbs +210 -0
  69. data/core/numeric.rbs +832 -0
  70. data/core/object.rbs +108 -0
  71. data/core/object_space/weak_key_map.rbs +166 -0
  72. data/core/object_space.rbs +197 -0
  73. data/core/pathname.rbs +1312 -0
  74. data/core/proc.rbs +905 -0
  75. data/core/process.rbs +2316 -0
  76. data/core/ractor.rbs +914 -0
  77. data/core/random.rbs +255 -0
  78. data/core/range.rbs +1209 -0
  79. data/core/rational.rbs +502 -0
  80. data/core/rb_config.rbs +88 -0
  81. data/core/rbs/ops.rbs +154 -0
  82. data/core/rbs/unnamed/argf.rbs +1236 -0
  83. data/core/rbs/unnamed/env_class.rbs +1214 -0
  84. data/core/rbs/unnamed/main_class.rbs +123 -0
  85. data/core/rbs/unnamed/random.rbs +186 -0
  86. data/core/refinement.rbs +59 -0
  87. data/core/regexp.rbs +1974 -0
  88. data/core/ruby.rbs +53 -0
  89. data/core/ruby_vm.rbs +809 -0
  90. data/core/rubygems/basic_specification.rbs +6 -0
  91. data/core/rubygems/config_file.rbs +38 -0
  92. data/core/rubygems/dependency_installer.rbs +6 -0
  93. data/core/rubygems/errors.rbs +112 -0
  94. data/core/rubygems/installer.rbs +15 -0
  95. data/core/rubygems/path_support.rbs +6 -0
  96. data/core/rubygems/platform.rbs +7 -0
  97. data/core/rubygems/request_set.rbs +49 -0
  98. data/core/rubygems/requirement.rbs +138 -0
  99. data/core/rubygems/rubygems.rbs +1108 -0
  100. data/core/rubygems/source_list.rbs +15 -0
  101. data/core/rubygems/specification.rbs +31 -0
  102. data/core/rubygems/stream_ui.rbs +5 -0
  103. data/core/rubygems/uninstaller.rbs +10 -0
  104. data/core/rubygems/version.rbs +133 -0
  105. data/core/set.rbs +751 -0
  106. data/core/signal.rbs +110 -0
  107. data/core/string.rbs +5532 -0
  108. data/core/struct.rbs +668 -0
  109. data/core/symbol.rbs +482 -0
  110. data/core/thread.rbs +1821 -0
  111. data/core/thread_group.rbs +79 -0
  112. data/core/time.rbs +1793 -0
  113. data/core/trace_point.rbs +483 -0
  114. data/core/true_class.rbs +98 -0
  115. data/core/unbound_method.rbs +337 -0
  116. data/core/warning.rbs +87 -0
  117. data/docs/CONTRIBUTING.md +107 -0
  118. data/docs/aliases.md +79 -0
  119. data/docs/architecture.md +110 -0
  120. data/docs/collection.md +192 -0
  121. data/docs/config.md +171 -0
  122. data/docs/data_and_struct.md +86 -0
  123. data/docs/encoding.md +56 -0
  124. data/docs/gem.md +56 -0
  125. data/docs/inline.md +634 -0
  126. data/docs/rbs_by_example.md +309 -0
  127. data/docs/release.md +69 -0
  128. data/docs/repo.md +125 -0
  129. data/docs/rust.md +96 -0
  130. data/docs/sigs.md +167 -0
  131. data/docs/stdlib.md +147 -0
  132. data/docs/syntax.md +940 -0
  133. data/docs/tools.md +17 -0
  134. data/docs/type_fingerprint.md +21 -0
  135. data/docs/wasm_serialization.md +80 -0
  136. data/exe/rbs +7 -0
  137. data/ext/rbs_extension/ast_translation.c +1855 -0
  138. data/ext/rbs_extension/ast_translation.h +41 -0
  139. data/ext/rbs_extension/class_constants.c +187 -0
  140. data/ext/rbs_extension/class_constants.h +104 -0
  141. data/ext/rbs_extension/compat.h +10 -0
  142. data/ext/rbs_extension/extconf.rb +40 -0
  143. data/ext/rbs_extension/legacy_location.c +299 -0
  144. data/ext/rbs_extension/legacy_location.h +82 -0
  145. data/ext/rbs_extension/main.c +613 -0
  146. data/ext/rbs_extension/rbs_extension.h +16 -0
  147. data/ext/rbs_extension/rbs_string_bridging.c +9 -0
  148. data/ext/rbs_extension/rbs_string_bridging.h +24 -0
  149. data/goodcheck.yml +91 -0
  150. data/include/rbs/ast.h +1047 -0
  151. data/include/rbs/defines.h +99 -0
  152. data/include/rbs/lexer.h +207 -0
  153. data/include/rbs/location.h +40 -0
  154. data/include/rbs/parser.h +153 -0
  155. data/include/rbs/serialize.h +39 -0
  156. data/include/rbs/string.h +47 -0
  157. data/include/rbs/util/rbs_allocator.h +59 -0
  158. data/include/rbs/util/rbs_assert.h +20 -0
  159. data/include/rbs/util/rbs_buffer.h +83 -0
  160. data/include/rbs/util/rbs_constant_pool.h +155 -0
  161. data/include/rbs/util/rbs_encoding.h +282 -0
  162. data/include/rbs/util/rbs_unescape.h +24 -0
  163. data/include/rbs.h +14 -0
  164. data/lib/rbs/ancestor_graph.rb +92 -0
  165. data/lib/rbs/annotate/annotations.rb +199 -0
  166. data/lib/rbs/annotate/formatter.rb +82 -0
  167. data/lib/rbs/annotate/rdoc_annotator.rb +398 -0
  168. data/lib/rbs/annotate/rdoc_source.rb +131 -0
  169. data/lib/rbs/annotate.rb +8 -0
  170. data/lib/rbs/ast/annotation.rb +29 -0
  171. data/lib/rbs/ast/comment.rb +29 -0
  172. data/lib/rbs/ast/declarations.rb +472 -0
  173. data/lib/rbs/ast/directives.rb +49 -0
  174. data/lib/rbs/ast/members.rb +451 -0
  175. data/lib/rbs/ast/ruby/annotations.rb +451 -0
  176. data/lib/rbs/ast/ruby/comment_block.rb +247 -0
  177. data/lib/rbs/ast/ruby/declarations.rb +291 -0
  178. data/lib/rbs/ast/ruby/helpers/constant_helper.rb +28 -0
  179. data/lib/rbs/ast/ruby/helpers/location_helper.rb +15 -0
  180. data/lib/rbs/ast/ruby/members.rb +762 -0
  181. data/lib/rbs/ast/type_param.rb +235 -0
  182. data/lib/rbs/ast/visitor.rb +137 -0
  183. data/lib/rbs/buffer.rb +189 -0
  184. data/lib/rbs/builtin_names.rb +58 -0
  185. data/lib/rbs/cli/colored_io.rb +48 -0
  186. data/lib/rbs/cli/diff.rb +84 -0
  187. data/lib/rbs/cli/validate.rb +294 -0
  188. data/lib/rbs/cli.rb +1253 -0
  189. data/lib/rbs/collection/cleaner.rb +38 -0
  190. data/lib/rbs/collection/config/lockfile.rb +92 -0
  191. data/lib/rbs/collection/config/lockfile_generator.rb +269 -0
  192. data/lib/rbs/collection/config.rb +81 -0
  193. data/lib/rbs/collection/installer.rb +32 -0
  194. data/lib/rbs/collection/sources/base.rb +14 -0
  195. data/lib/rbs/collection/sources/git.rb +265 -0
  196. data/lib/rbs/collection/sources/local.rb +81 -0
  197. data/lib/rbs/collection/sources/rubygems.rb +48 -0
  198. data/lib/rbs/collection/sources/stdlib.rb +50 -0
  199. data/lib/rbs/collection/sources.rb +38 -0
  200. data/lib/rbs/collection.rb +16 -0
  201. data/lib/rbs/constant.rb +28 -0
  202. data/lib/rbs/definition.rb +415 -0
  203. data/lib/rbs/definition_builder/ancestor_builder.rb +678 -0
  204. data/lib/rbs/definition_builder/method_builder.rb +295 -0
  205. data/lib/rbs/definition_builder.rb +1054 -0
  206. data/lib/rbs/diff.rb +131 -0
  207. data/lib/rbs/environment/class_entry.rb +69 -0
  208. data/lib/rbs/environment/module_entry.rb +66 -0
  209. data/lib/rbs/environment/use_map.rb +77 -0
  210. data/lib/rbs/environment.rb +1028 -0
  211. data/lib/rbs/environment_loader.rb +167 -0
  212. data/lib/rbs/environment_walker.rb +155 -0
  213. data/lib/rbs/errors.rb +634 -0
  214. data/lib/rbs/factory.rb +18 -0
  215. data/lib/rbs/file_finder.rb +28 -0
  216. data/lib/rbs/inline_parser/comment_association.rb +117 -0
  217. data/lib/rbs/inline_parser.rb +568 -0
  218. data/lib/rbs/location_aux.rb +170 -0
  219. data/lib/rbs/locator.rb +247 -0
  220. data/lib/rbs/method_type.rb +145 -0
  221. data/lib/rbs/namespace.rb +154 -0
  222. data/lib/rbs/parser/lex_result.rb +15 -0
  223. data/lib/rbs/parser/token.rb +23 -0
  224. data/lib/rbs/parser_aux.rb +144 -0
  225. data/lib/rbs/prototype/helpers.rb +197 -0
  226. data/lib/rbs/prototype/node_usage.rb +99 -0
  227. data/lib/rbs/prototype/rb.rb +816 -0
  228. data/lib/rbs/prototype/rbi.rb +793 -0
  229. data/lib/rbs/prototype/runtime/helpers.rb +59 -0
  230. data/lib/rbs/prototype/runtime/reflection.rb +19 -0
  231. data/lib/rbs/prototype/runtime/value_object_generator.rb +279 -0
  232. data/lib/rbs/prototype/runtime.rb +680 -0
  233. data/lib/rbs/repository.rb +127 -0
  234. data/lib/rbs/resolver/constant_resolver.rb +219 -0
  235. data/lib/rbs/resolver/type_name_resolver.rb +167 -0
  236. data/lib/rbs/rewriter.rb +70 -0
  237. data/lib/rbs/sorter.rb +198 -0
  238. data/lib/rbs/source.rb +99 -0
  239. data/lib/rbs/substitution.rb +83 -0
  240. data/lib/rbs/subtractor.rb +204 -0
  241. data/lib/rbs/test/errors.rb +80 -0
  242. data/lib/rbs/test/guaranteed.rb +30 -0
  243. data/lib/rbs/test/hook.rb +212 -0
  244. data/lib/rbs/test/observer.rb +19 -0
  245. data/lib/rbs/test/setup.rb +84 -0
  246. data/lib/rbs/test/setup_helper.rb +50 -0
  247. data/lib/rbs/test/tester.rb +167 -0
  248. data/lib/rbs/test/type_check.rb +457 -0
  249. data/lib/rbs/test.rb +112 -0
  250. data/lib/rbs/type_alias_dependency.rb +100 -0
  251. data/lib/rbs/type_alias_regularity.rb +126 -0
  252. data/lib/rbs/type_name.rb +122 -0
  253. data/lib/rbs/types.rb +1604 -0
  254. data/lib/rbs/unit_test/convertibles.rb +177 -0
  255. data/lib/rbs/unit_test/spy.rb +138 -0
  256. data/lib/rbs/unit_test/type_assertions.rb +383 -0
  257. data/lib/rbs/unit_test/with_aliases.rb +145 -0
  258. data/lib/rbs/unit_test.rb +6 -0
  259. data/lib/rbs/validator.rb +186 -0
  260. data/lib/rbs/variance_calculator.rb +189 -0
  261. data/lib/rbs/vendorer.rb +71 -0
  262. data/lib/rbs/version.rb +5 -0
  263. data/lib/rbs/wasm/deserializer.rb +213 -0
  264. data/lib/rbs/wasm/location.rb +61 -0
  265. data/lib/rbs/wasm/parser.rb +137 -0
  266. data/lib/rbs/wasm/rbs_parser.wasm +0 -0
  267. data/lib/rbs/wasm/runtime.rb +196 -0
  268. data/lib/rbs/wasm/serialization_schema.rb +110 -0
  269. data/lib/rbs/writer.rb +424 -0
  270. data/lib/rbs.rb +117 -0
  271. data/lib/rbs_jars.rb +39 -0
  272. data/lib/rdoc/discover.rb +20 -0
  273. data/lib/rdoc_plugin/parser.rb +168 -0
  274. data/rbs.gemspec +81 -0
  275. data/schema/annotation.json +14 -0
  276. data/schema/comment.json +26 -0
  277. data/schema/decls.json +326 -0
  278. data/schema/function.json +87 -0
  279. data/schema/location.json +56 -0
  280. data/schema/members.json +266 -0
  281. data/schema/methodType.json +50 -0
  282. data/schema/typeParam.json +52 -0
  283. data/schema/types.json +317 -0
  284. data/sig/ancestor_builder.rbs +163 -0
  285. data/sig/ancestor_graph.rbs +60 -0
  286. data/sig/annotate/annotations.rbs +102 -0
  287. data/sig/annotate/formatter.rbs +24 -0
  288. data/sig/annotate/rdoc_annotater.rbs +85 -0
  289. data/sig/annotate/rdoc_source.rbs +32 -0
  290. data/sig/annotation.rbs +27 -0
  291. data/sig/ast/ruby/annotations.rbs +470 -0
  292. data/sig/ast/ruby/comment_block.rbs +127 -0
  293. data/sig/ast/ruby/declarations.rbs +158 -0
  294. data/sig/ast/ruby/helpers/constant_helper.rbs +11 -0
  295. data/sig/ast/ruby/helpers/location_helper.rbs +15 -0
  296. data/sig/ast/ruby/members.rbs +198 -0
  297. data/sig/buffer.rbs +108 -0
  298. data/sig/builtin_names.rbs +44 -0
  299. data/sig/cli/colored_io.rbs +15 -0
  300. data/sig/cli/diff.rbs +15 -0
  301. data/sig/cli/validate.rbs +47 -0
  302. data/sig/cli.rbs +89 -0
  303. data/sig/collection/cleaner.rbs +13 -0
  304. data/sig/collection/config/lockfile.rbs +74 -0
  305. data/sig/collection/config/lockfile_generator.rbs +68 -0
  306. data/sig/collection/config.rbs +46 -0
  307. data/sig/collection/installer.rbs +17 -0
  308. data/sig/collection/sources.rbs +214 -0
  309. data/sig/collection.rbs +4 -0
  310. data/sig/comment.rbs +26 -0
  311. data/sig/constant.rbs +21 -0
  312. data/sig/declarations.rbs +274 -0
  313. data/sig/definition.rbs +232 -0
  314. data/sig/definition_builder.rbs +181 -0
  315. data/sig/diff.rbs +28 -0
  316. data/sig/directives.rbs +77 -0
  317. data/sig/environment/class_entry.rbs +50 -0
  318. data/sig/environment/module_entry.rbs +50 -0
  319. data/sig/environment.rbs +286 -0
  320. data/sig/environment_loader.rbs +111 -0
  321. data/sig/environment_walker.rbs +65 -0
  322. data/sig/errors.rbs +408 -0
  323. data/sig/factory.rbs +5 -0
  324. data/sig/file_finder.rbs +28 -0
  325. data/sig/inline_parser/comment_association.rbs +71 -0
  326. data/sig/inline_parser.rbs +126 -0
  327. data/sig/location.rbs +135 -0
  328. data/sig/locator.rbs +56 -0
  329. data/sig/manifest.yaml +5 -0
  330. data/sig/members.rbs +258 -0
  331. data/sig/method_builder.rbs +89 -0
  332. data/sig/method_types.rbs +58 -0
  333. data/sig/namespace.rbs +161 -0
  334. data/sig/parser.rbs +164 -0
  335. data/sig/prototype/helpers.rbs +29 -0
  336. data/sig/prototype/node_usage.rbs +20 -0
  337. data/sig/prototype/rb.rbs +96 -0
  338. data/sig/prototype/rbi.rbs +104 -0
  339. data/sig/prototype/runtime.rbs +182 -0
  340. data/sig/rbs.rbs +21 -0
  341. data/sig/rdoc/rbs.rbs +67 -0
  342. data/sig/repository.rbs +85 -0
  343. data/sig/resolver/constant_resolver.rbs +92 -0
  344. data/sig/resolver/context.rbs +34 -0
  345. data/sig/resolver/type_name_resolver.rbs +61 -0
  346. data/sig/rewriter.rbs +45 -0
  347. data/sig/shims/bundler.rbs +38 -0
  348. data/sig/shims/enumerable.rbs +5 -0
  349. data/sig/shims/rubygems.rbs +19 -0
  350. data/sig/sorter.rbs +41 -0
  351. data/sig/source.rbs +48 -0
  352. data/sig/substitution.rbs +48 -0
  353. data/sig/subtractor.rbs +37 -0
  354. data/sig/test/errors.rbs +52 -0
  355. data/sig/test/guranteed.rbs +9 -0
  356. data/sig/test/type_check.rbs +19 -0
  357. data/sig/test.rbs +82 -0
  358. data/sig/type_alias_dependency.rbs +53 -0
  359. data/sig/type_alias_regularity.rbs +98 -0
  360. data/sig/type_param.rbs +115 -0
  361. data/sig/typename.rbs +89 -0
  362. data/sig/types.rbs +578 -0
  363. data/sig/unit_test/convertibles.rbs +154 -0
  364. data/sig/unit_test/spy.rbs +22 -0
  365. data/sig/unit_test/type_assertions.rbs +211 -0
  366. data/sig/unit_test/with_aliases.rbs +136 -0
  367. data/sig/use_map.rbs +35 -0
  368. data/sig/util.rbs +9 -0
  369. data/sig/validator.rbs +63 -0
  370. data/sig/variance_calculator.rbs +87 -0
  371. data/sig/vendorer.rbs +51 -0
  372. data/sig/version.rbs +3 -0
  373. data/sig/visitor.rbs +47 -0
  374. data/sig/wasm/deserializer.rbs +66 -0
  375. data/sig/wasm/serialization_schema.rbs +13 -0
  376. data/sig/writer.rbs +127 -0
  377. data/src/ast.c +1628 -0
  378. data/src/lexer.c +3221 -0
  379. data/src/lexer.re +155 -0
  380. data/src/lexstate.c +221 -0
  381. data/src/location.c +31 -0
  382. data/src/parser.c +4255 -0
  383. data/src/serialize.c +958 -0
  384. data/src/string.c +41 -0
  385. data/src/util/rbs_allocator.c +171 -0
  386. data/src/util/rbs_assert.c +19 -0
  387. data/src/util/rbs_buffer.c +54 -0
  388. data/src/util/rbs_constant_pool.c +268 -0
  389. data/src/util/rbs_encoding.c +21308 -0
  390. data/src/util/rbs_unescape.c +167 -0
  391. data/stdlib/abbrev/0/abbrev.rbs +66 -0
  392. data/stdlib/abbrev/0/array.rbs +26 -0
  393. data/stdlib/base64/0/base64.rbs +355 -0
  394. data/stdlib/benchmark/0/benchmark.rbs +452 -0
  395. data/stdlib/bigdecimal/0/big_decimal.rbs +1647 -0
  396. data/stdlib/bigdecimal-math/0/big_math.rbs +280 -0
  397. data/stdlib/bigdecimal-math/0/manifest.yaml +2 -0
  398. data/stdlib/cgi/0/core.rbs +911 -0
  399. data/stdlib/cgi/0/manifest.yaml +4 -0
  400. data/stdlib/cgi-escape/0/escape.rbs +171 -0
  401. data/stdlib/coverage/0/coverage.rbs +266 -0
  402. data/stdlib/csv/0/csv.rbs +3776 -0
  403. data/stdlib/csv/0/manifest.yaml +3 -0
  404. data/stdlib/date/0/date.rbs +1598 -0
  405. data/stdlib/date/0/date_time.rbs +617 -0
  406. data/stdlib/date/0/time.rbs +26 -0
  407. data/stdlib/dbm/0/dbm.rbs +421 -0
  408. data/stdlib/delegate/0/delegator.rbs +188 -0
  409. data/stdlib/delegate/0/kernel.rbs +47 -0
  410. data/stdlib/delegate/0/simple_delegator.rbs +96 -0
  411. data/stdlib/did_you_mean/0/did_you_mean.rbs +344 -0
  412. data/stdlib/digest/0/digest.rbs +693 -0
  413. data/stdlib/erb/0/erb.rbs +933 -0
  414. data/stdlib/etc/0/etc.rbs +884 -0
  415. data/stdlib/fileutils/0/fileutils.rbs +1753 -0
  416. data/stdlib/find/0/find.rbs +49 -0
  417. data/stdlib/forwardable/0/forwardable.rbs +271 -0
  418. data/stdlib/io-console/0/io-console.rbs +414 -0
  419. data/stdlib/ipaddr/0/ipaddr.rbs +431 -0
  420. data/stdlib/json/0/json.rbs +1963 -0
  421. data/stdlib/kconv/0/kconv.rbs +166 -0
  422. data/stdlib/logger/0/formatter.rbs +45 -0
  423. data/stdlib/logger/0/log_device.rbs +100 -0
  424. data/stdlib/logger/0/logger.rbs +796 -0
  425. data/stdlib/logger/0/manifest.yaml +2 -0
  426. data/stdlib/logger/0/period.rbs +17 -0
  427. data/stdlib/logger/0/severity.rbs +34 -0
  428. data/stdlib/minitest/0/kernel.rbs +42 -0
  429. data/stdlib/minitest/0/minitest/abstract_reporter.rbs +52 -0
  430. data/stdlib/minitest/0/minitest/assertion.rbs +17 -0
  431. data/stdlib/minitest/0/minitest/assertions.rbs +590 -0
  432. data/stdlib/minitest/0/minitest/backtrace_filter.rbs +23 -0
  433. data/stdlib/minitest/0/minitest/bench_spec.rbs +102 -0
  434. data/stdlib/minitest/0/minitest/benchmark.rbs +259 -0
  435. data/stdlib/minitest/0/minitest/composite_reporter.rbs +25 -0
  436. data/stdlib/minitest/0/minitest/compress.rbs +13 -0
  437. data/stdlib/minitest/0/minitest/error_on_warning.rbs +3 -0
  438. data/stdlib/minitest/0/minitest/expectation.rbs +2 -0
  439. data/stdlib/minitest/0/minitest/expectations.rbs +21 -0
  440. data/stdlib/minitest/0/minitest/guard.rbs +64 -0
  441. data/stdlib/minitest/0/minitest/mock.rbs +64 -0
  442. data/stdlib/minitest/0/minitest/parallel/executor.rbs +46 -0
  443. data/stdlib/minitest/0/minitest/parallel/test/class_methods.rbs +5 -0
  444. data/stdlib/minitest/0/minitest/parallel/test.rbs +3 -0
  445. data/stdlib/minitest/0/minitest/parallel.rbs +2 -0
  446. data/stdlib/minitest/0/minitest/pride_io.rbs +62 -0
  447. data/stdlib/minitest/0/minitest/pride_lol.rbs +19 -0
  448. data/stdlib/minitest/0/minitest/progress_reporter.rbs +11 -0
  449. data/stdlib/minitest/0/minitest/reportable.rbs +53 -0
  450. data/stdlib/minitest/0/minitest/reporter.rbs +5 -0
  451. data/stdlib/minitest/0/minitest/result.rbs +28 -0
  452. data/stdlib/minitest/0/minitest/runnable.rbs +163 -0
  453. data/stdlib/minitest/0/minitest/skip.rbs +6 -0
  454. data/stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs +48 -0
  455. data/stdlib/minitest/0/minitest/spec/dsl.rbs +129 -0
  456. data/stdlib/minitest/0/minitest/spec.rbs +11 -0
  457. data/stdlib/minitest/0/minitest/statistics_reporter.rbs +81 -0
  458. data/stdlib/minitest/0/minitest/summary_reporter.rbs +18 -0
  459. data/stdlib/minitest/0/minitest/test/lifecycle_hooks.rbs +92 -0
  460. data/stdlib/minitest/0/minitest/test.rbs +69 -0
  461. data/stdlib/minitest/0/minitest/unexpected_error.rbs +12 -0
  462. data/stdlib/minitest/0/minitest/unexpected_warning.rbs +6 -0
  463. data/stdlib/minitest/0/minitest/unit/test_case.rbs +3 -0
  464. data/stdlib/minitest/0/minitest/unit.rbs +4 -0
  465. data/stdlib/minitest/0/minitest.rbs +115 -0
  466. data/stdlib/monitor/0/monitor.rbs +363 -0
  467. data/stdlib/mutex_m/0/mutex_m.rbs +104 -0
  468. data/stdlib/net-http/0/manifest.yaml +3 -0
  469. data/stdlib/net-http/0/net-http.rbs +5580 -0
  470. data/stdlib/net-protocol/0/manifest.yaml +2 -0
  471. data/stdlib/net-protocol/0/net-protocol.rbs +56 -0
  472. data/stdlib/net-smtp/0/manifest.yaml +2 -0
  473. data/stdlib/net-smtp/0/net-smtp.rbs +55 -0
  474. data/stdlib/nkf/0/nkf.rbs +402 -0
  475. data/stdlib/objspace/0/objspace.rbs +470 -0
  476. data/stdlib/observable/0/observable.rbs +217 -0
  477. data/stdlib/open-uri/0/manifest.yaml +4 -0
  478. data/stdlib/open-uri/0/open-uri.rbs +433 -0
  479. data/stdlib/open3/0/open3.rbs +606 -0
  480. data/stdlib/openssl/0/manifest.yaml +3 -0
  481. data/stdlib/openssl/0/openssl.rbs +12237 -0
  482. data/stdlib/optparse/0/optparse.rbs +1734 -0
  483. data/stdlib/pathname/0/pathname.rbs +36 -0
  484. data/stdlib/pp/0/manifest.yaml +2 -0
  485. data/stdlib/pp/0/pp.rbs +301 -0
  486. data/stdlib/prettyprint/0/prettyprint.rbs +383 -0
  487. data/stdlib/pstore/0/pstore.rbs +608 -0
  488. data/stdlib/psych/0/core_ext.rbs +12 -0
  489. data/stdlib/psych/0/dbm.rbs +237 -0
  490. data/stdlib/psych/0/manifest.yaml +3 -0
  491. data/stdlib/psych/0/psych.rbs +455 -0
  492. data/stdlib/psych/0/store.rbs +57 -0
  493. data/stdlib/pty/0/pty.rbs +240 -0
  494. data/stdlib/random-formatter/0/random-formatter.rbs +277 -0
  495. data/stdlib/rdoc/0/code_object.rbs +52 -0
  496. data/stdlib/rdoc/0/comment.rbs +61 -0
  497. data/stdlib/rdoc/0/context.rbs +153 -0
  498. data/stdlib/rdoc/0/markup.rbs +117 -0
  499. data/stdlib/rdoc/0/options.rbs +76 -0
  500. data/stdlib/rdoc/0/parser.rbs +56 -0
  501. data/stdlib/rdoc/0/rdoc.rbs +393 -0
  502. data/stdlib/rdoc/0/ri.rbs +17 -0
  503. data/stdlib/rdoc/0/store.rbs +48 -0
  504. data/stdlib/rdoc/0/top_level.rbs +97 -0
  505. data/stdlib/resolv/0/manifest.yaml +3 -0
  506. data/stdlib/resolv/0/resolv.rbs +1787 -0
  507. data/stdlib/ripper/0/ripper.rbs +1654 -0
  508. data/stdlib/securerandom/0/manifest.yaml +2 -0
  509. data/stdlib/securerandom/0/securerandom.rbs +49 -0
  510. data/stdlib/shellwords/0/shellwords.rbs +229 -0
  511. data/stdlib/singleton/0/singleton.rbs +134 -0
  512. data/stdlib/socket/0/addrinfo.rbs +666 -0
  513. data/stdlib/socket/0/basic_socket.rbs +590 -0
  514. data/stdlib/socket/0/constants.rbs +2295 -0
  515. data/stdlib/socket/0/ip_socket.rbs +94 -0
  516. data/stdlib/socket/0/socket.rbs +4170 -0
  517. data/stdlib/socket/0/socket_error.rbs +5 -0
  518. data/stdlib/socket/0/tcp_server.rbs +192 -0
  519. data/stdlib/socket/0/tcp_socket.rbs +87 -0
  520. data/stdlib/socket/0/udp_socket.rbs +133 -0
  521. data/stdlib/socket/0/unix_server.rbs +169 -0
  522. data/stdlib/socket/0/unix_socket.rbs +172 -0
  523. data/stdlib/stringio/0/stringio.rbs +1681 -0
  524. data/stdlib/strscan/0/string_scanner.rbs +1648 -0
  525. data/stdlib/tempfile/0/manifest.yaml +3 -0
  526. data/stdlib/tempfile/0/tempfile.rbs +483 -0
  527. data/stdlib/time/0/time.rbs +434 -0
  528. data/stdlib/timeout/0/timeout.rbs +132 -0
  529. data/stdlib/tmpdir/0/tmpdir.rbs +69 -0
  530. data/stdlib/tsort/0/cyclic.rbs +8 -0
  531. data/stdlib/tsort/0/interfaces.rbs +20 -0
  532. data/stdlib/tsort/0/tsort.rbs +410 -0
  533. data/stdlib/uri/0/common.rbs +621 -0
  534. data/stdlib/uri/0/file.rbs +118 -0
  535. data/stdlib/uri/0/ftp.rbs +13 -0
  536. data/stdlib/uri/0/generic.rbs +1111 -0
  537. data/stdlib/uri/0/http.rbs +104 -0
  538. data/stdlib/uri/0/https.rbs +14 -0
  539. data/stdlib/uri/0/ldap.rbs +230 -0
  540. data/stdlib/uri/0/ldaps.rbs +14 -0
  541. data/stdlib/uri/0/mailto.rbs +92 -0
  542. data/stdlib/uri/0/rfc2396_parser.rbs +189 -0
  543. data/stdlib/uri/0/rfc3986_parser.rbs +2 -0
  544. data/stdlib/uri/0/ws.rbs +13 -0
  545. data/stdlib/uri/0/wss.rbs +9 -0
  546. data/stdlib/yaml/0/manifest.yaml +2 -0
  547. data/stdlib/yaml/0/yaml.rbs +1 -0
  548. data/stdlib/zlib/0/buf_error.rbs +10 -0
  549. data/stdlib/zlib/0/data_error.rbs +10 -0
  550. data/stdlib/zlib/0/deflate.rbs +211 -0
  551. data/stdlib/zlib/0/error.rbs +20 -0
  552. data/stdlib/zlib/0/gzip_file/crc_error.rbs +12 -0
  553. data/stdlib/zlib/0/gzip_file/error.rbs +23 -0
  554. data/stdlib/zlib/0/gzip_file/length_error.rbs +12 -0
  555. data/stdlib/zlib/0/gzip_file/no_footer.rbs +11 -0
  556. data/stdlib/zlib/0/gzip_file.rbs +156 -0
  557. data/stdlib/zlib/0/gzip_reader.rbs +293 -0
  558. data/stdlib/zlib/0/gzip_writer.rbs +168 -0
  559. data/stdlib/zlib/0/inflate.rbs +180 -0
  560. data/stdlib/zlib/0/mem_error.rbs +10 -0
  561. data/stdlib/zlib/0/need_dict.rbs +13 -0
  562. data/stdlib/zlib/0/stream_end.rbs +11 -0
  563. data/stdlib/zlib/0/stream_error.rbs +11 -0
  564. data/stdlib/zlib/0/version_error.rbs +11 -0
  565. data/stdlib/zlib/0/zlib.rbs +449 -0
  566. data/stdlib/zlib/0/zstream.rbs +200 -0
  567. data/wasm/README.md +60 -0
  568. data/wasm/rbs_wasm.c +423 -0
  569. metadata +671 -0
@@ -0,0 +1,1108 @@
1
+ # <!-- rdoc-file=lib/rubygems.rb -->
2
+ # RubyGems is the Ruby standard for publishing and managing third party
3
+ # libraries.
4
+ #
5
+ # For user documentation, see:
6
+ #
7
+ # * `gem help` and <code>gem help [command]</code>
8
+ # * [RubyGems User Guide](https://guides.rubygems.org/)
9
+ # * [Frequently Asked Questions](https://guides.rubygems.org/faqs)
10
+ #
11
+ # For gem developer documentation see:
12
+ #
13
+ # * [Creating Gems](https://guides.rubygems.org/make-your-own-gem)
14
+ # * Gem::Specification
15
+ # * Gem::Version for version dependency notes
16
+ #
17
+ # Further RubyGems documentation can be found at:
18
+ #
19
+ # * [RubyGems Guides](https://guides.rubygems.org)
20
+ # * [RubyGems API](https://guides.rubygems.org/rubygems-org-api/) (also
21
+ # available from `gem server`)
22
+ #
23
+ # ## RubyGems Plugins
24
+ #
25
+ # RubyGems will load plugins in the latest version of each installed gem or
26
+ # $LOAD_PATH. Plugins must be named 'rubygems_plugin' (.rb, .so, etc) and
27
+ # placed at the root of your gem's #require_path. Plugins are installed at a
28
+ # special location and loaded on boot.
29
+ #
30
+ # For an example plugin, see the [Graph gem](https://github.com/seattlerb/graph)
31
+ # which adds a `gem graph` command.
32
+ #
33
+ # ## RubyGems Defaults, Packaging
34
+ #
35
+ # RubyGems defaults are stored in lib/rubygems/defaults.rb. If you're packaging
36
+ # RubyGems or implementing Ruby you can change RubyGems' defaults.
37
+ #
38
+ # For RubyGems packagers, provide lib/rubygems/defaults/operating_system.rb and
39
+ # override any defaults from lib/rubygems/defaults.rb.
40
+ #
41
+ # For Ruby implementers, provide lib/rubygems/defaults/#{RUBY_ENGINE}.rb and
42
+ # override any defaults from lib/rubygems/defaults.rb.
43
+ #
44
+ # If you need RubyGems to perform extra work on install or uninstall, your
45
+ # defaults override file can set pre/post install and uninstall hooks. See
46
+ # Gem::pre_install, Gem::pre_uninstall, Gem::post_install, Gem::post_uninstall.
47
+ #
48
+ # ## Bugs
49
+ #
50
+ # You can submit bugs to the [RubyGems bug
51
+ # tracker](https://github.com/ruby/rubygems/issues) on GitHub
52
+ #
53
+ # ## Credits
54
+ #
55
+ # RubyGems is currently maintained by Eric Hodel.
56
+ #
57
+ # RubyGems was originally developed at RubyConf 2003 by:
58
+ #
59
+ # * Rich Kilmer -- rich(at)infoether.com
60
+ # * Chad Fowler -- chad(at)chadfowler.com
61
+ # * David Black -- dblack(at)wobblini.net
62
+ # * Paul Brannan -- paul(at)atdesk.com
63
+ # * Jim Weirich -- jim(at)weirichhouse.org
64
+ #
65
+ # Contributors:
66
+ #
67
+ # * Gavin Sinclair -- gsinclair(at)soyabean.com.au
68
+ # * George Marrows -- george.marrows(at)ntlworld.com
69
+ # * Dick Davies -- rasputnik(at)hellooperator.net
70
+ # * Mauricio Fernandez -- batsman.geo(at)yahoo.com
71
+ # * Simon Strandgaard -- neoneye(at)adslhome.dk
72
+ # * Dave Glasser -- glasser(at)mit.edu
73
+ # * Paul Duncan -- pabs(at)pablotron.org
74
+ # * Ville Aine -- vaine(at)cs.helsinki.fi
75
+ # * Eric Hodel -- drbrain(at)segment7.net
76
+ # * Daniel Berger -- djberg96(at)gmail.com
77
+ # * Phil Hagelberg -- technomancy(at)gmail.com
78
+ # * Ryan Davis -- ryand-ruby(at)zenspider.com
79
+ # * Evan Phoenix -- evan(at)fallingsnow.net
80
+ # * Steve Klabnik -- steve(at)steveklabnik.com
81
+ #
82
+ # (If your name is missing, PLEASE let us know!)
83
+ #
84
+ # ## License
85
+ #
86
+ # See [LICENSE.txt](https://github.com/ruby/rubygems/blob/master/LICENSE.txt)
87
+ # for permissions.
88
+ #
89
+ # Thanks!
90
+ #
91
+ # -The RubyGems Team
92
+ #
93
+ # <!-- rdoc-file=lib/rubygems/version.rb -->
94
+ # Workaround for directly loading Gem::Version in some cases
95
+ #
96
+ module Gem
97
+ interface _HashLike[K, V]
98
+ def each_pair: () { ([ K, V ]) -> untyped } -> self
99
+ end
100
+
101
+ DEFAULT_HOST: String
102
+
103
+ GEM_DEP_FILES: Array[String]
104
+
105
+ # <!-- rdoc-file=lib/rubygems.rb -->
106
+ # When https://bugs.ruby-lang.org/issues/17259 is available, there is no need to
107
+ # override Kernel#warn
108
+ #
109
+ KERNEL_WARN_IGNORES_INTERNAL_ENTRIES: bool
110
+
111
+ LOADED_SPECS_MUTEX: Thread::Mutex
112
+
113
+ # <!-- rdoc-file=lib/rubygems.rb -->
114
+ # Location of Marshal quick gemspecs on remote repositories
115
+ #
116
+ MARSHAL_SPEC_DIR: String
117
+
118
+ # <!-- rdoc-file=lib/rubygems.rb -->
119
+ # Exception classes used in a Gem.read_binary `rescue` statement
120
+ #
121
+ READ_BINARY_ERRORS: Array[Class]
122
+
123
+ # <!-- rdoc-file=lib/rubygems.rb -->
124
+ # Subdirectories in a gem repository for default gems
125
+ #
126
+ REPOSITORY_DEFAULT_GEM_SUBDIRECTORIES: Array[String]
127
+
128
+ # <!-- rdoc-file=lib/rubygems.rb -->
129
+ # Subdirectories in a gem repository
130
+ #
131
+ REPOSITORY_SUBDIRECTORIES: Array[String]
132
+
133
+ RUBYGEMS_DIR: String
134
+
135
+ # <!-- rdoc-file=lib/rubygems.rb -->
136
+ # Taint support is deprecated in Ruby 2.7. This allows switching ".untaint" to
137
+ # ".tap(&Gem::UNTAINT)", to avoid deprecation warnings in Ruby 2.7.
138
+ #
139
+ UNTAINT: Proc
140
+
141
+ VERSION: String
142
+
143
+ # <!-- rdoc-file=lib/rubygems/win_platform.rb -->
144
+ # An Array of Regexps that match windows Ruby platforms.
145
+ #
146
+ WIN_PATTERNS: Array[Regexp]
147
+
148
+ # <!-- rdoc-file=lib/rubygems.rb -->
149
+ # Exception classes used in Gem.write_binary `rescue` statement
150
+ #
151
+ WRITE_BINARY_ERRORS: Array[Class]
152
+
153
+ # <!--
154
+ # rdoc-file=lib/rubygems.rb
155
+ # - activated_gem_paths()
156
+ # -->
157
+ # The number of paths in the +$LOAD_PATH+ from activated gems. Used to
158
+ # prioritize <code>-I</code> and <code>ENV['RUBYLIB']</code> entries during
159
+ # `require`.
160
+ #
161
+ def self.activated_gem_paths: () -> Integer
162
+
163
+ # <!--
164
+ # rdoc-file=lib/rubygems.rb
165
+ # - add_to_load_path(*paths)
166
+ # -->
167
+ # Add a list of paths to the $LOAD_PATH at the proper place.
168
+ #
169
+ def self.add_to_load_path: (*String paths) -> Array[String]
170
+
171
+ # <!--
172
+ # rdoc-file=lib/rubygems.rb
173
+ # - bin_path(name, exec_name = nil, *requirements)
174
+ # -->
175
+ # Find the full path to the executable for gem `name`. If the `exec_name` is
176
+ # not given, an exception will be raised, otherwise the specified executable's
177
+ # path is returned. `requirements` allows you to specify specific gem versions.
178
+ #
179
+ def self.bin_path: (String name, String exec_name, ?Array[Requirement] requirements) -> String
180
+
181
+ # <!--
182
+ # rdoc-file=lib/rubygems.rb
183
+ # - binary_mode()
184
+ # -->
185
+ # The mode needed to read a file as straight binary.
186
+ #
187
+ def self.binary_mode: () -> String
188
+
189
+ # <!--
190
+ # rdoc-file=lib/rubygems.rb
191
+ # - bindir(install_dir = Gem.dir)
192
+ # -->
193
+ # The path where gem executables are to be installed.
194
+ #
195
+ def self.bindir: (?String install_dir) -> String
196
+
197
+ # <!--
198
+ # rdoc-file=lib/rubygems/defaults.rb
199
+ # - cache_home()
200
+ # -->
201
+ # The path to standard location of the user's cache directory.
202
+ #
203
+ def self.cache_home: () -> String
204
+
205
+ # <!--
206
+ # rdoc-file=lib/rubygems.rb
207
+ # - clear_default_specs()
208
+ # -->
209
+ # Clear default gem related variables. It is for test
210
+ #
211
+ def self.clear_default_specs: () -> void
212
+
213
+ # <!--
214
+ # rdoc-file=lib/rubygems.rb
215
+ # - clear_paths()
216
+ # -->
217
+ # Reset the `dir` and `path` values. The next time `dir` or `path` is
218
+ # requested, the values will be calculated from scratch. This is mainly used by
219
+ # the unit tests to provide test isolation.
220
+ #
221
+ def self.clear_paths: () -> void
222
+
223
+ # <!--
224
+ # rdoc-file=lib/rubygems/defaults.rb
225
+ # - config_file()
226
+ # -->
227
+ # The path to standard location of the user's .gemrc file.
228
+ #
229
+ def self.config_file: () -> String
230
+
231
+ # <!--
232
+ # rdoc-file=lib/rubygems/defaults.rb
233
+ # - config_home()
234
+ # -->
235
+ # The path to standard location of the user's configuration directory.
236
+ #
237
+ def self.config_home: () -> String
238
+
239
+ # <!--
240
+ # rdoc-file=lib/rubygems.rb
241
+ # - configuration()
242
+ # -->
243
+ # The standard configuration object for gems.
244
+ #
245
+ def self.configuration: () -> ConfigFile
246
+
247
+ # <!--
248
+ # rdoc-file=lib/rubygems.rb
249
+ # - configuration=(config)
250
+ # -->
251
+ # Use the given configuration object (which implements the ConfigFile protocol)
252
+ # as the standard configuration object.
253
+ #
254
+ def self.configuration=: (ConfigFile config) -> ConfigFile
255
+
256
+ # <!--
257
+ # rdoc-file=lib/rubygems/defaults.rb
258
+ # - data_home()
259
+ # -->
260
+ # The path to standard location of the user's data directory.
261
+ #
262
+ def self.data_home: () -> String
263
+
264
+ # <!--
265
+ # rdoc-file=lib/rubygems/defaults.rb
266
+ # - default_bindir()
267
+ # -->
268
+ # The default directory for binaries
269
+ #
270
+ def self.default_bindir: () -> String
271
+
272
+ # <!--
273
+ # rdoc-file=lib/rubygems/defaults.rb
274
+ # - default_cert_path()
275
+ # -->
276
+ # The default signing certificate chain path
277
+ #
278
+ def self.default_cert_path: () -> String
279
+
280
+ # <!--
281
+ # rdoc-file=lib/rubygems/defaults.rb
282
+ # - default_dir()
283
+ # -->
284
+ # Default home directory path to be used if an alternate value is not specified
285
+ # in the environment
286
+ #
287
+ def self.default_dir: () -> String
288
+
289
+ # <!--
290
+ # rdoc-file=lib/rubygems/defaults.rb
291
+ # - default_exec_format()
292
+ # -->
293
+ # Deduce Ruby's --program-prefix and --program-suffix from its install name
294
+ #
295
+ def self.default_exec_format: () -> String
296
+
297
+ # <!--
298
+ # rdoc-file=lib/rubygems/defaults.rb
299
+ # - default_ext_dir_for(base_dir)
300
+ # -->
301
+ # Returns binary extensions dir for specified RubyGems base dir or nil if such
302
+ # directory cannot be determined.
303
+ #
304
+ # By default, the binary extensions are located side by side with their Ruby
305
+ # counterparts, therefore nil is returned
306
+ #
307
+ def self.default_ext_dir_for: (String base_dir) -> String?
308
+
309
+ # <!--
310
+ # rdoc-file=lib/rubygems/defaults.rb
311
+ # - default_key_path()
312
+ # -->
313
+ # The default signing key path
314
+ #
315
+ def self.default_key_path: () -> String
316
+
317
+ # <!--
318
+ # rdoc-file=lib/rubygems/defaults.rb
319
+ # - default_path()
320
+ # -->
321
+ # Default gem load path
322
+ #
323
+ def self.default_path: () -> Array[String]
324
+
325
+ # <!--
326
+ # rdoc-file=lib/rubygems/defaults.rb
327
+ # - default_rubygems_dirs()
328
+ # -->
329
+ # Paths where RubyGems' .rb files and bin files are installed
330
+ #
331
+ def self.default_rubygems_dirs: () -> Array[String]?
332
+
333
+ # <!--
334
+ # rdoc-file=lib/rubygems/defaults.rb
335
+ # - default_sources()
336
+ # -->
337
+ # An Array of the default sources that come with RubyGems
338
+ #
339
+ def self.default_sources: () -> Array[String]
340
+
341
+ # <!--
342
+ # rdoc-file=lib/rubygems/defaults.rb
343
+ # - default_spec_cache_dir()
344
+ # -->
345
+ # Default spec directory path to be used if an alternate value is not specified
346
+ # in the environment
347
+ #
348
+ def self.default_spec_cache_dir: () -> String
349
+
350
+ # <!--
351
+ # rdoc-file=lib/rubygems/defaults.rb
352
+ # - default_specifications_dir()
353
+ # -->
354
+ # Path to specification files of default gems.
355
+ #
356
+ def self.default_specifications_dir: () -> String
357
+
358
+ # <!--
359
+ # rdoc-file=lib/rubygems.rb
360
+ # - deflate(data)
361
+ # -->
362
+ # A Zlib::Deflate.deflate wrapper
363
+ #
364
+ def self.deflate: (String data) -> String
365
+
366
+ # <!--
367
+ # rdoc-file=lib/rubygems.rb
368
+ # - dir()
369
+ # -->
370
+ # The path where gems are to be installed.
371
+ #
372
+ def self.dir: () -> String
373
+
374
+ # <!-- rdoc-file=lib/rubygems.rb -->
375
+ # RubyGems distributors (like operating system package managers) can disable
376
+ # RubyGems update by setting this to error message printed to end-users on gem
377
+ # update --system instead of actual update.
378
+ #
379
+ def self.disable_system_update_message: () -> String?
380
+
381
+ # <!-- rdoc-file=lib/rubygems.rb -->
382
+ # RubyGems distributors (like operating system package managers) can disable
383
+ # RubyGems update by setting this to error message printed to end-users on gem
384
+ # update --system instead of actual update.
385
+ #
386
+ def self.disable_system_update_message=: (String?) -> String?
387
+
388
+ # <!--
389
+ # rdoc-file=lib/rubygems.rb
390
+ # - done_installing(&hook)
391
+ # -->
392
+ # Adds a post-installs hook that will be passed a Gem::DependencyInstaller and a
393
+ # list of installed specifications when Gem::DependencyInstaller#install is
394
+ # complete
395
+ #
396
+ def self.done_installing: () { (DependencyInstaller, Array[Specification]) -> untyped } -> Array[Proc]
397
+
398
+ # <!-- rdoc-file=lib/rubygems.rb -->
399
+ # The list of hooks to be run after Gem::DependencyInstaller installs a set of
400
+ # gems
401
+ #
402
+ def self.done_installing_hooks: () -> Array[Proc?]
403
+
404
+ # <!--
405
+ # rdoc-file=lib/rubygems.rb
406
+ # - ensure_default_gem_subdirectories(dir = Gem.dir, mode = nil)
407
+ # -->
408
+ # Quietly ensure the Gem directory `dir` contains all the proper subdirectories
409
+ # for handling default gems. If we can't create a directory due to a permission
410
+ # problem, then we will silently continue.
411
+ #
412
+ # If `mode` is given, missing directories are created with this mode.
413
+ #
414
+ # World-writable directories will never be created.
415
+ #
416
+ def self.ensure_default_gem_subdirectories: (?String dir, ?Integer | String mode) -> Array[String]
417
+
418
+ # <!--
419
+ # rdoc-file=lib/rubygems.rb
420
+ # - ensure_gem_subdirectories(dir = Gem.dir, mode = nil)
421
+ # -->
422
+ # Quietly ensure the Gem directory `dir` contains all the proper subdirectories.
423
+ # If we can't create a directory due to a permission problem, then we will
424
+ # silently continue.
425
+ #
426
+ # If `mode` is given, missing directories are created with this mode.
427
+ #
428
+ # World-writable directories will never be created.
429
+ #
430
+ def self.ensure_gem_subdirectories: (?String dir, ?Integer | String mode) -> Array[String]
431
+
432
+ # <!--
433
+ # rdoc-file=lib/rubygems.rb
434
+ # - env_requirement(gem_name)
435
+ # -->
436
+ #
437
+ def self.env_requirement: (String gem_name) -> Requirement
438
+
439
+ # <!--
440
+ # rdoc-file=lib/rubygems/defaults.rb
441
+ # - find_config_file()
442
+ # -->
443
+ # Finds the user's config file
444
+ #
445
+ def self.find_config_file: () -> String
446
+
447
+ # <!--
448
+ # rdoc-file=lib/rubygems.rb
449
+ # - find_files(glob, check_load_path = true)
450
+ # -->
451
+ # Returns a list of paths matching `glob` that can be used by a gem to pick up
452
+ # features from other gems. For example:
453
+ #
454
+ # Gem.find_files('rdoc/discover').each do |path| load path end
455
+ #
456
+ # if `check_load_path` is true (the default), then find_files also searches
457
+ # $LOAD_PATH for files as well as gems.
458
+ #
459
+ # Note that find_files will return all files even if they are from different
460
+ # versions of the same gem. See also find_latest_files
461
+ #
462
+ def self.find_files: (String glob, ?boolish check_load_path) -> Array[String]
463
+
464
+ # <!--
465
+ # rdoc-file=lib/rubygems.rb
466
+ # - find_latest_files(glob, check_load_path = true)
467
+ # -->
468
+ # Returns a list of paths matching `glob` from the latest gems that can be used
469
+ # by a gem to pick up features from other gems. For example:
470
+ #
471
+ # Gem.find_latest_files('rdoc/discover').each do |path| load path end
472
+ #
473
+ # if `check_load_path` is true (the default), then find_latest_files also
474
+ # searches $LOAD_PATH for files as well as gems.
475
+ #
476
+ # Unlike find_files, find_latest_files will return only files from the latest
477
+ # version of a gem.
478
+ #
479
+ def self.find_latest_files: (String glob, ?boolish check_load_path) -> Array[String]
480
+
481
+ # <!--
482
+ # rdoc-file=lib/rubygems.rb
483
+ # - find_unresolved_default_spec(path)
484
+ # -->
485
+ # Find an unresolved Gem::Specification of default gem from `path`
486
+ #
487
+ def self.find_unresolved_default_spec: (String path) -> Specification?
488
+
489
+ # <!--
490
+ # rdoc-file=lib/rubygems.rb
491
+ # - finish_resolve(request_set = Gem::RequestSet.new)
492
+ # -->
493
+ #
494
+ def self.finish_resolve: (?RequestSet request_set) -> void
495
+
496
+ # <!-- rdoc-file=lib/rubygems.rb -->
497
+ # GemDependencyAPI object, which is set when .use_gemdeps is called. This
498
+ # contains all the information from the Gemfile.
499
+ #
500
+ def self.gemdeps: () -> RequestSet::GemDependencyAPI?
501
+
502
+ # <!--
503
+ # rdoc-file=lib/rubygems.rb
504
+ # - host()
505
+ # -->
506
+ # Get the default RubyGems API host. This is normally
507
+ # <code>https://rubygems.org</code>.
508
+ #
509
+ def self.host: () -> String
510
+
511
+ # <!--
512
+ # rdoc-file=lib/rubygems.rb
513
+ # - host=(host)
514
+ # -->
515
+ # Set the default RubyGems API host.
516
+ #
517
+ def self.host=: (String host) -> String
518
+
519
+ # <!--
520
+ # rdoc-file=lib/rubygems.rb
521
+ # - install(name, version = Gem::Requirement.default, *options)
522
+ # -->
523
+ # Top level install helper method. Allows you to install gems interactively:
524
+ #
525
+ # % irb
526
+ # >> Gem.install "minitest"
527
+ # Fetching: minitest-5.14.0.gem (100%)
528
+ # => [#<Gem::Specification:0x1013b4528 @name="minitest", ...>]
529
+ #
530
+ def self.install: (String name, ?Gem::Requirement version, *DependencyInstaller::options options) -> Array[Specification]
531
+
532
+ # <!--
533
+ # rdoc-file=lib/rubygems.rb
534
+ # - java_platform?()
535
+ # -->
536
+ # Is this a java platform?
537
+ #
538
+ def self.java_platform?: () -> bool
539
+
540
+ # <!--
541
+ # rdoc-file=lib/rubygems.rb
542
+ # - latest_rubygems_version()
543
+ # -->
544
+ # Returns the latest release version of RubyGems.
545
+ #
546
+ def self.latest_rubygems_version: () -> Version
547
+
548
+ # <!--
549
+ # rdoc-file=lib/rubygems.rb
550
+ # - latest_spec_for(name)
551
+ # -->
552
+ # Returns the latest release-version specification for the gem `name`.
553
+ #
554
+ def self.latest_spec_for: (String name) -> Specification?
555
+
556
+ # <!--
557
+ # rdoc-file=lib/rubygems.rb
558
+ # - latest_version_for(name)
559
+ # -->
560
+ # Returns the version of the latest release-version of gem `name`
561
+ #
562
+ def self.latest_version_for: (String name) -> Version?
563
+
564
+ # <!--
565
+ # rdoc-file=lib/rubygems.rb
566
+ # - load_env_plugins()
567
+ # -->
568
+ # Find all 'rubygems_plugin' files in $LOAD_PATH and load them
569
+ #
570
+ def self.load_env_plugins: () -> Array[String]
571
+
572
+ # <!--
573
+ # rdoc-file=lib/rubygems.rb
574
+ # - load_path_insert_index()
575
+ # -->
576
+ # The index to insert activated gem paths into the $LOAD_PATH. The activated
577
+ # gem's paths are inserted before site lib directory by default.
578
+ #
579
+ def self.load_path_insert_index: () -> Integer
580
+
581
+ # <!--
582
+ # rdoc-file=lib/rubygems.rb
583
+ # - load_plugins()
584
+ # -->
585
+ # Find rubygems plugin files in the standard location and load them
586
+ #
587
+ def self.load_plugins: () -> Array[String]
588
+
589
+ # <!--
590
+ # rdoc-file=lib/rubygems.rb
591
+ # - load_yaml()
592
+ # -->
593
+ # Loads YAML, preferring Psych
594
+ #
595
+ def self.load_yaml: () -> bool?
596
+
597
+ # <!-- rdoc-file=lib/rubygems.rb -->
598
+ # Hash of loaded Gem::Specification keyed by name
599
+ #
600
+ def self.loaded_specs: () -> Hash[String, BasicSpecification]
601
+
602
+ # <!--
603
+ # rdoc-file=lib/rubygems.rb
604
+ # - location_of_caller(depth = 1)
605
+ # -->
606
+ # The file name and line number of the caller of the caller of this method.
607
+ #
608
+ # `depth` is how many layers up the call stack it should go.
609
+ #
610
+ # e.g.,
611
+ #
612
+ # def a; Gem.location_of_caller; end a #=> ["x.rb", 2] # (it'll vary depending
613
+ # on file name and line number)
614
+ #
615
+ # def b; c; end def c; Gem.location_of_caller(2); end b #=> ["x.rb", 6] #
616
+ # (it'll vary depending on file name and line number)
617
+ #
618
+ def self.location_of_caller: (?Integer depth) -> [ String, Integer ]
619
+
620
+ # <!--
621
+ # rdoc-file=lib/rubygems.rb
622
+ # - marshal_version()
623
+ # -->
624
+ # The version of the Marshal format for your Ruby.
625
+ #
626
+ def self.marshal_version: () -> String
627
+
628
+ # <!--
629
+ # rdoc-file=lib/rubygems.rb
630
+ # - needs() { |rs| ... }
631
+ # -->
632
+ #
633
+ def self.needs: () { (RequestSet) -> void } -> void
634
+
635
+ # <!--
636
+ # rdoc-file=lib/rubygems/defaults.rb
637
+ # - operating_system_defaults()
638
+ # -->
639
+ # Default options for gem commands for Ruby packagers.
640
+ #
641
+ # The options here should be structured as an array of string "gem" command
642
+ # names as keys and a string of the default options as values.
643
+ #
644
+ # Example:
645
+ #
646
+ # def self.operating_system_defaults
647
+ # {
648
+ # 'install' => '--no-rdoc --no-ri --env-shebang',
649
+ # 'update' => '--no-rdoc --no-ri --env-shebang'
650
+ # }
651
+ #
652
+ # end
653
+ #
654
+ def self.operating_system_defaults: () -> Hash[String, String]
655
+
656
+ # <!--
657
+ # rdoc-file=lib/rubygems.rb
658
+ # - path()
659
+ # -->
660
+ #
661
+ def self.path: () -> Array[String]
662
+
663
+ # <!--
664
+ # rdoc-file=lib/rubygems/defaults.rb
665
+ # - path_separator()
666
+ # -->
667
+ # How String Gem paths should be split. Overridable for esoteric platforms.
668
+ #
669
+ def self.path_separator: () -> String
670
+
671
+ # <!--
672
+ # rdoc-file=lib/rubygems.rb
673
+ # - paths()
674
+ # -->
675
+ # Retrieve the PathSupport object that RubyGems uses to lookup files.
676
+ #
677
+ def self.paths: () -> PathSupport
678
+
679
+ # <!--
680
+ # rdoc-file=lib/rubygems.rb
681
+ # - paths=(env)
682
+ # -->
683
+ # Initialize the filesystem paths to use from `env`. `env` is a hash-like object
684
+ # (typically ENV) that is queried for 'GEM_HOME', 'GEM_PATH', and
685
+ # 'GEM_SPEC_CACHE' Keys for the `env` hash should be Strings, and values of the
686
+ # hash should be Strings or `nil`.
687
+ #
688
+ def self.paths=: (_HashLike[String, String?] env) -> Array[String]
689
+
690
+ # <!--
691
+ # rdoc-file=lib/rubygems/defaults.rb
692
+ # - platform_defaults()
693
+ # -->
694
+ # Default options for gem commands for Ruby implementers.
695
+ #
696
+ # The options here should be structured as an array of string "gem" command
697
+ # names as keys and a string of the default options as values.
698
+ #
699
+ # Example:
700
+ #
701
+ # def self.platform_defaults
702
+ # {
703
+ # 'install' => '--no-rdoc --no-ri --env-shebang',
704
+ # 'update' => '--no-rdoc --no-ri --env-shebang'
705
+ # }
706
+ #
707
+ # end
708
+ #
709
+ def self.platform_defaults: () -> Hash[String, String]
710
+
711
+ # <!--
712
+ # rdoc-file=lib/rubygems.rb
713
+ # - platforms()
714
+ # -->
715
+ # Array of platforms this RubyGems supports.
716
+ #
717
+ def self.platforms: () -> Array[String | Platform]
718
+
719
+ # <!--
720
+ # rdoc-file=lib/rubygems.rb
721
+ # - platforms=(platforms)
722
+ # -->
723
+ # Set array of platforms this RubyGems supports (primarily for testing).
724
+ #
725
+ def self.platforms=: (Array[String | Platform] platforms) -> Array[String | Platform]
726
+
727
+ # <!--
728
+ # rdoc-file=lib/rubygems.rb
729
+ # - plugin_suffix_pattern()
730
+ # -->
731
+ # Glob pattern for require-able plugin suffixes.
732
+ #
733
+ def self.plugin_suffix_pattern: () -> String
734
+
735
+ # <!--
736
+ # rdoc-file=lib/rubygems.rb
737
+ # - plugin_suffix_regexp()
738
+ # -->
739
+ # Regexp for require-able plugin suffixes.
740
+ #
741
+ def self.plugin_suffix_regexp: () -> Regexp
742
+
743
+ # <!--
744
+ # rdoc-file=lib/rubygems.rb
745
+ # - plugindir(install_dir = Gem.dir)
746
+ # -->
747
+ # The path were rubygems plugins are to be installed.
748
+ #
749
+ def self.plugindir: (?String install_dir) -> String
750
+
751
+ # <!--
752
+ # rdoc-file=lib/rubygems.rb
753
+ # - post_build(&hook)
754
+ # -->
755
+ # Adds a post-build hook that will be passed an Gem::Installer instance when
756
+ # Gem::Installer#install is called. The hook is called after the gem has been
757
+ # extracted and extensions have been built but before the executables or gemspec
758
+ # has been written. If the hook returns `false` then the gem's files will be
759
+ # removed and the install will be aborted.
760
+ #
761
+ def self.post_build: () { (Installer) -> untyped } -> Array[Proc]
762
+
763
+ # <!-- rdoc-file=lib/rubygems.rb -->
764
+ # The list of hooks to be run after Gem::Installer#install extracts files and
765
+ # builds extensions
766
+ #
767
+ def self.post_build_hooks: () -> Array[Proc]
768
+
769
+ # <!--
770
+ # rdoc-file=lib/rubygems.rb
771
+ # - post_install(&hook)
772
+ # -->
773
+ # Adds a post-install hook that will be passed an Gem::Installer instance when
774
+ # Gem::Installer#install is called
775
+ #
776
+ def self.post_install: () { (Installer) -> untyped } -> Array[Proc]
777
+
778
+ # <!-- rdoc-file=lib/rubygems.rb -->
779
+ # The list of hooks to be run after Gem::Installer#install completes
780
+ # installation
781
+ #
782
+ def self.post_install_hooks: () -> Array[Proc]
783
+
784
+ # <!--
785
+ # rdoc-file=lib/rubygems.rb
786
+ # - post_reset(&hook)
787
+ # -->
788
+ # Adds a hook that will get run after Gem::Specification.reset is run.
789
+ #
790
+ def self.post_reset: () { () -> untyped } -> Array[Proc]
791
+
792
+ # <!-- rdoc-file=lib/rubygems.rb -->
793
+ # The list of hooks to be run after Gem::Specification.reset is run.
794
+ #
795
+ def self.post_reset_hooks: () -> Array[Proc?]
796
+
797
+ # <!--
798
+ # rdoc-file=lib/rubygems.rb
799
+ # - post_uninstall(&hook)
800
+ # -->
801
+ # Adds a post-uninstall hook that will be passed a Gem::Uninstaller instance and
802
+ # the spec that was uninstalled when Gem::Uninstaller#uninstall is called
803
+ #
804
+ def self.post_uninstall: () { (Uninstaller) -> untyped } -> Array[Proc]
805
+
806
+ # <!-- rdoc-file=lib/rubygems.rb -->
807
+ # The list of hooks to be run after Gem::Uninstaller#uninstall completes
808
+ # installation
809
+ #
810
+ def self.post_uninstall_hooks: () -> Array[Proc?]
811
+
812
+ # <!--
813
+ # rdoc-file=lib/rubygems.rb
814
+ # - pre_install(&hook)
815
+ # -->
816
+ # Adds a pre-install hook that will be passed an Gem::Installer instance when
817
+ # Gem::Installer#install is called. If the hook returns `false` then the
818
+ # install will be aborted.
819
+ #
820
+ def self.pre_install: () { (Installer) -> untyped } -> Array[Proc]
821
+
822
+ # <!-- rdoc-file=lib/rubygems.rb -->
823
+ # The list of hooks to be run before Gem::Installer#install does any work
824
+ #
825
+ def self.pre_install_hooks: () -> Array[Proc?]
826
+
827
+ # <!--
828
+ # rdoc-file=lib/rubygems.rb
829
+ # - pre_reset(&hook)
830
+ # -->
831
+ # Adds a hook that will get run before Gem::Specification.reset is run.
832
+ #
833
+ def self.pre_reset: () { () -> untyped } -> Array[Proc]
834
+
835
+ # <!-- rdoc-file=lib/rubygems.rb -->
836
+ # The list of hooks to be run before Gem::Specification.reset is run.
837
+ #
838
+ def self.pre_reset_hooks: () -> Array[Proc?]
839
+
840
+ # <!--
841
+ # rdoc-file=lib/rubygems.rb
842
+ # - pre_uninstall(&hook)
843
+ # -->
844
+ # Adds a pre-uninstall hook that will be passed an Gem::Uninstaller instance and
845
+ # the spec that will be uninstalled when Gem::Uninstaller#uninstall is called
846
+ #
847
+ def self.pre_uninstall: () { (Uninstaller) -> untyped } -> Array[Proc]
848
+
849
+ # <!-- rdoc-file=lib/rubygems.rb -->
850
+ # The list of hooks to be run before Gem::Uninstaller#uninstall does any work
851
+ #
852
+ def self.pre_uninstall_hooks: () -> Array[Proc?]
853
+
854
+ # <!--
855
+ # rdoc-file=lib/rubygems.rb
856
+ # - prefix()
857
+ # -->
858
+ # The directory prefix this RubyGems was installed at. If your prefix is in a
859
+ # standard location (ie, rubygems is installed where you'd expect it to be),
860
+ # then prefix returns nil.
861
+ #
862
+ def self.prefix: () -> String?
863
+
864
+ # <!--
865
+ # rdoc-file=lib/rubygems.rb
866
+ # - read_binary(path)
867
+ # -->
868
+ # Safely read a file in binary mode on all platforms.
869
+ #
870
+ def self.read_binary: (String path) -> String
871
+
872
+ # <!--
873
+ # rdoc-file=lib/rubygems.rb
874
+ # - refresh()
875
+ # -->
876
+ # Refresh available gems from disk.
877
+ #
878
+ def self.refresh: () -> Array[Proc]
879
+
880
+ # <!--
881
+ # rdoc-file=lib/rubygems.rb
882
+ # - register_default_spec(spec)
883
+ # -->
884
+ # Register a Gem::Specification for default gem.
885
+ #
886
+ # Two formats for the specification are supported:
887
+ #
888
+ # * MRI 2.0 style, where spec.files contains unprefixed require names. The
889
+ # spec's filenames will be registered as-is.
890
+ # * New style, where spec.files contains files prefixed with paths from
891
+ # spec.require_paths. The prefixes are stripped before registering the
892
+ # spec's filenames. Unprefixed files are omitted.
893
+ #
894
+ def self.register_default_spec: (Specification spec) -> Array[String]
895
+
896
+ # <!--
897
+ # rdoc-file=lib/rubygems.rb
898
+ # - ruby()
899
+ # -->
900
+ # The path to the running Ruby interpreter.
901
+ #
902
+ def self.ruby: () -> String
903
+
904
+ # <!--
905
+ # rdoc-file=lib/rubygems.rb
906
+ # - ruby_api_version()
907
+ # -->
908
+ # Returns a String containing the API compatibility version of Ruby
909
+ #
910
+ def self.ruby_api_version: () -> String
911
+
912
+ # <!--
913
+ # rdoc-file=lib/rubygems/defaults.rb
914
+ # - ruby_engine()
915
+ # -->
916
+ #
917
+ def self.ruby_engine: () -> String
918
+
919
+ # <!--
920
+ # rdoc-file=lib/rubygems.rb
921
+ # - ruby_version()
922
+ # -->
923
+ # A Gem::Version for the currently running Ruby.
924
+ #
925
+ def self.ruby_version: () -> Version
926
+
927
+ # <!--
928
+ # rdoc-file=lib/rubygems.rb
929
+ # - rubygems_version()
930
+ # -->
931
+ # A Gem::Version for the currently running RubyGems
932
+ #
933
+ def self.rubygems_version: () -> Version
934
+
935
+ # <!--
936
+ # rdoc-file=lib/rubygems.rb
937
+ # - source_date_epoch()
938
+ # -->
939
+ # Returns the value of Gem.source_date_epoch_string, as a Time object.
940
+ #
941
+ # This is used throughout RubyGems for enabling reproducible builds.
942
+ #
943
+ def self.source_date_epoch: () -> Time
944
+
945
+ # <!--
946
+ # rdoc-file=lib/rubygems.rb
947
+ # - source_date_epoch_string()
948
+ # -->
949
+ # If the SOURCE_DATE_EPOCH environment variable is set, returns it's value.
950
+ # Otherwise, returns DEFAULT_SOURCE_DATE_EPOCH as a string.
951
+ #
952
+ # NOTE(@duckinator): The implementation is a tad weird because we want to:
953
+ # 1. Make builds reproducible by default, by having this function always
954
+ # return the same result during a given run.
955
+ # 2. Allow changing ENV['SOURCE_DATE_EPOCH'] at runtime, since multiple
956
+ # tests that set this variable will be run in a single process.
957
+ #
958
+ # If you simplify this function and a lot of tests fail, that is likely due to
959
+ # #2 above.
960
+ #
961
+ # Details on SOURCE_DATE_EPOCH:
962
+ # https://reproducible-builds.org/specs/source-date-epoch/
963
+ #
964
+ def self.source_date_epoch_string: () -> String
965
+
966
+ # <!--
967
+ # rdoc-file=lib/rubygems.rb
968
+ # - sources()
969
+ # -->
970
+ # Returns an Array of sources to fetch remote gems from. Uses default_sources if
971
+ # the sources list is empty.
972
+ #
973
+ def self.sources: () -> SourceList
974
+
975
+ # <!--
976
+ # rdoc-file=lib/rubygems.rb
977
+ # - sources=(new_sources)
978
+ # -->
979
+ # Need to be able to set the sources without calling Gem.sources.replace since
980
+ # that would cause an infinite loop.
981
+ #
982
+ # DOC: This comment is not documentation about the method itself, it's more of a
983
+ # code comment about the implementation.
984
+ #
985
+ def self.sources=: (SourceList? new_sources) -> SourceList?
986
+
987
+ # <!--
988
+ # rdoc-file=lib/rubygems.rb
989
+ # - spec_cache_dir()
990
+ # -->
991
+ #
992
+ def self.spec_cache_dir: () -> String
993
+
994
+ # <!--
995
+ # rdoc-file=lib/rubygems.rb
996
+ # - suffix_pattern()
997
+ # -->
998
+ # Glob pattern for require-able path suffixes.
999
+ #
1000
+ def self.suffix_pattern: () -> String
1001
+
1002
+ # <!--
1003
+ # rdoc-file=lib/rubygems.rb
1004
+ # - suffix_regexp()
1005
+ # -->
1006
+ # Regexp for require-able path suffixes.
1007
+ #
1008
+ def self.suffix_regexp: () -> Regexp
1009
+
1010
+ # <!--
1011
+ # rdoc-file=lib/rubygems.rb
1012
+ # - suffixes()
1013
+ # -->
1014
+ # Suffixes for require-able paths.
1015
+ #
1016
+ def self.suffixes: () -> Array[String]
1017
+
1018
+ # <!--
1019
+ # rdoc-file=lib/rubygems.rb
1020
+ # - time(msg, width = 0, display = Gem.configuration.verbose) { || ... }
1021
+ # -->
1022
+ # Prints the amount of time the supplied block takes to run using the debug UI
1023
+ # output.
1024
+ #
1025
+ def self.time: [T] (String msg, ?Integer width, ?boolish display) { () -> T } -> T
1026
+
1027
+ # <!--
1028
+ # rdoc-file=lib/rubygems.rb
1029
+ # - try_activate(path)
1030
+ # -->
1031
+ # Try to activate a gem containing `path`. Returns true if activation succeeded
1032
+ # or wasn't needed because it was already activated. Returns false if it can't
1033
+ # find the path in a gem.
1034
+ #
1035
+ def self.try_activate: (String path) -> bool
1036
+
1037
+ # <!--
1038
+ # rdoc-file=lib/rubygems.rb
1039
+ # - ui()
1040
+ # -->
1041
+ # Lazily loads DefaultUserInteraction and returns the default UI.
1042
+ #
1043
+ def self.ui: () -> StreamUI
1044
+
1045
+ # <!--
1046
+ # rdoc-file=lib/rubygems.rb
1047
+ # - use_gemdeps(path = nil)
1048
+ # -->
1049
+ # Looks for a gem dependency file at `path` and activates the gems in the file
1050
+ # if found. If the file is not found an ArgumentError is raised.
1051
+ #
1052
+ # If `path` is not given the RUBYGEMS_GEMDEPS environment variable is used, but
1053
+ # if no file is found no exception is raised.
1054
+ #
1055
+ # If '-' is given for `path` RubyGems searches up from the current working
1056
+ # directory for gem dependency files (gem.deps.rb, Gemfile, Isolate) and
1057
+ # activates the gems in the first one found.
1058
+ #
1059
+ # You can run this automatically when rubygems starts. To enable, set the
1060
+ # `RUBYGEMS_GEMDEPS` environment variable to either the path of your gem
1061
+ # dependencies file or "-" to auto-discover in parent directories.
1062
+ #
1063
+ # NOTE: Enabling automatic discovery on multiuser systems can lead to execution
1064
+ # of arbitrary code when used from directories outside your control.
1065
+ #
1066
+ def self.use_gemdeps: (?String path) -> void
1067
+
1068
+ # <!--
1069
+ # rdoc-file=lib/rubygems.rb
1070
+ # - use_paths(home, *paths)
1071
+ # -->
1072
+ # Use the `home` and `paths` values for Gem.dir and Gem.path. Used mainly by
1073
+ # the unit tests to provide environment isolation.
1074
+ #
1075
+ def self.use_paths: (String home, *String paths) -> Hash[String, String]
1076
+
1077
+ # <!--
1078
+ # rdoc-file=lib/rubygems/defaults.rb
1079
+ # - user_dir()
1080
+ # -->
1081
+ # Path for gems in the user's home directory
1082
+ #
1083
+ def self.user_dir: () -> String
1084
+
1085
+ # <!--
1086
+ # rdoc-file=lib/rubygems/defaults.rb
1087
+ # - user_home()
1088
+ # -->
1089
+ # The home directory for the user.
1090
+ #
1091
+ def self.user_home: () -> String
1092
+
1093
+ # <!--
1094
+ # rdoc-file=lib/rubygems/win_platform.rb
1095
+ # - win_platform?()
1096
+ # -->
1097
+ # Is this a windows platform?
1098
+ #
1099
+ def self.win_platform?: () -> bool
1100
+
1101
+ # <!--
1102
+ # rdoc-file=lib/rubygems.rb
1103
+ # - write_binary(path, data)
1104
+ # -->
1105
+ # Safely write a file in binary mode on all platforms.
1106
+ #
1107
+ def self.write_binary: (String path, String data) -> Integer
1108
+ end