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