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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1127) hide show
  1. package/PRESTAGE.md +22 -38
  2. package/bin/bundle +1 -1
  3. package/bin/bundler +1 -1
  4. package/bin/erb +1 -1
  5. package/bin/gem +1 -1
  6. package/bin/irb +1 -1
  7. package/bin/rake +1 -1
  8. package/bin/ruby.wasm +0 -0
  9. package/lib/ruby/3.4.0/expect.rb +71 -0
  10. package/lib/ruby/3.4.0/wasm32-wasi/rbconfig.rb +1 -1
  11. package/package.json +8 -6
  12. package/lib/ruby/3.4.11/English.gemspec +0 -22
  13. package/lib/ruby/3.4.11/English.rb +0 -164
  14. package/lib/ruby/3.4.11/benchmark.gemspec +0 -32
  15. package/lib/ruby/3.4.11/benchmark.rb +0 -594
  16. package/lib/ruby/3.4.11/bundled_gems.rb +0 -248
  17. package/lib/ruby/3.4.11/bundler/.document +0 -1
  18. package/lib/ruby/3.4.11/bundler/build_metadata.rb +0 -43
  19. package/lib/ruby/3.4.11/bundler/bundler.gemspec +0 -45
  20. package/lib/ruby/3.4.11/bundler/capistrano.rb +0 -22
  21. package/lib/ruby/3.4.11/bundler/checksum.rb +0 -264
  22. package/lib/ruby/3.4.11/bundler/ci_detector.rb +0 -75
  23. package/lib/ruby/3.4.11/bundler/cli/add.rb +0 -49
  24. package/lib/ruby/3.4.11/bundler/cli/binstubs.rb +0 -57
  25. package/lib/ruby/3.4.11/bundler/cli/cache.rb +0 -43
  26. package/lib/ruby/3.4.11/bundler/cli/check.rb +0 -40
  27. package/lib/ruby/3.4.11/bundler/cli/clean.rb +0 -25
  28. package/lib/ruby/3.4.11/bundler/cli/common.rb +0 -138
  29. package/lib/ruby/3.4.11/bundler/cli/config.rb +0 -204
  30. package/lib/ruby/3.4.11/bundler/cli/console.rb +0 -42
  31. package/lib/ruby/3.4.11/bundler/cli/doctor/diagnose.rb +0 -167
  32. package/lib/ruby/3.4.11/bundler/cli/doctor/ssl.rb +0 -249
  33. package/lib/ruby/3.4.11/bundler/cli/doctor.rb +0 -33
  34. package/lib/ruby/3.4.11/bundler/cli/exec.rb +0 -89
  35. package/lib/ruby/3.4.11/bundler/cli/fund.rb +0 -36
  36. package/lib/ruby/3.4.11/bundler/cli/gem.rb +0 -467
  37. package/lib/ruby/3.4.11/bundler/cli/info.rb +0 -83
  38. package/lib/ruby/3.4.11/bundler/cli/init.rb +0 -51
  39. package/lib/ruby/3.4.11/bundler/cli/inject.rb +0 -60
  40. package/lib/ruby/3.4.11/bundler/cli/install.rb +0 -199
  41. package/lib/ruby/3.4.11/bundler/cli/issue.rb +0 -41
  42. package/lib/ruby/3.4.11/bundler/cli/list.rb +0 -66
  43. package/lib/ruby/3.4.11/bundler/cli/lock.rb +0 -94
  44. package/lib/ruby/3.4.11/bundler/cli/open.rb +0 -29
  45. package/lib/ruby/3.4.11/bundler/cli/outdated.rb +0 -297
  46. package/lib/ruby/3.4.11/bundler/cli/platform.rb +0 -48
  47. package/lib/ruby/3.4.11/bundler/cli/plugin.rb +0 -35
  48. package/lib/ruby/3.4.11/bundler/cli/pristine.rb +0 -60
  49. package/lib/ruby/3.4.11/bundler/cli/remove.rb +0 -17
  50. package/lib/ruby/3.4.11/bundler/cli/show.rb +0 -75
  51. package/lib/ruby/3.4.11/bundler/cli/update.rb +0 -123
  52. package/lib/ruby/3.4.11/bundler/cli/viz.rb +0 -31
  53. package/lib/ruby/3.4.11/bundler/cli.rb +0 -790
  54. package/lib/ruby/3.4.11/bundler/compact_index_client/cache.rb +0 -96
  55. package/lib/ruby/3.4.11/bundler/compact_index_client/cache_file.rb +0 -148
  56. package/lib/ruby/3.4.11/bundler/compact_index_client/parser.rb +0 -84
  57. package/lib/ruby/3.4.11/bundler/compact_index_client/updater.rb +0 -105
  58. package/lib/ruby/3.4.11/bundler/compact_index_client.rb +0 -97
  59. package/lib/ruby/3.4.11/bundler/constants.rb +0 -14
  60. package/lib/ruby/3.4.11/bundler/current_ruby.rb +0 -82
  61. package/lib/ruby/3.4.11/bundler/definition.rb +0 -1187
  62. package/lib/ruby/3.4.11/bundler/dependency.rb +0 -151
  63. package/lib/ruby/3.4.11/bundler/deployment.rb +0 -69
  64. package/lib/ruby/3.4.11/bundler/deprecate.rb +0 -44
  65. package/lib/ruby/3.4.11/bundler/digest.rb +0 -71
  66. package/lib/ruby/3.4.11/bundler/dsl.rb +0 -638
  67. package/lib/ruby/3.4.11/bundler/endpoint_specification.rb +0 -174
  68. package/lib/ruby/3.4.11/bundler/env.rb +0 -148
  69. package/lib/ruby/3.4.11/bundler/environment_preserver.rb +0 -68
  70. package/lib/ruby/3.4.11/bundler/errors.rb +0 -281
  71. package/lib/ruby/3.4.11/bundler/feature_flag.rb +0 -50
  72. package/lib/ruby/3.4.11/bundler/fetcher/base.rb +0 -52
  73. package/lib/ruby/3.4.11/bundler/fetcher/compact_index.rb +0 -120
  74. package/lib/ruby/3.4.11/bundler/fetcher/dependency.rb +0 -78
  75. package/lib/ruby/3.4.11/bundler/fetcher/downloader.rb +0 -91
  76. package/lib/ruby/3.4.11/bundler/fetcher/gem_remote_fetcher.rb +0 -16
  77. package/lib/ruby/3.4.11/bundler/fetcher/index.rb +0 -25
  78. package/lib/ruby/3.4.11/bundler/fetcher.rb +0 -331
  79. package/lib/ruby/3.4.11/bundler/force_platform.rb +0 -16
  80. package/lib/ruby/3.4.11/bundler/friendly_errors.rb +0 -126
  81. package/lib/ruby/3.4.11/bundler/gem_helper.rb +0 -237
  82. package/lib/ruby/3.4.11/bundler/gem_helpers.rb +0 -144
  83. package/lib/ruby/3.4.11/bundler/gem_tasks.rb +0 -7
  84. package/lib/ruby/3.4.11/bundler/gem_version_promoter.rb +0 -147
  85. package/lib/ruby/3.4.11/bundler/graph.rb +0 -152
  86. package/lib/ruby/3.4.11/bundler/index.rb +0 -205
  87. package/lib/ruby/3.4.11/bundler/injector.rb +0 -285
  88. package/lib/ruby/3.4.11/bundler/inline.rb +0 -98
  89. package/lib/ruby/3.4.11/bundler/installer/gem_installer.rb +0 -85
  90. package/lib/ruby/3.4.11/bundler/installer/parallel_installer.rb +0 -203
  91. package/lib/ruby/3.4.11/bundler/installer/standalone.rb +0 -113
  92. package/lib/ruby/3.4.11/bundler/installer.rb +0 -243
  93. package/lib/ruby/3.4.11/bundler/lazy_specification.rb +0 -243
  94. package/lib/ruby/3.4.11/bundler/lockfile_generator.rb +0 -104
  95. package/lib/ruby/3.4.11/bundler/lockfile_parser.rb +0 -300
  96. package/lib/ruby/3.4.11/bundler/man/.document +0 -1
  97. package/lib/ruby/3.4.11/bundler/man/bundle-add.1 +0 -76
  98. package/lib/ruby/3.4.11/bundler/man/bundle-add.1.ronn +0 -87
  99. package/lib/ruby/3.4.11/bundler/man/bundle-binstubs.1 +0 -33
  100. package/lib/ruby/3.4.11/bundler/man/bundle-binstubs.1.ronn +0 -44
  101. package/lib/ruby/3.4.11/bundler/man/bundle-cache.1 +0 -68
  102. package/lib/ruby/3.4.11/bundler/man/bundle-cache.1.ronn +0 -108
  103. package/lib/ruby/3.4.11/bundler/man/bundle-check.1 +0 -24
  104. package/lib/ruby/3.4.11/bundler/man/bundle-check.1.ronn +0 -31
  105. package/lib/ruby/3.4.11/bundler/man/bundle-clean.1 +0 -17
  106. package/lib/ruby/3.4.11/bundler/man/bundle-clean.1.ronn +0 -18
  107. package/lib/ruby/3.4.11/bundler/man/bundle-config.1 +0 -317
  108. package/lib/ruby/3.4.11/bundler/man/bundle-config.1.ronn +0 -408
  109. package/lib/ruby/3.4.11/bundler/man/bundle-console.1 +0 -33
  110. package/lib/ruby/3.4.11/bundler/man/bundle-console.1.ronn +0 -39
  111. package/lib/ruby/3.4.11/bundler/man/bundle-doctor.1 +0 -30
  112. package/lib/ruby/3.4.11/bundler/man/bundle-doctor.1.ronn +0 -33
  113. package/lib/ruby/3.4.11/bundler/man/bundle-env.1 +0 -9
  114. package/lib/ruby/3.4.11/bundler/man/bundle-env.1.ronn +0 -10
  115. package/lib/ruby/3.4.11/bundler/man/bundle-exec.1 +0 -107
  116. package/lib/ruby/3.4.11/bundler/man/bundle-exec.1.ronn +0 -154
  117. package/lib/ruby/3.4.11/bundler/man/bundle-fund.1 +0 -22
  118. package/lib/ruby/3.4.11/bundler/man/bundle-fund.1.ronn +0 -25
  119. package/lib/ruby/3.4.11/bundler/man/bundle-gem.1 +0 -87
  120. package/lib/ruby/3.4.11/bundler/man/bundle-gem.1.ronn +0 -149
  121. package/lib/ruby/3.4.11/bundler/man/bundle-help.1 +0 -9
  122. package/lib/ruby/3.4.11/bundler/man/bundle-help.1.ronn +0 -12
  123. package/lib/ruby/3.4.11/bundler/man/bundle-info.1 +0 -17
  124. package/lib/ruby/3.4.11/bundler/man/bundle-info.1.ronn +0 -21
  125. package/lib/ruby/3.4.11/bundler/man/bundle-init.1 +0 -20
  126. package/lib/ruby/3.4.11/bundler/man/bundle-init.1.ronn +0 -32
  127. package/lib/ruby/3.4.11/bundler/man/bundle-inject.1 +0 -31
  128. package/lib/ruby/3.4.11/bundler/man/bundle-inject.1.ronn +0 -32
  129. package/lib/ruby/3.4.11/bundler/man/bundle-install.1 +0 -218
  130. package/lib/ruby/3.4.11/bundler/man/bundle-install.1.ronn +0 -387
  131. package/lib/ruby/3.4.11/bundler/man/bundle-issue.1 +0 -45
  132. package/lib/ruby/3.4.11/bundler/man/bundle-issue.1.ronn +0 -37
  133. package/lib/ruby/3.4.11/bundler/man/bundle-licenses.1 +0 -9
  134. package/lib/ruby/3.4.11/bundler/man/bundle-licenses.1.ronn +0 -10
  135. package/lib/ruby/3.4.11/bundler/man/bundle-list.1 +0 -35
  136. package/lib/ruby/3.4.11/bundler/man/bundle-list.1.ronn +0 -36
  137. package/lib/ruby/3.4.11/bundler/man/bundle-lock.1 +0 -75
  138. package/lib/ruby/3.4.11/bundler/man/bundle-lock.1.ronn +0 -115
  139. package/lib/ruby/3.4.11/bundler/man/bundle-open.1 +0 -32
  140. package/lib/ruby/3.4.11/bundler/man/bundle-open.1.ronn +0 -28
  141. package/lib/ruby/3.4.11/bundler/man/bundle-outdated.1 +0 -103
  142. package/lib/ruby/3.4.11/bundler/man/bundle-outdated.1.ronn +0 -110
  143. package/lib/ruby/3.4.11/bundler/man/bundle-platform.1 +0 -49
  144. package/lib/ruby/3.4.11/bundler/man/bundle-platform.1.ronn +0 -49
  145. package/lib/ruby/3.4.11/bundler/man/bundle-plugin.1 +0 -58
  146. package/lib/ruby/3.4.11/bundler/man/bundle-plugin.1.ronn +0 -63
  147. package/lib/ruby/3.4.11/bundler/man/bundle-pristine.1 +0 -23
  148. package/lib/ruby/3.4.11/bundler/man/bundle-pristine.1.ronn +0 -34
  149. package/lib/ruby/3.4.11/bundler/man/bundle-remove.1 +0 -21
  150. package/lib/ruby/3.4.11/bundler/man/bundle-remove.1.ronn +0 -23
  151. package/lib/ruby/3.4.11/bundler/man/bundle-show.1 +0 -19
  152. package/lib/ruby/3.4.11/bundler/man/bundle-show.1.ronn +0 -25
  153. package/lib/ruby/3.4.11/bundler/man/bundle-update.1 +0 -281
  154. package/lib/ruby/3.4.11/bundler/man/bundle-update.1.ronn +0 -359
  155. package/lib/ruby/3.4.11/bundler/man/bundle-version.1 +0 -22
  156. package/lib/ruby/3.4.11/bundler/man/bundle-version.1.ronn +0 -24
  157. package/lib/ruby/3.4.11/bundler/man/bundle-viz.1 +0 -30
  158. package/lib/ruby/3.4.11/bundler/man/bundle-viz.1.ronn +0 -36
  159. package/lib/ruby/3.4.11/bundler/man/bundle.1 +0 -102
  160. package/lib/ruby/3.4.11/bundler/man/bundle.1.ronn +0 -116
  161. package/lib/ruby/3.4.11/bundler/man/gemfile.5 +0 -472
  162. package/lib/ruby/3.4.11/bundler/man/gemfile.5.ronn +0 -558
  163. package/lib/ruby/3.4.11/bundler/man/index.txt +0 -33
  164. package/lib/ruby/3.4.11/bundler/match_metadata.rb +0 -30
  165. package/lib/ruby/3.4.11/bundler/match_platform.rb +0 -23
  166. package/lib/ruby/3.4.11/bundler/match_remote_metadata.rb +0 -29
  167. package/lib/ruby/3.4.11/bundler/materialization.rb +0 -59
  168. package/lib/ruby/3.4.11/bundler/mirror.rb +0 -221
  169. package/lib/ruby/3.4.11/bundler/plugin/api/source.rb +0 -322
  170. package/lib/ruby/3.4.11/bundler/plugin/api.rb +0 -81
  171. package/lib/ruby/3.4.11/bundler/plugin/dsl.rb +0 -53
  172. package/lib/ruby/3.4.11/bundler/plugin/events.rb +0 -85
  173. package/lib/ruby/3.4.11/bundler/plugin/index.rb +0 -197
  174. package/lib/ruby/3.4.11/bundler/plugin/installer/git.rb +0 -34
  175. package/lib/ruby/3.4.11/bundler/plugin/installer/path.rb +0 -26
  176. package/lib/ruby/3.4.11/bundler/plugin/installer/rubygems.rb +0 -19
  177. package/lib/ruby/3.4.11/bundler/plugin/installer.rb +0 -132
  178. package/lib/ruby/3.4.11/bundler/plugin/source_list.rb +0 -31
  179. package/lib/ruby/3.4.11/bundler/plugin.rb +0 -378
  180. package/lib/ruby/3.4.11/bundler/process_lock.rb +0 -20
  181. package/lib/ruby/3.4.11/bundler/remote_specification.rb +0 -126
  182. package/lib/ruby/3.4.11/bundler/resolver/base.rb +0 -118
  183. package/lib/ruby/3.4.11/bundler/resolver/candidate.rb +0 -85
  184. package/lib/ruby/3.4.11/bundler/resolver/incompatibility.rb +0 -15
  185. package/lib/ruby/3.4.11/bundler/resolver/package.rb +0 -94
  186. package/lib/ruby/3.4.11/bundler/resolver/root.rb +0 -25
  187. package/lib/ruby/3.4.11/bundler/resolver/spec_group.rb +0 -74
  188. package/lib/ruby/3.4.11/bundler/resolver/strategy.rb +0 -40
  189. package/lib/ruby/3.4.11/bundler/resolver.rb +0 -526
  190. package/lib/ruby/3.4.11/bundler/retry.rb +0 -66
  191. package/lib/ruby/3.4.11/bundler/ruby_dsl.rb +0 -62
  192. package/lib/ruby/3.4.11/bundler/ruby_version.rb +0 -137
  193. package/lib/ruby/3.4.11/bundler/rubygems_ext.rb +0 -485
  194. package/lib/ruby/3.4.11/bundler/rubygems_gem_installer.rb +0 -172
  195. package/lib/ruby/3.4.11/bundler/rubygems_integration.rb +0 -455
  196. package/lib/ruby/3.4.11/bundler/runtime.rb +0 -320
  197. package/lib/ruby/3.4.11/bundler/safe_marshal.rb +0 -31
  198. package/lib/ruby/3.4.11/bundler/self_manager.rb +0 -206
  199. package/lib/ruby/3.4.11/bundler/settings/validator.rb +0 -102
  200. package/lib/ruby/3.4.11/bundler/settings.rb +0 -599
  201. package/lib/ruby/3.4.11/bundler/setup.rb +0 -39
  202. package/lib/ruby/3.4.11/bundler/shared_helpers.rb +0 -398
  203. package/lib/ruby/3.4.11/bundler/similarity_detector.rb +0 -63
  204. package/lib/ruby/3.4.11/bundler/source/gemspec.rb +0 -15
  205. package/lib/ruby/3.4.11/bundler/source/git/git_proxy.rb +0 -472
  206. package/lib/ruby/3.4.11/bundler/source/git.rb +0 -452
  207. package/lib/ruby/3.4.11/bundler/source/metadata.rb +0 -63
  208. package/lib/ruby/3.4.11/bundler/source/path/installer.rb +0 -53
  209. package/lib/ruby/3.4.11/bundler/source/path.rb +0 -250
  210. package/lib/ruby/3.4.11/bundler/source/rubygems/remote.rb +0 -76
  211. package/lib/ruby/3.4.11/bundler/source/rubygems.rb +0 -522
  212. package/lib/ruby/3.4.11/bundler/source/rubygems_aggregate.rb +0 -68
  213. package/lib/ruby/3.4.11/bundler/source.rb +0 -118
  214. package/lib/ruby/3.4.11/bundler/source_list.rb +0 -273
  215. package/lib/ruby/3.4.11/bundler/source_map.rb +0 -71
  216. package/lib/ruby/3.4.11/bundler/spec_set.rb +0 -395
  217. package/lib/ruby/3.4.11/bundler/stub_specification.rb +0 -146
  218. package/lib/ruby/3.4.11/bundler/templates/.document +0 -1
  219. package/lib/ruby/3.4.11/bundler/templates/Executable +0 -27
  220. package/lib/ruby/3.4.11/bundler/templates/Executable.bundler +0 -109
  221. package/lib/ruby/3.4.11/bundler/templates/Executable.standalone +0 -14
  222. package/lib/ruby/3.4.11/bundler/templates/Gemfile +0 -5
  223. package/lib/ruby/3.4.11/bundler/templates/newgem/CHANGELOG.md.tt +0 -5
  224. package/lib/ruby/3.4.11/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +0 -132
  225. package/lib/ruby/3.4.11/bundler/templates/newgem/Cargo.toml.tt +0 -7
  226. package/lib/ruby/3.4.11/bundler/templates/newgem/Gemfile.tt +0 -24
  227. package/lib/ruby/3.4.11/bundler/templates/newgem/LICENSE.txt.tt +0 -21
  228. package/lib/ruby/3.4.11/bundler/templates/newgem/README.md.tt +0 -49
  229. package/lib/ruby/3.4.11/bundler/templates/newgem/Rakefile.tt +0 -67
  230. package/lib/ruby/3.4.11/bundler/templates/newgem/bin/console.tt +0 -11
  231. package/lib/ruby/3.4.11/bundler/templates/newgem/bin/setup.tt +0 -8
  232. package/lib/ruby/3.4.11/bundler/templates/newgem/circleci/config.yml.tt +0 -25
  233. package/lib/ruby/3.4.11/bundler/templates/newgem/exe/newgem.tt +0 -3
  234. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +0 -15
  235. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +0 -10
  236. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +0 -6
  237. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/newgem.c.tt +0 -9
  238. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/newgem.h.tt +0 -6
  239. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +0 -12
  240. package/lib/ruby/3.4.11/bundler/templates/newgem/github/workflows/main.yml.tt +0 -37
  241. package/lib/ruby/3.4.11/bundler/templates/newgem/gitignore.tt +0 -23
  242. package/lib/ruby/3.4.11/bundler/templates/newgem/gitlab-ci.yml.tt +0 -18
  243. package/lib/ruby/3.4.11/bundler/templates/newgem/lib/newgem/version.rb.tt +0 -9
  244. package/lib/ruby/3.4.11/bundler/templates/newgem/lib/newgem.rb.tt +0 -15
  245. package/lib/ruby/3.4.11/bundler/templates/newgem/newgem.gemspec.tt +0 -52
  246. package/lib/ruby/3.4.11/bundler/templates/newgem/rspec.tt +0 -3
  247. package/lib/ruby/3.4.11/bundler/templates/newgem/rubocop.yml.tt +0 -8
  248. package/lib/ruby/3.4.11/bundler/templates/newgem/sig/newgem.rbs.tt +0 -8
  249. package/lib/ruby/3.4.11/bundler/templates/newgem/spec/newgem_spec.rb.tt +0 -11
  250. package/lib/ruby/3.4.11/bundler/templates/newgem/spec/spec_helper.rb.tt +0 -15
  251. package/lib/ruby/3.4.11/bundler/templates/newgem/standard.yml.tt +0 -3
  252. package/lib/ruby/3.4.11/bundler/templates/newgem/test/minitest/test_helper.rb.tt +0 -6
  253. package/lib/ruby/3.4.11/bundler/templates/newgem/test/minitest/test_newgem.rb.tt +0 -13
  254. package/lib/ruby/3.4.11/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +0 -15
  255. package/lib/ruby/3.4.11/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +0 -6
  256. package/lib/ruby/3.4.11/bundler/ui/rg_proxy.rb +0 -19
  257. package/lib/ruby/3.4.11/bundler/ui/shell.rb +0 -187
  258. package/lib/ruby/3.4.11/bundler/ui/silent.rb +0 -96
  259. package/lib/ruby/3.4.11/bundler/ui.rb +0 -9
  260. package/lib/ruby/3.4.11/bundler/uri_credentials_filter.rb +0 -43
  261. package/lib/ruby/3.4.11/bundler/uri_normalizer.rb +0 -23
  262. package/lib/ruby/3.4.11/bundler/vendor/.document +0 -1
  263. package/lib/ruby/3.4.11/bundler/vendor/connection_pool/.document +0 -1
  264. package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +0 -224
  265. package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool/version.rb +0 -3
  266. package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +0 -56
  267. package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool.rb +0 -186
  268. package/lib/ruby/3.4.11/bundler/vendor/fileutils/.document +0 -1
  269. package/lib/ruby/3.4.11/bundler/vendor/fileutils/lib/fileutils.rb +0 -2696
  270. package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/.document +0 -1
  271. package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +0 -41
  272. package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +0 -65
  273. package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +0 -79
  274. package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +0 -1111
  275. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/.document +0 -1
  276. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +0 -20
  277. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +0 -169
  278. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +0 -182
  279. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +0 -150
  280. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/package.rb +0 -43
  281. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +0 -121
  282. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +0 -45
  283. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +0 -19
  284. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +0 -61
  285. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/strategy.rb +0 -42
  286. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/term.rb +0 -105
  287. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version.rb +0 -3
  288. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +0 -129
  289. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +0 -423
  290. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +0 -236
  291. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +0 -178
  292. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub.rb +0 -31
  293. package/lib/ruby/3.4.11/bundler/vendor/securerandom/.document +0 -1
  294. package/lib/ruby/3.4.11/bundler/vendor/securerandom/lib/securerandom.rb +0 -102
  295. package/lib/ruby/3.4.11/bundler/vendor/thor/.document +0 -1
  296. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/create_file.rb +0 -105
  297. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/create_link.rb +0 -61
  298. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/directory.rb +0 -108
  299. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +0 -143
  300. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +0 -371
  301. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +0 -130
  302. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions.rb +0 -340
  303. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/base.rb +0 -825
  304. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/command.rb +0 -151
  305. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +0 -107
  306. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/error.rb +0 -106
  307. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/group.rb +0 -292
  308. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/invocation.rb +0 -178
  309. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/line_editor/basic.rb +0 -37
  310. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/line_editor/readline.rb +0 -88
  311. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/line_editor.rb +0 -17
  312. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/nested_context.rb +0 -29
  313. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/argument.rb +0 -86
  314. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/arguments.rb +0 -195
  315. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/option.rb +0 -178
  316. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/options.rb +0 -294
  317. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser.rb +0 -4
  318. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/rake_compat.rb +0 -72
  319. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/runner.rb +0 -335
  320. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/basic.rb +0 -388
  321. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/color.rb +0 -112
  322. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/column_printer.rb +0 -29
  323. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/html.rb +0 -81
  324. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/table_printer.rb +0 -118
  325. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/terminal.rb +0 -42
  326. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +0 -38
  327. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell.rb +0 -81
  328. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/util.rb +0 -285
  329. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/version.rb +0 -3
  330. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor.rb +0 -674
  331. package/lib/ruby/3.4.11/bundler/vendor/tsort/.document +0 -1
  332. package/lib/ruby/3.4.11/bundler/vendor/tsort/lib/tsort.rb +0 -455
  333. package/lib/ruby/3.4.11/bundler/vendor/uri/.document +0 -1
  334. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/common.rb +0 -880
  335. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/file.rb +0 -100
  336. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ftp.rb +0 -267
  337. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/generic.rb +0 -1592
  338. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/http.rb +0 -125
  339. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/https.rb +0 -23
  340. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ldap.rb +0 -261
  341. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ldaps.rb +0 -22
  342. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/mailto.rb +0 -293
  343. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +0 -546
  344. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +0 -206
  345. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/version.rb +0 -6
  346. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ws.rb +0 -83
  347. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/wss.rb +0 -23
  348. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri.rb +0 -104
  349. package/lib/ruby/3.4.11/bundler/vendored_fileutils.rb +0 -4
  350. package/lib/ruby/3.4.11/bundler/vendored_net_http.rb +0 -23
  351. package/lib/ruby/3.4.11/bundler/vendored_persistent.rb +0 -11
  352. package/lib/ruby/3.4.11/bundler/vendored_pub_grub.rb +0 -4
  353. package/lib/ruby/3.4.11/bundler/vendored_securerandom.rb +0 -12
  354. package/lib/ruby/3.4.11/bundler/vendored_thor.rb +0 -8
  355. package/lib/ruby/3.4.11/bundler/vendored_timeout.rb +0 -12
  356. package/lib/ruby/3.4.11/bundler/vendored_tsort.rb +0 -4
  357. package/lib/ruby/3.4.11/bundler/vendored_uri.rb +0 -21
  358. package/lib/ruby/3.4.11/bundler/version.rb +0 -13
  359. package/lib/ruby/3.4.11/bundler/vlad.rb +0 -17
  360. package/lib/ruby/3.4.11/bundler/worker.rb +0 -117
  361. package/lib/ruby/3.4.11/bundler/yaml_serializer.rb +0 -98
  362. package/lib/ruby/3.4.11/bundler.rb +0 -701
  363. package/lib/ruby/3.4.11/cgi/cgi.gemspec +0 -43
  364. package/lib/ruby/3.4.11/cgi/cookie.rb +0 -210
  365. package/lib/ruby/3.4.11/cgi/core.rb +0 -900
  366. package/lib/ruby/3.4.11/cgi/html.rb +0 -1035
  367. package/lib/ruby/3.4.11/cgi/session/pstore.rb +0 -91
  368. package/lib/ruby/3.4.11/cgi/session.rb +0 -562
  369. package/lib/ruby/3.4.11/cgi/util.rb +0 -258
  370. package/lib/ruby/3.4.11/cgi.rb +0 -297
  371. package/lib/ruby/3.4.11/delegate.gemspec +0 -29
  372. package/lib/ruby/3.4.11/delegate.rb +0 -444
  373. package/lib/ruby/3.4.11/did_you_mean/core_ext/name_error.rb +0 -57
  374. package/lib/ruby/3.4.11/did_you_mean/did_you_mean.gemspec +0 -25
  375. package/lib/ruby/3.4.11/did_you_mean/experimental.rb +0 -2
  376. package/lib/ruby/3.4.11/did_you_mean/formatter.rb +0 -44
  377. package/lib/ruby/3.4.11/did_you_mean/formatters/plain_formatter.rb +0 -4
  378. package/lib/ruby/3.4.11/did_you_mean/formatters/verbose_formatter.rb +0 -10
  379. package/lib/ruby/3.4.11/did_you_mean/jaro_winkler.rb +0 -84
  380. package/lib/ruby/3.4.11/did_you_mean/levenshtein.rb +0 -57
  381. package/lib/ruby/3.4.11/did_you_mean/spell_checker.rb +0 -46
  382. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/key_error_checker.rb +0 -28
  383. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/method_name_checker.rb +0 -79
  384. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb +0 -49
  385. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb +0 -85
  386. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/name_error_checkers.rb +0 -20
  387. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/null_checker.rb +0 -6
  388. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/pattern_key_name_checker.rb +0 -28
  389. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/require_path_checker.rb +0 -39
  390. package/lib/ruby/3.4.11/did_you_mean/tree_spell_checker.rb +0 -109
  391. package/lib/ruby/3.4.11/did_you_mean/verbose.rb +0 -2
  392. package/lib/ruby/3.4.11/did_you_mean/version.rb +0 -3
  393. package/lib/ruby/3.4.11/did_you_mean.rb +0 -131
  394. package/lib/ruby/3.4.11/erb/compiler.rb +0 -472
  395. package/lib/ruby/3.4.11/erb/def_method.rb +0 -47
  396. package/lib/ruby/3.4.11/erb/util.rb +0 -63
  397. package/lib/ruby/3.4.11/erb/version.rb +0 -5
  398. package/lib/ruby/3.4.11/erb.gemspec +0 -38
  399. package/lib/ruby/3.4.11/erb.rb +0 -509
  400. package/lib/ruby/3.4.11/error_highlight/base.rb +0 -830
  401. package/lib/ruby/3.4.11/error_highlight/core_ext.rb +0 -47
  402. package/lib/ruby/3.4.11/error_highlight/error_highlight.gemspec +0 -27
  403. package/lib/ruby/3.4.11/error_highlight/formatter.rb +0 -74
  404. package/lib/ruby/3.4.11/error_highlight/version.rb +0 -3
  405. package/lib/ruby/3.4.11/error_highlight.rb +0 -2
  406. package/lib/ruby/3.4.11/fileutils.gemspec +0 -31
  407. package/lib/ruby/3.4.11/fileutils.rb +0 -2696
  408. package/lib/ruby/3.4.11/find.gemspec +0 -29
  409. package/lib/ruby/3.4.11/find.rb +0 -90
  410. package/lib/ruby/3.4.11/forwardable/forwardable.gemspec +0 -26
  411. package/lib/ruby/3.4.11/forwardable/impl.rb +0 -17
  412. package/lib/ruby/3.4.11/forwardable.rb +0 -321
  413. package/lib/ruby/3.4.11/ipaddr.gemspec +0 -36
  414. package/lib/ruby/3.4.11/ipaddr.rb +0 -841
  415. package/lib/ruby/3.4.11/irb/cmd/nop.rb +0 -4
  416. package/lib/ruby/3.4.11/irb/color.rb +0 -262
  417. package/lib/ruby/3.4.11/irb/color_printer.rb +0 -55
  418. package/lib/ruby/3.4.11/irb/command/backtrace.rb +0 -17
  419. package/lib/ruby/3.4.11/irb/command/base.rb +0 -60
  420. package/lib/ruby/3.4.11/irb/command/break.rb +0 -17
  421. package/lib/ruby/3.4.11/irb/command/catch.rb +0 -17
  422. package/lib/ruby/3.4.11/irb/command/cd.rb +0 -51
  423. package/lib/ruby/3.4.11/irb/command/chws.rb +0 -40
  424. package/lib/ruby/3.4.11/irb/command/context.rb +0 -16
  425. package/lib/ruby/3.4.11/irb/command/continue.rb +0 -17
  426. package/lib/ruby/3.4.11/irb/command/debug.rb +0 -73
  427. package/lib/ruby/3.4.11/irb/command/delete.rb +0 -17
  428. package/lib/ruby/3.4.11/irb/command/disable_irb.rb +0 -19
  429. package/lib/ruby/3.4.11/irb/command/edit.rb +0 -63
  430. package/lib/ruby/3.4.11/irb/command/exit.rb +0 -18
  431. package/lib/ruby/3.4.11/irb/command/finish.rb +0 -17
  432. package/lib/ruby/3.4.11/irb/command/force_exit.rb +0 -18
  433. package/lib/ruby/3.4.11/irb/command/help.rb +0 -83
  434. package/lib/ruby/3.4.11/irb/command/history.rb +0 -45
  435. package/lib/ruby/3.4.11/irb/command/info.rb +0 -17
  436. package/lib/ruby/3.4.11/irb/command/internal_helpers.rb +0 -27
  437. package/lib/ruby/3.4.11/irb/command/irb_info.rb +0 -33
  438. package/lib/ruby/3.4.11/irb/command/load.rb +0 -91
  439. package/lib/ruby/3.4.11/irb/command/ls.rb +0 -167
  440. package/lib/ruby/3.4.11/irb/command/measure.rb +0 -49
  441. package/lib/ruby/3.4.11/irb/command/next.rb +0 -17
  442. package/lib/ruby/3.4.11/irb/command/pushws.rb +0 -65
  443. package/lib/ruby/3.4.11/irb/command/show_doc.rb +0 -51
  444. package/lib/ruby/3.4.11/irb/command/show_source.rb +0 -74
  445. package/lib/ruby/3.4.11/irb/command/step.rb +0 -17
  446. package/lib/ruby/3.4.11/irb/command/subirb.rb +0 -123
  447. package/lib/ruby/3.4.11/irb/command/whereami.rb +0 -23
  448. package/lib/ruby/3.4.11/irb/command.rb +0 -23
  449. package/lib/ruby/3.4.11/irb/completion.rb +0 -504
  450. package/lib/ruby/3.4.11/irb/context.rb +0 -716
  451. package/lib/ruby/3.4.11/irb/debug/ui.rb +0 -101
  452. package/lib/ruby/3.4.11/irb/debug.rb +0 -127
  453. package/lib/ruby/3.4.11/irb/default_commands.rb +0 -276
  454. package/lib/ruby/3.4.11/irb/easter-egg.rb +0 -152
  455. package/lib/ruby/3.4.11/irb/ext/change-ws.rb +0 -37
  456. package/lib/ruby/3.4.11/irb/ext/eval_history.rb +0 -149
  457. package/lib/ruby/3.4.11/irb/ext/loader.rb +0 -127
  458. package/lib/ruby/3.4.11/irb/ext/multi-irb.rb +0 -258
  459. package/lib/ruby/3.4.11/irb/ext/tracer.rb +0 -39
  460. package/lib/ruby/3.4.11/irb/ext/use-loader.rb +0 -67
  461. package/lib/ruby/3.4.11/irb/ext/workspaces.rb +0 -36
  462. package/lib/ruby/3.4.11/irb/frame.rb +0 -80
  463. package/lib/ruby/3.4.11/irb/help.rb +0 -28
  464. package/lib/ruby/3.4.11/irb/helper_method/base.rb +0 -16
  465. package/lib/ruby/3.4.11/irb/helper_method/conf.rb +0 -11
  466. package/lib/ruby/3.4.11/irb/helper_method.rb +0 -29
  467. package/lib/ruby/3.4.11/irb/history.rb +0 -112
  468. package/lib/ruby/3.4.11/irb/init.rb +0 -538
  469. package/lib/ruby/3.4.11/irb/input-method.rb +0 -515
  470. package/lib/ruby/3.4.11/irb/inspector.rb +0 -131
  471. package/lib/ruby/3.4.11/irb/irb.gemspec +0 -46
  472. package/lib/ruby/3.4.11/irb/lc/error.rb +0 -52
  473. package/lib/ruby/3.4.11/irb/lc/help-message +0 -55
  474. package/lib/ruby/3.4.11/irb/lc/ja/error.rb +0 -53
  475. package/lib/ruby/3.4.11/irb/lc/ja/help-message +0 -58
  476. package/lib/ruby/3.4.11/irb/locale.rb +0 -153
  477. package/lib/ruby/3.4.11/irb/nesting_parser.rb +0 -239
  478. package/lib/ruby/3.4.11/irb/notifier.rb +0 -230
  479. package/lib/ruby/3.4.11/irb/output-method.rb +0 -80
  480. package/lib/ruby/3.4.11/irb/pager.rb +0 -100
  481. package/lib/ruby/3.4.11/irb/ruby-lex.rb +0 -476
  482. package/lib/ruby/3.4.11/irb/ruby_logo.aa +0 -118
  483. package/lib/ruby/3.4.11/irb/source_finder.rb +0 -138
  484. package/lib/ruby/3.4.11/irb/statement.rb +0 -80
  485. package/lib/ruby/3.4.11/irb/version.rb +0 -11
  486. package/lib/ruby/3.4.11/irb/workspace.rb +0 -171
  487. package/lib/ruby/3.4.11/irb/ws-for-case-2.rb +0 -9
  488. package/lib/ruby/3.4.11/irb/xmp.rb +0 -164
  489. package/lib/ruby/3.4.11/irb.rb +0 -1593
  490. package/lib/ruby/3.4.11/logger/errors.rb +0 -9
  491. package/lib/ruby/3.4.11/logger/formatter.rb +0 -36
  492. package/lib/ruby/3.4.11/logger/log_device.rb +0 -236
  493. package/lib/ruby/3.4.11/logger/logger.gemspec +0 -22
  494. package/lib/ruby/3.4.11/logger/period.rb +0 -47
  495. package/lib/ruby/3.4.11/logger/severity.rb +0 -38
  496. package/lib/ruby/3.4.11/logger/version.rb +0 -5
  497. package/lib/ruby/3.4.11/logger.rb +0 -761
  498. package/lib/ruby/3.4.11/mkmf.rb +0 -3045
  499. package/lib/ruby/3.4.11/net/http/exceptions.rb +0 -34
  500. package/lib/ruby/3.4.11/net/http/generic_request.rb +0 -414
  501. package/lib/ruby/3.4.11/net/http/header.rb +0 -981
  502. package/lib/ruby/3.4.11/net/http/net-http.gemspec +0 -39
  503. package/lib/ruby/3.4.11/net/http/proxy_delta.rb +0 -17
  504. package/lib/ruby/3.4.11/net/http/request.rb +0 -88
  505. package/lib/ruby/3.4.11/net/http/requests.rb +0 -430
  506. package/lib/ruby/3.4.11/net/http/response.rb +0 -738
  507. package/lib/ruby/3.4.11/net/http/responses.rb +0 -1174
  508. package/lib/ruby/3.4.11/net/http/status.rb +0 -84
  509. package/lib/ruby/3.4.11/net/http.rb +0 -2574
  510. package/lib/ruby/3.4.11/net/https.rb +0 -23
  511. package/lib/ruby/3.4.11/net/net-protocol.gemspec +0 -34
  512. package/lib/ruby/3.4.11/net/protocol.rb +0 -544
  513. package/lib/ruby/3.4.11/open-uri.gemspec +0 -32
  514. package/lib/ruby/3.4.11/open-uri.rb +0 -895
  515. package/lib/ruby/3.4.11/open3/open3.gemspec +0 -33
  516. package/lib/ruby/3.4.11/open3/version.rb +0 -3
  517. package/lib/ruby/3.4.11/open3.rb +0 -1410
  518. package/lib/ruby/3.4.11/optionparser.rb +0 -2
  519. package/lib/ruby/3.4.11/optparse/ac.rb +0 -70
  520. package/lib/ruby/3.4.11/optparse/date.rb +0 -18
  521. package/lib/ruby/3.4.11/optparse/kwargs.rb +0 -27
  522. package/lib/ruby/3.4.11/optparse/optparse.gemspec +0 -31
  523. package/lib/ruby/3.4.11/optparse/shellwords.rb +0 -7
  524. package/lib/ruby/3.4.11/optparse/time.rb +0 -11
  525. package/lib/ruby/3.4.11/optparse/uri.rb +0 -7
  526. package/lib/ruby/3.4.11/optparse/version.rb +0 -80
  527. package/lib/ruby/3.4.11/optparse.rb +0 -2429
  528. package/lib/ruby/3.4.11/ostruct.gemspec +0 -24
  529. package/lib/ruby/3.4.11/ostruct.rb +0 -489
  530. package/lib/ruby/3.4.11/pp.gemspec +0 -35
  531. package/lib/ruby/3.4.11/pp.rb +0 -699
  532. package/lib/ruby/3.4.11/prettyprint.gemspec +0 -29
  533. package/lib/ruby/3.4.11/prettyprint.rb +0 -558
  534. package/lib/ruby/3.4.11/prism/compiler.rb +0 -801
  535. package/lib/ruby/3.4.11/prism/desugar_compiler.rb +0 -392
  536. package/lib/ruby/3.4.11/prism/dispatcher.rb +0 -2210
  537. package/lib/ruby/3.4.11/prism/dsl.rb +0 -1003
  538. package/lib/ruby/3.4.11/prism/ffi.rb +0 -570
  539. package/lib/ruby/3.4.11/prism/inspect_visitor.rb +0 -2392
  540. package/lib/ruby/3.4.11/prism/lex_compat.rb +0 -928
  541. package/lib/ruby/3.4.11/prism/mutation_compiler.rb +0 -772
  542. package/lib/ruby/3.4.11/prism/node.rb +0 -18816
  543. package/lib/ruby/3.4.11/prism/node_ext.rb +0 -511
  544. package/lib/ruby/3.4.11/prism/pack.rb +0 -230
  545. package/lib/ruby/3.4.11/prism/parse_result/comments.rb +0 -188
  546. package/lib/ruby/3.4.11/prism/parse_result/errors.rb +0 -66
  547. package/lib/ruby/3.4.11/prism/parse_result/newlines.rb +0 -155
  548. package/lib/ruby/3.4.11/prism/parse_result.rb +0 -911
  549. package/lib/ruby/3.4.11/prism/pattern.rb +0 -269
  550. package/lib/ruby/3.4.11/prism/polyfill/append_as_bytes.rb +0 -15
  551. package/lib/ruby/3.4.11/prism/polyfill/byteindex.rb +0 -13
  552. package/lib/ruby/3.4.11/prism/polyfill/scan_byte.rb +0 -14
  553. package/lib/ruby/3.4.11/prism/polyfill/unpack1.rb +0 -14
  554. package/lib/ruby/3.4.11/prism/polyfill/warn.rb +0 -36
  555. package/lib/ruby/3.4.11/prism/prism.gemspec +0 -174
  556. package/lib/ruby/3.4.11/prism/reflection.rb +0 -416
  557. package/lib/ruby/3.4.11/prism/relocation.rb +0 -505
  558. package/lib/ruby/3.4.11/prism/serialize.rb +0 -2400
  559. package/lib/ruby/3.4.11/prism/string_query.rb +0 -31
  560. package/lib/ruby/3.4.11/prism/translation/parser/builder.rb +0 -62
  561. package/lib/ruby/3.4.11/prism/translation/parser/compiler.rb +0 -2234
  562. package/lib/ruby/3.4.11/prism/translation/parser/lexer.rb +0 -820
  563. package/lib/ruby/3.4.11/prism/translation/parser.rb +0 -374
  564. package/lib/ruby/3.4.11/prism/translation/parser33.rb +0 -13
  565. package/lib/ruby/3.4.11/prism/translation/parser34.rb +0 -13
  566. package/lib/ruby/3.4.11/prism/translation/parser35.rb +0 -13
  567. package/lib/ruby/3.4.11/prism/translation/parser_current.rb +0 -24
  568. package/lib/ruby/3.4.11/prism/translation/ripper/sexp.rb +0 -126
  569. package/lib/ruby/3.4.11/prism/translation/ripper/shim.rb +0 -5
  570. package/lib/ruby/3.4.11/prism/translation/ripper.rb +0 -3474
  571. package/lib/ruby/3.4.11/prism/translation/ruby_parser.rb +0 -1929
  572. package/lib/ruby/3.4.11/prism/translation.rb +0 -16
  573. package/lib/ruby/3.4.11/prism/visitor.rb +0 -813
  574. package/lib/ruby/3.4.11/prism.rb +0 -91
  575. package/lib/ruby/3.4.11/pstore.gemspec +0 -32
  576. package/lib/ruby/3.4.11/pstore.rb +0 -736
  577. package/lib/ruby/3.4.11/random/formatter.rb +0 -372
  578. package/lib/ruby/3.4.11/rdoc/.document +0 -2
  579. package/lib/ruby/3.4.11/rdoc/code_object/alias.rb +0 -104
  580. package/lib/ruby/3.4.11/rdoc/code_object/anon_class.rb +0 -10
  581. package/lib/ruby/3.4.11/rdoc/code_object/any_method.rb +0 -374
  582. package/lib/ruby/3.4.11/rdoc/code_object/attr.rb +0 -172
  583. package/lib/ruby/3.4.11/rdoc/code_object/class_module.rb +0 -888
  584. package/lib/ruby/3.4.11/rdoc/code_object/constant.rb +0 -186
  585. package/lib/ruby/3.4.11/rdoc/code_object/context/section.rb +0 -175
  586. package/lib/ruby/3.4.11/rdoc/code_object/context.rb +0 -1222
  587. package/lib/ruby/3.4.11/rdoc/code_object/extend.rb +0 -9
  588. package/lib/ruby/3.4.11/rdoc/code_object/ghost_method.rb +0 -6
  589. package/lib/ruby/3.4.11/rdoc/code_object/include.rb +0 -9
  590. package/lib/ruby/3.4.11/rdoc/code_object/meta_method.rb +0 -6
  591. package/lib/ruby/3.4.11/rdoc/code_object/method_attr.rb +0 -410
  592. package/lib/ruby/3.4.11/rdoc/code_object/mixin.rb +0 -120
  593. package/lib/ruby/3.4.11/rdoc/code_object/normal_class.rb +0 -92
  594. package/lib/ruby/3.4.11/rdoc/code_object/normal_module.rb +0 -73
  595. package/lib/ruby/3.4.11/rdoc/code_object/require.rb +0 -51
  596. package/lib/ruby/3.4.11/rdoc/code_object/single_class.rb +0 -30
  597. package/lib/ruby/3.4.11/rdoc/code_object/top_level.rb +0 -273
  598. package/lib/ruby/3.4.11/rdoc/code_object.rb +0 -395
  599. package/lib/ruby/3.4.11/rdoc/code_objects.rb +0 -5
  600. package/lib/ruby/3.4.11/rdoc/comment.rb +0 -236
  601. package/lib/ruby/3.4.11/rdoc/cross_reference.rb +0 -228
  602. package/lib/ruby/3.4.11/rdoc/encoding.rb +0 -120
  603. package/lib/ruby/3.4.11/rdoc/erb_partial.rb +0 -18
  604. package/lib/ruby/3.4.11/rdoc/erbio.rb +0 -37
  605. package/lib/ruby/3.4.11/rdoc/generator/darkfish.rb +0 -812
  606. package/lib/ruby/3.4.11/rdoc/generator/json_index.rb +0 -284
  607. package/lib/ruby/3.4.11/rdoc/generator/markup.rb +0 -171
  608. package/lib/ruby/3.4.11/rdoc/generator/pot/message_extractor.rb +0 -68
  609. package/lib/ruby/3.4.11/rdoc/generator/pot/po.rb +0 -84
  610. package/lib/ruby/3.4.11/rdoc/generator/pot/po_entry.rb +0 -141
  611. package/lib/ruby/3.4.11/rdoc/generator/pot.rb +0 -94
  612. package/lib/ruby/3.4.11/rdoc/generator/ri.rb +0 -30
  613. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/.document +0 -0
  614. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_footer.rhtml +0 -5
  615. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_head.rhtml +0 -48
  616. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +0 -5
  617. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +0 -15
  618. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +0 -15
  619. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +0 -15
  620. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +0 -21
  621. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml +0 -11
  622. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +0 -32
  623. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +0 -6
  624. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_search.rhtml +0 -14
  625. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +0 -11
  626. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +0 -39
  627. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_toggle.rhtml +0 -3
  628. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/class.rhtml +0 -221
  629. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/css/fonts.css +0 -167
  630. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/css/rdoc.css +0 -683
  631. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf +0 -0
  632. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf +0 -0
  633. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf +0 -0
  634. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf +0 -0
  635. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf +0 -0
  636. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf +0 -0
  637. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/add.png +0 -0
  638. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/arrow_up.png +0 -0
  639. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/brick.png +0 -0
  640. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
  641. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bug.png +0 -0
  642. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
  643. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
  644. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
  645. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/date.png +0 -0
  646. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/delete.png +0 -0
  647. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/find.png +0 -0
  648. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
  649. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
  650. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/package.png +0 -0
  651. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/page_green.png +0 -0
  652. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
  653. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
  654. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/plugin.png +0 -0
  655. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/ruby.png +0 -0
  656. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/tag_blue.png +0 -0
  657. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
  658. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/transparent.png +0 -0
  659. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/wrench.png +0 -0
  660. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
  661. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/zoom.png +0 -0
  662. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/index.rhtml +0 -23
  663. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/js/darkfish.js +0 -120
  664. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/js/search.js +0 -110
  665. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/page.rhtml +0 -18
  666. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/servlet_not_found.rhtml +0 -20
  667. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/servlet_root.rhtml +0 -65
  668. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/table_of_contents.rhtml +0 -70
  669. package/lib/ruby/3.4.11/rdoc/generator/template/json_index/.document +0 -1
  670. package/lib/ruby/3.4.11/rdoc/generator/template/json_index/js/navigation.js +0 -105
  671. package/lib/ruby/3.4.11/rdoc/generator/template/json_index/js/searcher.js +0 -229
  672. package/lib/ruby/3.4.11/rdoc/generator.rb +0 -51
  673. package/lib/ruby/3.4.11/rdoc/i18n/locale.rb +0 -102
  674. package/lib/ruby/3.4.11/rdoc/i18n/text.rb +0 -126
  675. package/lib/ruby/3.4.11/rdoc/i18n.rb +0 -10
  676. package/lib/ruby/3.4.11/rdoc/known_classes.rb +0 -74
  677. package/lib/ruby/3.4.11/rdoc/markdown/.document +0 -1
  678. package/lib/ruby/3.4.11/rdoc/markdown/entities.rb +0 -2131
  679. package/lib/ruby/3.4.11/rdoc/markdown/literals.rb +0 -454
  680. package/lib/ruby/3.4.11/rdoc/markdown.rb +0 -16806
  681. package/lib/ruby/3.4.11/rdoc/markup/attr_changer.rb +0 -22
  682. package/lib/ruby/3.4.11/rdoc/markup/attr_span.rb +0 -35
  683. package/lib/ruby/3.4.11/rdoc/markup/attribute_manager.rb +0 -405
  684. package/lib/ruby/3.4.11/rdoc/markup/attributes.rb +0 -70
  685. package/lib/ruby/3.4.11/rdoc/markup/blank_line.rb +0 -27
  686. package/lib/ruby/3.4.11/rdoc/markup/block_quote.rb +0 -14
  687. package/lib/ruby/3.4.11/rdoc/markup/document.rb +0 -164
  688. package/lib/ruby/3.4.11/rdoc/markup/formatter.rb +0 -272
  689. package/lib/ruby/3.4.11/rdoc/markup/hard_break.rb +0 -31
  690. package/lib/ruby/3.4.11/rdoc/markup/heading.rb +0 -84
  691. package/lib/ruby/3.4.11/rdoc/markup/include.rb +0 -42
  692. package/lib/ruby/3.4.11/rdoc/markup/indented_paragraph.rb +0 -47
  693. package/lib/ruby/3.4.11/rdoc/markup/list.rb +0 -101
  694. package/lib/ruby/3.4.11/rdoc/markup/list_item.rb +0 -99
  695. package/lib/ruby/3.4.11/rdoc/markup/paragraph.rb +0 -28
  696. package/lib/ruby/3.4.11/rdoc/markup/parser.rb +0 -585
  697. package/lib/ruby/3.4.11/rdoc/markup/pre_process.rb +0 -318
  698. package/lib/ruby/3.4.11/rdoc/markup/raw.rb +0 -69
  699. package/lib/ruby/3.4.11/rdoc/markup/regexp_handling.rb +0 -40
  700. package/lib/ruby/3.4.11/rdoc/markup/rule.rb +0 -20
  701. package/lib/ruby/3.4.11/rdoc/markup/table.rb +0 -56
  702. package/lib/ruby/3.4.11/rdoc/markup/to_ansi.rb +0 -93
  703. package/lib/ruby/3.4.11/rdoc/markup/to_bs.rb +0 -102
  704. package/lib/ruby/3.4.11/rdoc/markup/to_html.rb +0 -462
  705. package/lib/ruby/3.4.11/rdoc/markup/to_html_crossref.rb +0 -226
  706. package/lib/ruby/3.4.11/rdoc/markup/to_html_snippet.rb +0 -287
  707. package/lib/ruby/3.4.11/rdoc/markup/to_joined_paragraph.rb +0 -46
  708. package/lib/ruby/3.4.11/rdoc/markup/to_label.rb +0 -74
  709. package/lib/ruby/3.4.11/rdoc/markup/to_markdown.rb +0 -191
  710. package/lib/ruby/3.4.11/rdoc/markup/to_rdoc.rb +0 -353
  711. package/lib/ruby/3.4.11/rdoc/markup/to_table_of_contents.rb +0 -88
  712. package/lib/ruby/3.4.11/rdoc/markup/to_test.rb +0 -69
  713. package/lib/ruby/3.4.11/rdoc/markup/to_tt_only.rb +0 -120
  714. package/lib/ruby/3.4.11/rdoc/markup/verbatim.rb +0 -83
  715. package/lib/ruby/3.4.11/rdoc/markup.rb +0 -240
  716. package/lib/ruby/3.4.11/rdoc/options.rb +0 -1416
  717. package/lib/ruby/3.4.11/rdoc/parser/c.rb +0 -1257
  718. package/lib/ruby/3.4.11/rdoc/parser/changelog.rb +0 -350
  719. package/lib/ruby/3.4.11/rdoc/parser/markdown.rb +0 -22
  720. package/lib/ruby/3.4.11/rdoc/parser/prism_ruby.rb +0 -1092
  721. package/lib/ruby/3.4.11/rdoc/parser/rd.rb +0 -22
  722. package/lib/ruby/3.4.11/rdoc/parser/ripper_state_lex.rb +0 -302
  723. package/lib/ruby/3.4.11/rdoc/parser/ruby.rb +0 -2378
  724. package/lib/ruby/3.4.11/rdoc/parser/ruby_tools.rb +0 -165
  725. package/lib/ruby/3.4.11/rdoc/parser/simple.rb +0 -61
  726. package/lib/ruby/3.4.11/rdoc/parser/text.rb +0 -11
  727. package/lib/ruby/3.4.11/rdoc/parser.rb +0 -297
  728. package/lib/ruby/3.4.11/rdoc/rd/.document +0 -1
  729. package/lib/ruby/3.4.11/rdoc/rd/block_parser.rb +0 -1706
  730. package/lib/ruby/3.4.11/rdoc/rd/inline.rb +0 -71
  731. package/lib/ruby/3.4.11/rdoc/rd/inline_parser.rb +0 -1854
  732. package/lib/ruby/3.4.11/rdoc/rd.rb +0 -99
  733. package/lib/ruby/3.4.11/rdoc/rdoc.gemspec +0 -68
  734. package/lib/ruby/3.4.11/rdoc/rdoc.rb +0 -551
  735. package/lib/ruby/3.4.11/rdoc/ri/driver.rb +0 -1566
  736. package/lib/ruby/3.4.11/rdoc/ri/formatter.rb +0 -6
  737. package/lib/ruby/3.4.11/rdoc/ri/paths.rb +0 -171
  738. package/lib/ruby/3.4.11/rdoc/ri/store.rb +0 -6
  739. package/lib/ruby/3.4.11/rdoc/ri/task.rb +0 -71
  740. package/lib/ruby/3.4.11/rdoc/ri.rb +0 -20
  741. package/lib/ruby/3.4.11/rdoc/rubygems_hook.rb +0 -327
  742. package/lib/ruby/3.4.11/rdoc/servlet.rb +0 -452
  743. package/lib/ruby/3.4.11/rdoc/stats/normal.rb +0 -58
  744. package/lib/ruby/3.4.11/rdoc/stats/quiet.rb +0 -59
  745. package/lib/ruby/3.4.11/rdoc/stats/verbose.rb +0 -44
  746. package/lib/ruby/3.4.11/rdoc/stats.rb +0 -461
  747. package/lib/ruby/3.4.11/rdoc/store.rb +0 -997
  748. package/lib/ruby/3.4.11/rdoc/task.rb +0 -354
  749. package/lib/ruby/3.4.11/rdoc/text.rb +0 -322
  750. package/lib/ruby/3.4.11/rdoc/token_stream.rb +0 -118
  751. package/lib/ruby/3.4.11/rdoc/tom_doc.rb +0 -257
  752. package/lib/ruby/3.4.11/rdoc/version.rb +0 -10
  753. package/lib/ruby/3.4.11/rdoc.rb +0 -211
  754. package/lib/ruby/3.4.11/readline.gemspec +0 -33
  755. package/lib/ruby/3.4.11/readline.rb +0 -7
  756. package/lib/ruby/3.4.11/reline/config.rb +0 -373
  757. package/lib/ruby/3.4.11/reline/face.rb +0 -199
  758. package/lib/ruby/3.4.11/reline/history.rb +0 -76
  759. package/lib/ruby/3.4.11/reline/io/ansi.rb +0 -325
  760. package/lib/ruby/3.4.11/reline/io/dumb.rb +0 -120
  761. package/lib/ruby/3.4.11/reline/io/windows.rb +0 -530
  762. package/lib/ruby/3.4.11/reline/io.rb +0 -55
  763. package/lib/ruby/3.4.11/reline/key_actor/base.rb +0 -37
  764. package/lib/ruby/3.4.11/reline/key_actor/composite.rb +0 -17
  765. package/lib/ruby/3.4.11/reline/key_actor/emacs.rb +0 -517
  766. package/lib/ruby/3.4.11/reline/key_actor/vi_command.rb +0 -518
  767. package/lib/ruby/3.4.11/reline/key_actor/vi_insert.rb +0 -517
  768. package/lib/ruby/3.4.11/reline/key_actor.rb +0 -8
  769. package/lib/ruby/3.4.11/reline/key_stroke.rb +0 -119
  770. package/lib/ruby/3.4.11/reline/kill_ring.rb +0 -125
  771. package/lib/ruby/3.4.11/reline/line_editor.rb +0 -2382
  772. package/lib/ruby/3.4.11/reline/reline.gemspec +0 -30
  773. package/lib/ruby/3.4.11/reline/unicode/east_asian_width.rb +0 -1267
  774. package/lib/ruby/3.4.11/reline/unicode.rb +0 -415
  775. package/lib/ruby/3.4.11/reline/version.rb +0 -3
  776. package/lib/ruby/3.4.11/reline.rb +0 -519
  777. package/lib/ruby/3.4.11/resolv.gemspec +0 -30
  778. package/lib/ruby/3.4.11/resolv.rb +0 -3587
  779. package/lib/ruby/3.4.11/ruby2_keywords.gemspec +0 -23
  780. package/lib/ruby/3.4.11/ruby_vm/rjit/.document +0 -1
  781. package/lib/ruby/3.4.11/ruby_vm/rjit/assembler.rb +0 -1160
  782. package/lib/ruby/3.4.11/ruby_vm/rjit/block.rb +0 -11
  783. package/lib/ruby/3.4.11/ruby_vm/rjit/branch_stub.rb +0 -24
  784. package/lib/ruby/3.4.11/ruby_vm/rjit/c_pointer.rb +0 -394
  785. package/lib/ruby/3.4.11/ruby_vm/rjit/c_type.rb +0 -99
  786. package/lib/ruby/3.4.11/ruby_vm/rjit/code_block.rb +0 -91
  787. package/lib/ruby/3.4.11/ruby_vm/rjit/compiler.rb +0 -518
  788. package/lib/ruby/3.4.11/ruby_vm/rjit/context.rb +0 -377
  789. package/lib/ruby/3.4.11/ruby_vm/rjit/entry_stub.rb +0 -7
  790. package/lib/ruby/3.4.11/ruby_vm/rjit/exit_compiler.rb +0 -164
  791. package/lib/ruby/3.4.11/ruby_vm/rjit/hooks.rb +0 -36
  792. package/lib/ruby/3.4.11/ruby_vm/rjit/insn_compiler.rb +0 -6046
  793. package/lib/ruby/3.4.11/ruby_vm/rjit/instruction.rb +0 -1326
  794. package/lib/ruby/3.4.11/ruby_vm/rjit/invariants.rb +0 -155
  795. package/lib/ruby/3.4.11/ruby_vm/rjit/jit_state.rb +0 -65
  796. package/lib/ruby/3.4.11/ruby_vm/rjit/stats.rb +0 -191
  797. package/lib/ruby/3.4.11/ruby_vm/rjit/type.rb +0 -221
  798. package/lib/ruby/3.4.11/rubygems/available_set.rb +0 -165
  799. package/lib/ruby/3.4.11/rubygems/basic_specification.rb +0 -383
  800. package/lib/ruby/3.4.11/rubygems/bundler_version_finder.rb +0 -77
  801. package/lib/ruby/3.4.11/rubygems/ci_detector.rb +0 -75
  802. package/lib/ruby/3.4.11/rubygems/command.rb +0 -664
  803. package/lib/ruby/3.4.11/rubygems/command_manager.rb +0 -255
  804. package/lib/ruby/3.4.11/rubygems/commands/build_command.rb +0 -127
  805. package/lib/ruby/3.4.11/rubygems/commands/cert_command.rb +0 -325
  806. package/lib/ruby/3.4.11/rubygems/commands/check_command.rb +0 -97
  807. package/lib/ruby/3.4.11/rubygems/commands/cleanup_command.rb +0 -178
  808. package/lib/ruby/3.4.11/rubygems/commands/contents_command.rb +0 -196
  809. package/lib/ruby/3.4.11/rubygems/commands/dependency_command.rb +0 -206
  810. package/lib/ruby/3.4.11/rubygems/commands/environment_command.rb +0 -181
  811. package/lib/ruby/3.4.11/rubygems/commands/exec_command.rb +0 -256
  812. package/lib/ruby/3.4.11/rubygems/commands/fetch_command.rb +0 -109
  813. package/lib/ruby/3.4.11/rubygems/commands/generate_index_command.rb +0 -51
  814. package/lib/ruby/3.4.11/rubygems/commands/help_command.rb +0 -375
  815. package/lib/ruby/3.4.11/rubygems/commands/info_command.rb +0 -38
  816. package/lib/ruby/3.4.11/rubygems/commands/install_command.rb +0 -269
  817. package/lib/ruby/3.4.11/rubygems/commands/list_command.rb +0 -42
  818. package/lib/ruby/3.4.11/rubygems/commands/lock_command.rb +0 -109
  819. package/lib/ruby/3.4.11/rubygems/commands/mirror_command.rb +0 -26
  820. package/lib/ruby/3.4.11/rubygems/commands/open_command.rb +0 -83
  821. package/lib/ruby/3.4.11/rubygems/commands/outdated_command.rb +0 -33
  822. package/lib/ruby/3.4.11/rubygems/commands/owner_command.rb +0 -124
  823. package/lib/ruby/3.4.11/rubygems/commands/pristine_command.rb +0 -217
  824. package/lib/ruby/3.4.11/rubygems/commands/push_command.rb +0 -135
  825. package/lib/ruby/3.4.11/rubygems/commands/query_command.rb +0 -43
  826. package/lib/ruby/3.4.11/rubygems/commands/rdoc_command.rb +0 -90
  827. package/lib/ruby/3.4.11/rubygems/commands/rebuild_command.rb +0 -262
  828. package/lib/ruby/3.4.11/rubygems/commands/search_command.rb +0 -41
  829. package/lib/ruby/3.4.11/rubygems/commands/server_command.rb +0 -26
  830. package/lib/ruby/3.4.11/rubygems/commands/setup_command.rb +0 -663
  831. package/lib/ruby/3.4.11/rubygems/commands/signin_command.rb +0 -34
  832. package/lib/ruby/3.4.11/rubygems/commands/signout_command.rb +0 -32
  833. package/lib/ruby/3.4.11/rubygems/commands/sources_command.rb +0 -227
  834. package/lib/ruby/3.4.11/rubygems/commands/specification_command.rb +0 -156
  835. package/lib/ruby/3.4.11/rubygems/commands/stale_command.rb +0 -40
  836. package/lib/ruby/3.4.11/rubygems/commands/uninstall_command.rb +0 -204
  837. package/lib/ruby/3.4.11/rubygems/commands/unpack_command.rb +0 -168
  838. package/lib/ruby/3.4.11/rubygems/commands/update_command.rb +0 -326
  839. package/lib/ruby/3.4.11/rubygems/commands/which_command.rb +0 -88
  840. package/lib/ruby/3.4.11/rubygems/commands/yank_command.rb +0 -99
  841. package/lib/ruby/3.4.11/rubygems/compatibility.rb +0 -41
  842. package/lib/ruby/3.4.11/rubygems/config_file.rb +0 -618
  843. package/lib/ruby/3.4.11/rubygems/core_ext/kernel_gem.rb +0 -68
  844. package/lib/ruby/3.4.11/rubygems/core_ext/kernel_require.rb +0 -149
  845. package/lib/ruby/3.4.11/rubygems/core_ext/kernel_warn.rb +0 -45
  846. package/lib/ruby/3.4.11/rubygems/core_ext/tcpsocket_init.rb +0 -54
  847. package/lib/ruby/3.4.11/rubygems/defaults.rb +0 -308
  848. package/lib/ruby/3.4.11/rubygems/dependency.rb +0 -348
  849. package/lib/ruby/3.4.11/rubygems/dependency_installer.rb +0 -335
  850. package/lib/ruby/3.4.11/rubygems/dependency_list.rb +0 -243
  851. package/lib/ruby/3.4.11/rubygems/deprecate.rb +0 -169
  852. package/lib/ruby/3.4.11/rubygems/doctor.rb +0 -132
  853. package/lib/ruby/3.4.11/rubygems/errors.rb +0 -177
  854. package/lib/ruby/3.4.11/rubygems/exceptions.rb +0 -293
  855. package/lib/ruby/3.4.11/rubygems/ext/build_error.rb +0 -9
  856. package/lib/ruby/3.4.11/rubygems/ext/builder.rb +0 -260
  857. package/lib/ruby/3.4.11/rubygems/ext/cargo_builder/link_flag_converter.rb +0 -27
  858. package/lib/ruby/3.4.11/rubygems/ext/cargo_builder.rb +0 -346
  859. package/lib/ruby/3.4.11/rubygems/ext/cmake_builder.rb +0 -21
  860. package/lib/ruby/3.4.11/rubygems/ext/configure_builder.rb +0 -26
  861. package/lib/ruby/3.4.11/rubygems/ext/ext_conf_builder.rb +0 -77
  862. package/lib/ruby/3.4.11/rubygems/ext/rake_builder.rb +0 -37
  863. package/lib/ruby/3.4.11/rubygems/ext.rb +0 -20
  864. package/lib/ruby/3.4.11/rubygems/gem_runner.rb +0 -89
  865. package/lib/ruby/3.4.11/rubygems/gemcutter_utilities/webauthn_listener/response.rb +0 -163
  866. package/lib/ruby/3.4.11/rubygems/gemcutter_utilities/webauthn_listener.rb +0 -105
  867. package/lib/ruby/3.4.11/rubygems/gemcutter_utilities/webauthn_poller.rb +0 -80
  868. package/lib/ruby/3.4.11/rubygems/gemcutter_utilities.rb +0 -397
  869. package/lib/ruby/3.4.11/rubygems/gemspec_helpers.rb +0 -19
  870. package/lib/ruby/3.4.11/rubygems/install_default_message.rb +0 -13
  871. package/lib/ruby/3.4.11/rubygems/install_message.rb +0 -13
  872. package/lib/ruby/3.4.11/rubygems/install_update_options.rb +0 -204
  873. package/lib/ruby/3.4.11/rubygems/installer.rb +0 -1031
  874. package/lib/ruby/3.4.11/rubygems/installer_uninstaller_utils.rb +0 -27
  875. package/lib/ruby/3.4.11/rubygems/local_remote_options.rb +0 -146
  876. package/lib/ruby/3.4.11/rubygems/name_tuple.rb +0 -119
  877. package/lib/ruby/3.4.11/rubygems/openssl.rb +0 -7
  878. package/lib/ruby/3.4.11/rubygems/package/digest_io.rb +0 -63
  879. package/lib/ruby/3.4.11/rubygems/package/file_source.rb +0 -32
  880. package/lib/ruby/3.4.11/rubygems/package/io_source.rb +0 -48
  881. package/lib/ruby/3.4.11/rubygems/package/old.rb +0 -169
  882. package/lib/ruby/3.4.11/rubygems/package/source.rb +0 -4
  883. package/lib/ruby/3.4.11/rubygems/package/tar_header.rb +0 -277
  884. package/lib/ruby/3.4.11/rubygems/package/tar_reader/entry.rb +0 -244
  885. package/lib/ruby/3.4.11/rubygems/package/tar_reader.rb +0 -101
  886. package/lib/ruby/3.4.11/rubygems/package/tar_writer.rb +0 -332
  887. package/lib/ruby/3.4.11/rubygems/package.rb +0 -742
  888. package/lib/ruby/3.4.11/rubygems/package_task.rb +0 -123
  889. package/lib/ruby/3.4.11/rubygems/path_support.rb +0 -85
  890. package/lib/ruby/3.4.11/rubygems/platform.rb +0 -269
  891. package/lib/ruby/3.4.11/rubygems/psych_tree.rb +0 -37
  892. package/lib/ruby/3.4.11/rubygems/query_utils.rb +0 -349
  893. package/lib/ruby/3.4.11/rubygems/rdoc.rb +0 -26
  894. package/lib/ruby/3.4.11/rubygems/remote_fetcher.rb +0 -341
  895. package/lib/ruby/3.4.11/rubygems/request/connection_pools.rb +0 -95
  896. package/lib/ruby/3.4.11/rubygems/request/http_pool.rb +0 -47
  897. package/lib/ruby/3.4.11/rubygems/request/https_pool.rb +0 -10
  898. package/lib/ruby/3.4.11/rubygems/request.rb +0 -298
  899. package/lib/ruby/3.4.11/rubygems/request_set/gem_dependency_api.rb +0 -841
  900. package/lib/ruby/3.4.11/rubygems/request_set/lockfile/parser.rb +0 -344
  901. package/lib/ruby/3.4.11/rubygems/request_set/lockfile/tokenizer.rb +0 -122
  902. package/lib/ruby/3.4.11/rubygems/request_set/lockfile.rb +0 -235
  903. package/lib/ruby/3.4.11/rubygems/request_set.rb +0 -468
  904. package/lib/ruby/3.4.11/rubygems/requirement.rb +0 -298
  905. package/lib/ruby/3.4.11/rubygems/resolver/activation_request.rb +0 -159
  906. package/lib/ruby/3.4.11/rubygems/resolver/api_set/gem_parser.rb +0 -21
  907. package/lib/ruby/3.4.11/rubygems/resolver/api_set.rb +0 -139
  908. package/lib/ruby/3.4.11/rubygems/resolver/api_specification.rb +0 -105
  909. package/lib/ruby/3.4.11/rubygems/resolver/best_set.rb +0 -49
  910. package/lib/ruby/3.4.11/rubygems/resolver/composed_set.rb +0 -65
  911. package/lib/ruby/3.4.11/rubygems/resolver/conflict.rb +0 -146
  912. package/lib/ruby/3.4.11/rubygems/resolver/current_set.rb +0 -12
  913. package/lib/ruby/3.4.11/rubygems/resolver/dependency_request.rb +0 -119
  914. package/lib/ruby/3.4.11/rubygems/resolver/git_set.rb +0 -120
  915. package/lib/ruby/3.4.11/rubygems/resolver/git_specification.rb +0 -57
  916. package/lib/ruby/3.4.11/rubygems/resolver/index_set.rb +0 -79
  917. package/lib/ruby/3.4.11/rubygems/resolver/index_specification.rb +0 -101
  918. package/lib/ruby/3.4.11/rubygems/resolver/installed_specification.rb +0 -57
  919. package/lib/ruby/3.4.11/rubygems/resolver/installer_set.rb +0 -271
  920. package/lib/ruby/3.4.11/rubygems/resolver/local_specification.rb +0 -40
  921. package/lib/ruby/3.4.11/rubygems/resolver/lock_set.rb +0 -81
  922. package/lib/ruby/3.4.11/rubygems/resolver/lock_specification.rb +0 -86
  923. package/lib/ruby/3.4.11/rubygems/resolver/requirement_list.rb +0 -82
  924. package/lib/ruby/3.4.11/rubygems/resolver/set.rb +0 -55
  925. package/lib/ruby/3.4.11/rubygems/resolver/source_set.rb +0 -47
  926. package/lib/ruby/3.4.11/rubygems/resolver/spec_specification.rb +0 -76
  927. package/lib/ruby/3.4.11/rubygems/resolver/specification.rb +0 -126
  928. package/lib/ruby/3.4.11/rubygems/resolver/stats.rb +0 -46
  929. package/lib/ruby/3.4.11/rubygems/resolver/vendor_set.rb +0 -86
  930. package/lib/ruby/3.4.11/rubygems/resolver/vendor_specification.rb +0 -23
  931. package/lib/ruby/3.4.11/rubygems/resolver.rb +0 -341
  932. package/lib/ruby/3.4.11/rubygems/s3_uri_signer.rb +0 -177
  933. package/lib/ruby/3.4.11/rubygems/safe_marshal/elements.rb +0 -146
  934. package/lib/ruby/3.4.11/rubygems/safe_marshal/reader.rb +0 -325
  935. package/lib/ruby/3.4.11/rubygems/safe_marshal/visitors/stream_printer.rb +0 -31
  936. package/lib/ruby/3.4.11/rubygems/safe_marshal/visitors/to_ruby.rb +0 -428
  937. package/lib/ruby/3.4.11/rubygems/safe_marshal/visitors/visitor.rb +0 -74
  938. package/lib/ruby/3.4.11/rubygems/safe_marshal.rb +0 -74
  939. package/lib/ruby/3.4.11/rubygems/safe_yaml.rb +0 -45
  940. package/lib/ruby/3.4.11/rubygems/security/policies.rb +0 -114
  941. package/lib/ruby/3.4.11/rubygems/security/policy.rb +0 -288
  942. package/lib/ruby/3.4.11/rubygems/security/signer.rb +0 -212
  943. package/lib/ruby/3.4.11/rubygems/security/trust_dir.rb +0 -117
  944. package/lib/ruby/3.4.11/rubygems/security.rb +0 -615
  945. package/lib/ruby/3.4.11/rubygems/security_option.rb +0 -43
  946. package/lib/ruby/3.4.11/rubygems/source/git.rb +0 -244
  947. package/lib/ruby/3.4.11/rubygems/source/installed.rb +0 -39
  948. package/lib/ruby/3.4.11/rubygems/source/local.rb +0 -131
  949. package/lib/ruby/3.4.11/rubygems/source/lock.rb +0 -49
  950. package/lib/ruby/3.4.11/rubygems/source/specific_file.rb +0 -73
  951. package/lib/ruby/3.4.11/rubygems/source/vendor.rb +0 -24
  952. package/lib/ruby/3.4.11/rubygems/source.rb +0 -247
  953. package/lib/ruby/3.4.11/rubygems/source_list.rb +0 -146
  954. package/lib/ruby/3.4.11/rubygems/spec_fetcher.rb +0 -290
  955. package/lib/ruby/3.4.11/rubygems/specification.rb +0 -2666
  956. package/lib/ruby/3.4.11/rubygems/specification_policy.rb +0 -558
  957. package/lib/ruby/3.4.11/rubygems/specification_record.rb +0 -212
  958. package/lib/ruby/3.4.11/rubygems/ssl_certs/.document +0 -1
  959. package/lib/ruby/3.4.11/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem +0 -21
  960. package/lib/ruby/3.4.11/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem +0 -21
  961. package/lib/ruby/3.4.11/rubygems/stub_specification.rb +0 -235
  962. package/lib/ruby/3.4.11/rubygems/target_rbconfig.rb +0 -50
  963. package/lib/ruby/3.4.11/rubygems/text.rb +0 -85
  964. package/lib/ruby/3.4.11/rubygems/uninstaller.rb +0 -429
  965. package/lib/ruby/3.4.11/rubygems/unknown_command_spell_checker.rb +0 -21
  966. package/lib/ruby/3.4.11/rubygems/update_suggestion.rb +0 -56
  967. package/lib/ruby/3.4.11/rubygems/uri.rb +0 -126
  968. package/lib/ruby/3.4.11/rubygems/uri_formatter.rb +0 -47
  969. package/lib/ruby/3.4.11/rubygems/user_interaction.rb +0 -650
  970. package/lib/ruby/3.4.11/rubygems/util/licenses.rb +0 -834
  971. package/lib/ruby/3.4.11/rubygems/util/list.rb +0 -40
  972. package/lib/ruby/3.4.11/rubygems/util.rb +0 -118
  973. package/lib/ruby/3.4.11/rubygems/validator.rb +0 -144
  974. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/.document +0 -1
  975. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
  976. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -88
  977. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
  978. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
  979. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
  980. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
  981. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
  982. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
  983. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
  984. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
  985. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -164
  986. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -255
  987. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/errors.rb +0 -149
  988. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
  989. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +0 -112
  990. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
  991. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/resolution.rb +0 -839
  992. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/resolver.rb +0 -46
  993. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/state.rb +0 -58
  994. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo.rb +0 -11
  995. package/lib/ruby/3.4.11/rubygems/vendor/net-http/.document +0 -1
  996. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/exceptions.rb +0 -34
  997. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/generic_request.rb +0 -414
  998. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/header.rb +0 -981
  999. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/proxy_delta.rb +0 -17
  1000. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/request.rb +0 -88
  1001. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/requests.rb +0 -430
  1002. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/response.rb +0 -738
  1003. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/responses.rb +0 -1174
  1004. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/status.rb +0 -84
  1005. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http.rb +0 -2580
  1006. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/https.rb +0 -23
  1007. package/lib/ruby/3.4.11/rubygems/vendor/net-protocol/.document +0 -1
  1008. package/lib/ruby/3.4.11/rubygems/vendor/net-protocol/lib/net/protocol.rb +0 -544
  1009. package/lib/ruby/3.4.11/rubygems/vendor/optparse/.document +0 -1
  1010. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optionparser.rb +0 -2
  1011. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/ac.rb +0 -70
  1012. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/date.rb +0 -18
  1013. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/kwargs.rb +0 -27
  1014. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/shellwords.rb +0 -7
  1015. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/time.rb +0 -11
  1016. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/uri.rb +0 -7
  1017. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/version.rb +0 -80
  1018. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse.rb +0 -2426
  1019. package/lib/ruby/3.4.11/rubygems/vendor/resolv/.document +0 -1
  1020. package/lib/ruby/3.4.11/rubygems/vendor/resolv/lib/resolv.rb +0 -3455
  1021. package/lib/ruby/3.4.11/rubygems/vendor/securerandom/.document +0 -1
  1022. package/lib/ruby/3.4.11/rubygems/vendor/securerandom/lib/securerandom.rb +0 -102
  1023. package/lib/ruby/3.4.11/rubygems/vendor/timeout/.document +0 -1
  1024. package/lib/ruby/3.4.11/rubygems/vendor/timeout/lib/timeout.rb +0 -198
  1025. package/lib/ruby/3.4.11/rubygems/vendor/tsort/.document +0 -1
  1026. package/lib/ruby/3.4.11/rubygems/vendor/tsort/lib/tsort.rb +0 -455
  1027. package/lib/ruby/3.4.11/rubygems/vendor/uri/.document +0 -1
  1028. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/common.rb +0 -880
  1029. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/file.rb +0 -100
  1030. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ftp.rb +0 -267
  1031. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/generic.rb +0 -1592
  1032. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/http.rb +0 -125
  1033. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/https.rb +0 -23
  1034. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ldap.rb +0 -261
  1035. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ldaps.rb +0 -22
  1036. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/mailto.rb +0 -293
  1037. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +0 -546
  1038. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb +0 -206
  1039. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/version.rb +0 -6
  1040. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ws.rb +0 -83
  1041. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/wss.rb +0 -23
  1042. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri.rb +0 -104
  1043. package/lib/ruby/3.4.11/rubygems/vendored_molinillo.rb +0 -3
  1044. package/lib/ruby/3.4.11/rubygems/vendored_net_http.rb +0 -5
  1045. package/lib/ruby/3.4.11/rubygems/vendored_optparse.rb +0 -3
  1046. package/lib/ruby/3.4.11/rubygems/vendored_securerandom.rb +0 -3
  1047. package/lib/ruby/3.4.11/rubygems/vendored_timeout.rb +0 -5
  1048. package/lib/ruby/3.4.11/rubygems/vendored_tsort.rb +0 -3
  1049. package/lib/ruby/3.4.11/rubygems/version.rb +0 -441
  1050. package/lib/ruby/3.4.11/rubygems/version_option.rb +0 -80
  1051. package/lib/ruby/3.4.11/rubygems/yaml_serializer.rb +0 -98
  1052. package/lib/ruby/3.4.11/rubygems.rb +0 -1417
  1053. package/lib/ruby/3.4.11/securerandom.gemspec +0 -34
  1054. package/lib/ruby/3.4.11/securerandom.rb +0 -102
  1055. package/lib/ruby/3.4.11/set/set.gemspec +0 -30
  1056. package/lib/ruby/3.4.11/set/sorted_set.rb +0 -6
  1057. package/lib/ruby/3.4.11/set.rb +0 -855
  1058. package/lib/ruby/3.4.11/shellwords.gemspec +0 -31
  1059. package/lib/ruby/3.4.11/shellwords.rb +0 -254
  1060. package/lib/ruby/3.4.11/singleton.gemspec +0 -30
  1061. package/lib/ruby/3.4.11/singleton.rb +0 -239
  1062. package/lib/ruby/3.4.11/syntax_suggest/api.rb +0 -233
  1063. package/lib/ruby/3.4.11/syntax_suggest/around_block_scan.rb +0 -232
  1064. package/lib/ruby/3.4.11/syntax_suggest/block_expand.rb +0 -165
  1065. package/lib/ruby/3.4.11/syntax_suggest/capture/before_after_keyword_ends.rb +0 -85
  1066. package/lib/ruby/3.4.11/syntax_suggest/capture/falling_indent_lines.rb +0 -71
  1067. package/lib/ruby/3.4.11/syntax_suggest/capture_code_context.rb +0 -245
  1068. package/lib/ruby/3.4.11/syntax_suggest/clean_document.rb +0 -306
  1069. package/lib/ruby/3.4.11/syntax_suggest/cli.rb +0 -130
  1070. package/lib/ruby/3.4.11/syntax_suggest/code_block.rb +0 -100
  1071. package/lib/ruby/3.4.11/syntax_suggest/code_frontier.rb +0 -178
  1072. package/lib/ruby/3.4.11/syntax_suggest/code_line.rb +0 -243
  1073. package/lib/ruby/3.4.11/syntax_suggest/code_search.rb +0 -139
  1074. package/lib/ruby/3.4.11/syntax_suggest/core_ext.rb +0 -96
  1075. package/lib/ruby/3.4.11/syntax_suggest/display_code_with_line_numbers.rb +0 -70
  1076. package/lib/ruby/3.4.11/syntax_suggest/display_invalid_blocks.rb +0 -83
  1077. package/lib/ruby/3.4.11/syntax_suggest/explain_syntax.rb +0 -117
  1078. package/lib/ruby/3.4.11/syntax_suggest/left_right_lex_count.rb +0 -168
  1079. package/lib/ruby/3.4.11/syntax_suggest/lex_all.rb +0 -74
  1080. package/lib/ruby/3.4.11/syntax_suggest/lex_value.rb +0 -70
  1081. package/lib/ruby/3.4.11/syntax_suggest/mini_stringio.rb +0 -30
  1082. package/lib/ruby/3.4.11/syntax_suggest/parse_blocks_from_indent_line.rb +0 -60
  1083. package/lib/ruby/3.4.11/syntax_suggest/pathname_from_message.rb +0 -59
  1084. package/lib/ruby/3.4.11/syntax_suggest/priority_engulf_queue.rb +0 -63
  1085. package/lib/ruby/3.4.11/syntax_suggest/priority_queue.rb +0 -105
  1086. package/lib/ruby/3.4.11/syntax_suggest/ripper_errors.rb +0 -39
  1087. package/lib/ruby/3.4.11/syntax_suggest/scan_history.rb +0 -134
  1088. package/lib/ruby/3.4.11/syntax_suggest/syntax_suggest.gemspec +0 -32
  1089. package/lib/ruby/3.4.11/syntax_suggest/unvisited_lines.rb +0 -36
  1090. package/lib/ruby/3.4.11/syntax_suggest/version.rb +0 -5
  1091. package/lib/ruby/3.4.11/syntax_suggest.rb +0 -3
  1092. package/lib/ruby/3.4.11/tempfile.gemspec +0 -33
  1093. package/lib/ruby/3.4.11/tempfile.rb +0 -640
  1094. package/lib/ruby/3.4.11/time.gemspec +0 -35
  1095. package/lib/ruby/3.4.11/time.rb +0 -731
  1096. package/lib/ruby/3.4.11/timeout.gemspec +0 -33
  1097. package/lib/ruby/3.4.11/timeout.rb +0 -200
  1098. package/lib/ruby/3.4.11/tmpdir.gemspec +0 -30
  1099. package/lib/ruby/3.4.11/tmpdir.rb +0 -189
  1100. package/lib/ruby/3.4.11/tsort.gemspec +0 -29
  1101. package/lib/ruby/3.4.11/tsort.rb +0 -455
  1102. package/lib/ruby/3.4.11/un.gemspec +0 -31
  1103. package/lib/ruby/3.4.11/un.rb +0 -441
  1104. package/lib/ruby/3.4.11/unicode_normalize/normalize.rb +0 -181
  1105. package/lib/ruby/3.4.11/unicode_normalize/tables.rb +0 -9259
  1106. package/lib/ruby/3.4.11/uri/common.rb +0 -880
  1107. package/lib/ruby/3.4.11/uri/file.rb +0 -100
  1108. package/lib/ruby/3.4.11/uri/ftp.rb +0 -267
  1109. package/lib/ruby/3.4.11/uri/generic.rb +0 -1592
  1110. package/lib/ruby/3.4.11/uri/http.rb +0 -125
  1111. package/lib/ruby/3.4.11/uri/https.rb +0 -23
  1112. package/lib/ruby/3.4.11/uri/ldap.rb +0 -261
  1113. package/lib/ruby/3.4.11/uri/ldaps.rb +0 -22
  1114. package/lib/ruby/3.4.11/uri/mailto.rb +0 -293
  1115. package/lib/ruby/3.4.11/uri/rfc2396_parser.rb +0 -546
  1116. package/lib/ruby/3.4.11/uri/rfc3986_parser.rb +0 -206
  1117. package/lib/ruby/3.4.11/uri/uri.gemspec +0 -42
  1118. package/lib/ruby/3.4.11/uri/version.rb +0 -6
  1119. package/lib/ruby/3.4.11/uri/ws.rb +0 -83
  1120. package/lib/ruby/3.4.11/uri/wss.rb +0 -23
  1121. package/lib/ruby/3.4.11/uri.rb +0 -104
  1122. package/lib/ruby/3.4.11/weakref.gemspec +0 -34
  1123. package/lib/ruby/3.4.11/weakref.rb +0 -58
  1124. package/lib/ruby/3.4.11/yaml/dbm.rb +0 -295
  1125. package/lib/ruby/3.4.11/yaml/store.rb +0 -98
  1126. package/lib/ruby/3.4.11/yaml/yaml.gemspec +0 -30
  1127. package/lib/ruby/3.4.11/yaml.rb +0 -70
@@ -1,3587 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'socket'
4
- require 'timeout'
5
- require 'io/wait'
6
- require 'securerandom'
7
- require 'rbconfig'
8
-
9
- # Resolv is a thread-aware DNS resolver library written in Ruby. Resolv can
10
- # handle multiple DNS requests concurrently without blocking the entire Ruby
11
- # interpreter.
12
- #
13
- # See also resolv-replace.rb to replace the libc resolver with Resolv.
14
- #
15
- # Resolv can look up various DNS resources using the DNS module directly.
16
- #
17
- # Examples:
18
- #
19
- # p Resolv.getaddress "www.ruby-lang.org"
20
- # p Resolv.getname "210.251.121.214"
21
- #
22
- # Resolv::DNS.open do |dns|
23
- # ress = dns.getresources "www.ruby-lang.org", Resolv::DNS::Resource::IN::A
24
- # p ress.map(&:address)
25
- # ress = dns.getresources "ruby-lang.org", Resolv::DNS::Resource::IN::MX
26
- # p ress.map { |r| [r.exchange.to_s, r.preference] }
27
- # end
28
- #
29
- #
30
- # == Bugs
31
- #
32
- # * NIS is not supported.
33
- # * /etc/nsswitch.conf is not supported.
34
-
35
- class Resolv
36
-
37
- # The version string
38
- VERSION = "0.7.2"
39
-
40
- ##
41
- # Looks up the first IP address for +name+.
42
-
43
- def self.getaddress(name)
44
- DefaultResolver.getaddress(name)
45
- end
46
-
47
- ##
48
- # Looks up all IP address for +name+.
49
-
50
- def self.getaddresses(name)
51
- DefaultResolver.getaddresses(name)
52
- end
53
-
54
- ##
55
- # Iterates over all IP addresses for +name+.
56
-
57
- def self.each_address(name, &block)
58
- DefaultResolver.each_address(name, &block)
59
- end
60
-
61
- ##
62
- # Looks up the hostname of +address+.
63
-
64
- def self.getname(address)
65
- DefaultResolver.getname(address)
66
- end
67
-
68
- ##
69
- # Looks up all hostnames for +address+.
70
-
71
- def self.getnames(address)
72
- DefaultResolver.getnames(address)
73
- end
74
-
75
- ##
76
- # Iterates over all hostnames for +address+.
77
-
78
- def self.each_name(address, &proc)
79
- DefaultResolver.each_name(address, &proc)
80
- end
81
-
82
- ##
83
- # Creates a new Resolv using +resolvers+.
84
- #
85
- # If +resolvers+ is not given, a hash, or +nil+, uses a Hosts resolver and
86
- # and a DNS resolver. If +resolvers+ is a hash, uses the hash as
87
- # configuration for the DNS resolver.
88
-
89
- def initialize(resolvers=(arg_not_set = true; nil), use_ipv6: (keyword_not_set = true; nil))
90
- if !keyword_not_set && !arg_not_set
91
- warn "Support for separate use_ipv6 keyword is deprecated, as it is ignored if an argument is provided. Do not provide a positional argument if using the use_ipv6 keyword argument.", uplevel: 1
92
- end
93
-
94
- @resolvers = case resolvers
95
- when Hash, nil
96
- [Hosts.new, DNS.new(DNS::Config.default_config_hash.merge(resolvers || {}))]
97
- else
98
- resolvers
99
- end
100
- end
101
-
102
- ##
103
- # Looks up the first IP address for +name+.
104
-
105
- def getaddress(name)
106
- each_address(name) {|address| return address}
107
- raise ResolvError.new("no address for #{name}")
108
- end
109
-
110
- ##
111
- # Looks up all IP address for +name+.
112
-
113
- def getaddresses(name)
114
- ret = []
115
- each_address(name) {|address| ret << address}
116
- return ret
117
- end
118
-
119
- ##
120
- # Iterates over all IP addresses for +name+.
121
-
122
- def each_address(name)
123
- if AddressRegex =~ name
124
- yield name
125
- return
126
- end
127
- yielded = false
128
- @resolvers.each {|r|
129
- r.each_address(name) {|address|
130
- yield address.to_s
131
- yielded = true
132
- }
133
- return if yielded
134
- }
135
- end
136
-
137
- ##
138
- # Looks up the hostname of +address+.
139
-
140
- def getname(address)
141
- each_name(address) {|name| return name}
142
- raise ResolvError.new("no name for #{address}")
143
- end
144
-
145
- ##
146
- # Looks up all hostnames for +address+.
147
-
148
- def getnames(address)
149
- ret = []
150
- each_name(address) {|name| ret << name}
151
- return ret
152
- end
153
-
154
- ##
155
- # Iterates over all hostnames for +address+.
156
-
157
- def each_name(address)
158
- yielded = false
159
- @resolvers.each {|r|
160
- r.each_name(address) {|name|
161
- yield name.to_s
162
- yielded = true
163
- }
164
- return if yielded
165
- }
166
- end
167
-
168
- ##
169
- # Indicates a failure to resolve a name or address.
170
-
171
- class ResolvError < StandardError; end
172
-
173
- ##
174
- # Indicates a timeout resolving a name or address.
175
-
176
- class ResolvTimeout < Timeout::Error; end
177
-
178
- ##
179
- # Resolv::Hosts is a hostname resolver that uses the system hosts file.
180
-
181
- class Hosts
182
- if /mswin|cygwin|mingw|bccwin/ =~ RUBY_PLATFORM || ::RbConfig::CONFIG['host_os'] =~ /mswin/
183
- begin
184
- require 'win32/resolv' unless defined?(Win32::Resolv)
185
- hosts = Win32::Resolv.get_hosts_path || IO::NULL
186
- rescue LoadError
187
- end
188
- end
189
- # The default file name for host names
190
- DefaultFileName = hosts || '/etc/hosts'
191
-
192
- ##
193
- # Creates a new Resolv::Hosts, using +filename+ for its data source.
194
-
195
- def initialize(filename = DefaultFileName)
196
- @filename = filename
197
- @mutex = Thread::Mutex.new
198
- @initialized = nil
199
- end
200
-
201
- def lazy_initialize # :nodoc:
202
- @mutex.synchronize {
203
- unless @initialized
204
- @name2addr = {}
205
- @addr2name = {}
206
- File.open(@filename, 'rb') {|f|
207
- f.each {|line|
208
- line.sub!(/#.*/, '')
209
- addr, *hostnames = line.split(/\s+/)
210
- next unless addr
211
- (@addr2name[addr] ||= []).concat(hostnames)
212
- hostnames.each {|hostname| (@name2addr[hostname] ||= []) << addr}
213
- }
214
- }
215
- @name2addr.each {|name, arr| arr.reverse!}
216
- @initialized = true
217
- end
218
- }
219
- self
220
- end
221
-
222
- ##
223
- # Gets the IP address of +name+ from the hosts file.
224
-
225
- def getaddress(name)
226
- each_address(name) {|address| return address}
227
- raise ResolvError.new("#{@filename} has no name: #{name}")
228
- end
229
-
230
- ##
231
- # Gets all IP addresses for +name+ from the hosts file.
232
-
233
- def getaddresses(name)
234
- ret = []
235
- each_address(name) {|address| ret << address}
236
- return ret
237
- end
238
-
239
- ##
240
- # Iterates over all IP addresses for +name+ retrieved from the hosts file.
241
-
242
- def each_address(name, &proc)
243
- lazy_initialize
244
- @name2addr[name]&.each(&proc)
245
- end
246
-
247
- ##
248
- # Gets the hostname of +address+ from the hosts file.
249
-
250
- def getname(address)
251
- each_name(address) {|name| return name}
252
- raise ResolvError.new("#{@filename} has no address: #{address}")
253
- end
254
-
255
- ##
256
- # Gets all hostnames for +address+ from the hosts file.
257
-
258
- def getnames(address)
259
- ret = []
260
- each_name(address) {|name| ret << name}
261
- return ret
262
- end
263
-
264
- ##
265
- # Iterates over all hostnames for +address+ retrieved from the hosts file.
266
-
267
- def each_name(address, &proc)
268
- lazy_initialize
269
- @addr2name[address]&.each(&proc)
270
- end
271
- end
272
-
273
- ##
274
- # Resolv::DNS is a DNS stub resolver.
275
- #
276
- # Information taken from the following places:
277
- #
278
- # * STD0013
279
- # * RFC 1035
280
- # * ftp://ftp.isi.edu/in-notes/iana/assignments/dns-parameters
281
- # * etc.
282
-
283
- class DNS
284
-
285
- ##
286
- # Default DNS Port
287
-
288
- Port = 53
289
-
290
- ##
291
- # Default DNS UDP packet size
292
-
293
- UDPSize = 512
294
-
295
- ##
296
- # Creates a new DNS resolver. See Resolv::DNS.new for argument details.
297
- #
298
- # Yields the created DNS resolver to the block, if given, otherwise
299
- # returns it.
300
-
301
- def self.open(*args)
302
- dns = new(*args)
303
- return dns unless block_given?
304
- begin
305
- yield dns
306
- ensure
307
- dns.close
308
- end
309
- end
310
-
311
- ##
312
- # Creates a new DNS resolver.
313
- #
314
- # +config_info+ can be:
315
- #
316
- # nil:: Uses /etc/resolv.conf.
317
- # String:: Path to a file using /etc/resolv.conf's format.
318
- # Hash:: Must contain :nameserver, :search and :ndots keys.
319
- # :nameserver_port can be used to specify port number of nameserver address.
320
- # :raise_timeout_errors can be used to raise timeout errors
321
- # as exceptions instead of treating the same as an NXDOMAIN response.
322
- #
323
- # The value of :nameserver should be an address string or
324
- # an array of address strings.
325
- # - :nameserver => '8.8.8.8'
326
- # - :nameserver => ['8.8.8.8', '8.8.4.4']
327
- #
328
- # The value of :nameserver_port should be an array of
329
- # pair of nameserver address and port number.
330
- # - :nameserver_port => [['8.8.8.8', 53], ['8.8.4.4', 53]]
331
- #
332
- # Example:
333
- #
334
- # Resolv::DNS.new(:nameserver => ['210.251.121.21'],
335
- # :search => ['ruby-lang.org'],
336
- # :ndots => 1)
337
-
338
- def initialize(config_info=nil)
339
- @mutex = Thread::Mutex.new
340
- @config = Config.new(config_info)
341
- @initialized = nil
342
- end
343
-
344
- # Sets the resolver timeouts. This may be a single positive number
345
- # or an array of positive numbers representing timeouts in seconds.
346
- # If an array is specified, a DNS request will retry and wait for
347
- # each successive interval in the array until a successful response
348
- # is received. Specifying +nil+ reverts to the default timeouts:
349
- # [ 5, second = 5 * 2 / nameserver_count, 2 * second, 4 * second ]
350
- #
351
- # Example:
352
- #
353
- # dns.timeouts = 3
354
- #
355
- def timeouts=(values)
356
- @config.timeouts = values
357
- end
358
-
359
- def lazy_initialize # :nodoc:
360
- @mutex.synchronize {
361
- unless @initialized
362
- @config.lazy_initialize
363
- @initialized = true
364
- end
365
- }
366
- self
367
- end
368
-
369
- ##
370
- # Closes the DNS resolver.
371
-
372
- def close
373
- @mutex.synchronize {
374
- if @initialized
375
- @initialized = false
376
- end
377
- }
378
- end
379
-
380
- ##
381
- # Gets the IP address of +name+ from the DNS resolver.
382
- #
383
- # +name+ can be a Resolv::DNS::Name or a String. Retrieved address will
384
- # be a Resolv::IPv4 or Resolv::IPv6
385
-
386
- def getaddress(name)
387
- each_address(name) {|address| return address}
388
- raise ResolvError.new("DNS result has no information for #{name}")
389
- end
390
-
391
- ##
392
- # Gets all IP addresses for +name+ from the DNS resolver.
393
- #
394
- # +name+ can be a Resolv::DNS::Name or a String. Retrieved addresses will
395
- # be a Resolv::IPv4 or Resolv::IPv6
396
-
397
- def getaddresses(name)
398
- ret = []
399
- each_address(name) {|address| ret << address}
400
- return ret
401
- end
402
-
403
- ##
404
- # Iterates over all IP addresses for +name+ retrieved from the DNS
405
- # resolver.
406
- #
407
- # +name+ can be a Resolv::DNS::Name or a String. Retrieved addresses will
408
- # be a Resolv::IPv4 or Resolv::IPv6
409
-
410
- def each_address(name)
411
- if use_ipv6?
412
- each_resource(name, Resource::IN::AAAA) {|resource| yield resource.address}
413
- end
414
- each_resource(name, Resource::IN::A) {|resource| yield resource.address}
415
- end
416
-
417
- def use_ipv6? # :nodoc:
418
- @config.lazy_initialize unless @config.instance_variable_get(:@initialized)
419
-
420
- use_ipv6 = @config.use_ipv6?
421
- unless use_ipv6.nil?
422
- return use_ipv6
423
- end
424
-
425
- begin
426
- list = Socket.ip_address_list
427
- rescue NotImplementedError
428
- return true
429
- end
430
- list.any? {|a| a.ipv6? && !a.ipv6_loopback? && !a.ipv6_linklocal? }
431
- end
432
- private :use_ipv6?
433
-
434
- ##
435
- # Gets the hostname for +address+ from the DNS resolver.
436
- #
437
- # +address+ must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved
438
- # name will be a Resolv::DNS::Name.
439
-
440
- def getname(address)
441
- each_name(address) {|name| return name}
442
- raise ResolvError.new("DNS result has no information for #{address}")
443
- end
444
-
445
- ##
446
- # Gets all hostnames for +address+ from the DNS resolver.
447
- #
448
- # +address+ must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved
449
- # names will be Resolv::DNS::Name instances.
450
-
451
- def getnames(address)
452
- ret = []
453
- each_name(address) {|name| ret << name}
454
- return ret
455
- end
456
-
457
- ##
458
- # Iterates over all hostnames for +address+ retrieved from the DNS
459
- # resolver.
460
- #
461
- # +address+ must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved
462
- # names will be Resolv::DNS::Name instances.
463
-
464
- def each_name(address)
465
- case address
466
- when Name
467
- ptr = address
468
- when IPv4, IPv6
469
- ptr = address.to_name
470
- when IPv4::Regex
471
- ptr = IPv4.create(address).to_name
472
- when IPv6::Regex
473
- ptr = IPv6.create(address).to_name
474
- else
475
- raise ResolvError.new("cannot interpret as address: #{address}")
476
- end
477
- each_resource(ptr, Resource::IN::PTR) {|resource| yield resource.name}
478
- end
479
-
480
- ##
481
- # Look up the +typeclass+ DNS resource of +name+.
482
- #
483
- # +name+ must be a Resolv::DNS::Name or a String.
484
- #
485
- # +typeclass+ should be one of the following:
486
- #
487
- # * Resolv::DNS::Resource::IN::A
488
- # * Resolv::DNS::Resource::IN::AAAA
489
- # * Resolv::DNS::Resource::IN::ANY
490
- # * Resolv::DNS::Resource::IN::CAA
491
- # * Resolv::DNS::Resource::IN::CNAME
492
- # * Resolv::DNS::Resource::IN::HINFO
493
- # * Resolv::DNS::Resource::IN::HTTPS
494
- # * Resolv::DNS::Resource::IN::LOC
495
- # * Resolv::DNS::Resource::IN::MINFO
496
- # * Resolv::DNS::Resource::IN::MX
497
- # * Resolv::DNS::Resource::IN::NS
498
- # * Resolv::DNS::Resource::IN::PTR
499
- # * Resolv::DNS::Resource::IN::SOA
500
- # * Resolv::DNS::Resource::IN::SRV
501
- # * Resolv::DNS::Resource::IN::SVCB
502
- # * Resolv::DNS::Resource::IN::TXT
503
- # * Resolv::DNS::Resource::IN::WKS
504
- #
505
- # Returned resource is represented as a Resolv::DNS::Resource instance,
506
- # i.e. Resolv::DNS::Resource::IN::A.
507
-
508
- def getresource(name, typeclass)
509
- each_resource(name, typeclass) {|resource| return resource}
510
- raise ResolvError.new("DNS result has no information for #{name}")
511
- end
512
-
513
- ##
514
- # Looks up all +typeclass+ DNS resources for +name+. See #getresource for
515
- # argument details.
516
-
517
- def getresources(name, typeclass)
518
- ret = []
519
- each_resource(name, typeclass) {|resource| ret << resource}
520
- return ret
521
- end
522
-
523
- ##
524
- # Iterates over all +typeclass+ DNS resources for +name+. See
525
- # #getresource for argument details.
526
-
527
- def each_resource(name, typeclass, &proc)
528
- fetch_resource(name, typeclass) {|reply, reply_name|
529
- extract_resources(reply, reply_name, typeclass, &proc)
530
- }
531
- end
532
-
533
- # :stopdoc:
534
-
535
- def fetch_resource(name, typeclass)
536
- lazy_initialize
537
- truncated = {}
538
- requesters = {}
539
- udp_requester = begin
540
- make_udp_requester
541
- rescue Errno::EACCES
542
- # fall back to TCP
543
- end
544
- senders = {}
545
-
546
- begin
547
- @config.resolv(name) do |candidate, tout, nameserver, port|
548
- msg = Message.new
549
- msg.rd = 1
550
- msg.add_question(candidate, typeclass)
551
-
552
- requester = requesters.fetch([nameserver, port]) do
553
- if !truncated[candidate] && udp_requester
554
- udp_requester
555
- else
556
- requesters[[nameserver, port]] = make_tcp_requester(nameserver, port)
557
- end
558
- end
559
-
560
- unless sender = senders[[candidate, requester, nameserver, port]]
561
- sender = requester.sender(msg, candidate, nameserver, port)
562
- next if !sender
563
- senders[[candidate, requester, nameserver, port]] = sender
564
- end
565
- reply, reply_name = requester.request(sender, tout)
566
- case reply.rcode
567
- when RCode::NoError
568
- if reply.tc == 1 and not Requester::TCP === requester
569
- # Retry via TCP:
570
- truncated[candidate] = true
571
- redo
572
- else
573
- yield(reply, reply_name)
574
- end
575
- return
576
- when RCode::NXDomain
577
- raise Config::NXDomain.new(reply_name.to_s)
578
- else
579
- raise Config::OtherResolvError.new(reply_name.to_s)
580
- end
581
- end
582
- ensure
583
- udp_requester&.close
584
- requesters.each_value { |requester| requester&.close }
585
- end
586
- end
587
-
588
- def make_udp_requester # :nodoc:
589
- nameserver_port = @config.nameserver_port
590
- if nameserver_port.length == 1
591
- Requester::ConnectedUDP.new(*nameserver_port[0])
592
- else
593
- Requester::UnconnectedUDP.new(*nameserver_port)
594
- end
595
- end
596
-
597
- def make_tcp_requester(host, port) # :nodoc:
598
- return Requester::TCP.new(host, port)
599
- rescue Errno::ECONNREFUSED
600
- # Treat a refused TCP connection attempt to a nameserver like a timeout,
601
- # as Resolv::DNS::Config#resolv considers ResolvTimeout exceptions as a
602
- # hint to try the next nameserver:
603
- raise ResolvTimeout
604
- end
605
-
606
- def extract_resources(msg, name, typeclass) # :nodoc:
607
- if typeclass < Resource::ANY
608
- n0 = Name.create(name)
609
- msg.each_resource {|n, ttl, data|
610
- yield data if n0 == n
611
- }
612
- end
613
- yielded = false
614
- n0 = Name.create(name)
615
- msg.each_resource {|n, ttl, data|
616
- if n0 == n
617
- case data
618
- when typeclass
619
- yield data
620
- yielded = true
621
- when Resource::CNAME
622
- n0 = data.name
623
- end
624
- end
625
- }
626
- return if yielded
627
- msg.each_resource {|n, ttl, data|
628
- if n0 == n
629
- case data
630
- when typeclass
631
- yield data
632
- end
633
- end
634
- }
635
- end
636
-
637
- def self.random(arg) # :nodoc:
638
- begin
639
- SecureRandom.random_number(arg)
640
- rescue NotImplementedError
641
- rand(arg)
642
- end
643
- end
644
-
645
- RequestID = {} # :nodoc:
646
- RequestIDMutex = Thread::Mutex.new # :nodoc:
647
-
648
- def self.allocate_request_id(host, port) # :nodoc:
649
- id = nil
650
- RequestIDMutex.synchronize {
651
- h = (RequestID[[host, port]] ||= {})
652
- begin
653
- id = random(0x0000..0xffff)
654
- end while h[id]
655
- h[id] = true
656
- }
657
- id
658
- end
659
-
660
- def self.free_request_id(host, port, id) # :nodoc:
661
- RequestIDMutex.synchronize {
662
- key = [host, port]
663
- if h = RequestID[key]
664
- h.delete id
665
- if h.empty?
666
- RequestID.delete key
667
- end
668
- end
669
- }
670
- end
671
-
672
- case RUBY_PLATFORM
673
- when *[
674
- # https://www.rfc-editor.org/rfc/rfc6056.txt
675
- # Appendix A. Survey of the Algorithms in Use by Some Popular Implementations
676
- /freebsd/, /linux/, /netbsd/, /openbsd/, /solaris/,
677
- /darwin/, # the same as FreeBSD
678
- ] then
679
- def self.bind_random_port(udpsock, bind_host="0.0.0.0") # :nodoc:
680
- udpsock.bind(bind_host, 0)
681
- end
682
- else
683
- # Sequential port assignment
684
- def self.bind_random_port(udpsock, bind_host="0.0.0.0") # :nodoc:
685
- # Ephemeral port number range recommended by RFC 6056
686
- port = random(1024..65535)
687
- udpsock.bind(bind_host, port)
688
- rescue Errno::EADDRINUSE, # POSIX
689
- Errno::EACCES, # SunOS: See PRIV_SYS_NFS in privileges(5)
690
- Errno::EPERM # FreeBSD: security.mac.portacl.port_high is configurable. See mac_portacl(4).
691
- retry
692
- end
693
- end
694
-
695
- class Requester # :nodoc:
696
- def initialize
697
- @senders = {}
698
- @socks = nil
699
- end
700
-
701
- def request(sender, tout)
702
- start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
703
- timelimit = start + tout
704
- begin
705
- sender.send
706
- rescue Errno::EHOSTUNREACH, # multi-homed IPv6 may generate this
707
- Errno::ENETUNREACH
708
- raise ResolvTimeout
709
- end
710
- while true
711
- before_select = Process.clock_gettime(Process::CLOCK_MONOTONIC)
712
- timeout = timelimit - before_select
713
- if timeout <= 0
714
- raise ResolvTimeout
715
- end
716
- if @socks.size == 1
717
- select_result = @socks[0].wait_readable(timeout) ? [ @socks ] : nil
718
- else
719
- select_result = IO.select(@socks, nil, nil, timeout)
720
- end
721
- if !select_result
722
- after_select = Process.clock_gettime(Process::CLOCK_MONOTONIC)
723
- next if after_select < timelimit
724
- raise ResolvTimeout
725
- end
726
- begin
727
- reply, from = recv_reply(select_result[0])
728
- rescue Errno::ECONNREFUSED, # GNU/Linux, FreeBSD
729
- Errno::ECONNRESET, # Windows
730
- EOFError
731
- # No name server running on the server?
732
- # Don't wait anymore.
733
- raise ResolvTimeout
734
- end
735
- begin
736
- msg = Message.decode(reply)
737
- rescue DecodeError
738
- next # broken DNS message ignored
739
- end
740
- if sender == sender_for(from, msg)
741
- break
742
- else
743
- # unexpected DNS message ignored
744
- end
745
- end
746
- return msg, sender.data
747
- end
748
-
749
- def sender_for(addr, msg)
750
- @senders[[addr,msg.id]]
751
- end
752
-
753
- def close
754
- socks = @socks
755
- @socks = nil
756
- socks&.each(&:close)
757
- end
758
-
759
- class Sender # :nodoc:
760
- def initialize(msg, data, sock)
761
- @msg = msg
762
- @data = data
763
- @sock = sock
764
- end
765
- end
766
-
767
- class UnconnectedUDP < Requester # :nodoc:
768
- def initialize(*nameserver_port)
769
- super()
770
- @nameserver_port = nameserver_port
771
- @initialized = false
772
- @mutex = Thread::Mutex.new
773
- end
774
-
775
- def lazy_initialize
776
- @mutex.synchronize {
777
- next if @initialized
778
- @initialized = true
779
- @socks_hash = {}
780
- @socks = []
781
- @nameserver_port.each {|host, port|
782
- if host.index(':')
783
- bind_host = "::"
784
- af = Socket::AF_INET6
785
- else
786
- bind_host = "0.0.0.0"
787
- af = Socket::AF_INET
788
- end
789
- next if @socks_hash[bind_host]
790
- begin
791
- sock = UDPSocket.new(af)
792
- rescue Errno::EAFNOSUPPORT, Errno::EPROTONOSUPPORT
793
- next # The kernel doesn't support the address family.
794
- end
795
- @socks << sock
796
- @socks_hash[bind_host] = sock
797
- sock.do_not_reverse_lookup = true
798
- DNS.bind_random_port(sock, bind_host)
799
- }
800
- }
801
- self
802
- end
803
-
804
- def recv_reply(readable_socks)
805
- lazy_initialize
806
- reply, from = readable_socks[0].recvfrom(UDPSize)
807
- return reply, [from[3],from[1]]
808
- end
809
-
810
- def sender(msg, data, host, port=Port)
811
- host = Addrinfo.ip(host).ip_address
812
- lazy_initialize
813
- sock = @socks_hash[host.index(':') ? "::" : "0.0.0.0"]
814
- return nil if !sock
815
- service = [host, port]
816
- id = DNS.allocate_request_id(host, port)
817
- request = msg.encode
818
- request[0,2] = [id].pack('n')
819
- return @senders[[service, id]] =
820
- Sender.new(request, data, sock, host, port)
821
- end
822
-
823
- def close
824
- @mutex.synchronize {
825
- if @initialized
826
- super
827
- @senders.each_key {|service, id|
828
- DNS.free_request_id(service[0], service[1], id)
829
- }
830
- @initialized = false
831
- end
832
- }
833
- end
834
-
835
- class Sender < Requester::Sender # :nodoc:
836
- def initialize(msg, data, sock, host, port)
837
- super(msg, data, sock)
838
- @host = host
839
- @port = port
840
- end
841
- attr_reader :data
842
-
843
- def send
844
- raise "@sock is nil." if @sock.nil?
845
- @sock.send(@msg, 0, @host, @port)
846
- end
847
- end
848
- end
849
-
850
- class ConnectedUDP < Requester # :nodoc:
851
- def initialize(host, port=Port)
852
- super()
853
- @host = host
854
- @port = port
855
- @mutex = Thread::Mutex.new
856
- @initialized = false
857
- end
858
-
859
- def lazy_initialize
860
- @mutex.synchronize {
861
- next if @initialized
862
- @initialized = true
863
- is_ipv6 = @host.index(':')
864
- sock = UDPSocket.new(is_ipv6 ? Socket::AF_INET6 : Socket::AF_INET)
865
- @socks = [sock]
866
- sock.do_not_reverse_lookup = true
867
- DNS.bind_random_port(sock, is_ipv6 ? "::" : "0.0.0.0")
868
- sock.connect(@host, @port)
869
- }
870
- self
871
- end
872
-
873
- def recv_reply(readable_socks)
874
- lazy_initialize
875
- reply = readable_socks[0].recv(UDPSize)
876
- return reply, nil
877
- end
878
-
879
- def sender(msg, data, host=@host, port=@port)
880
- lazy_initialize
881
- unless host == @host && port == @port
882
- raise RequestError.new("host/port don't match: #{host}:#{port}")
883
- end
884
- id = DNS.allocate_request_id(@host, @port)
885
- request = msg.encode
886
- request[0,2] = [id].pack('n')
887
- return @senders[[nil,id]] = Sender.new(request, data, @socks[0])
888
- end
889
-
890
- def close
891
- @mutex.synchronize do
892
- if @initialized
893
- super
894
- @senders.each_key {|from, id|
895
- DNS.free_request_id(@host, @port, id)
896
- }
897
- @initialized = false
898
- end
899
- end
900
- end
901
-
902
- class Sender < Requester::Sender # :nodoc:
903
- def send
904
- raise "@sock is nil." if @sock.nil?
905
- @sock.send(@msg, 0)
906
- end
907
- attr_reader :data
908
- end
909
- end
910
-
911
- class MDNSOneShot < UnconnectedUDP # :nodoc:
912
- def sender(msg, data, host, port=Port)
913
- lazy_initialize
914
- id = DNS.allocate_request_id(host, port)
915
- request = msg.encode
916
- request[0,2] = [id].pack('n')
917
- sock = @socks_hash[host.index(':') ? "::" : "0.0.0.0"]
918
- return @senders[id] =
919
- UnconnectedUDP::Sender.new(request, data, sock, host, port)
920
- end
921
-
922
- def sender_for(addr, msg)
923
- lazy_initialize
924
- @senders[msg.id]
925
- end
926
- end
927
-
928
- class TCP < Requester # :nodoc:
929
- def initialize(host, port=Port)
930
- super()
931
- @host = host
932
- @port = port
933
- sock = TCPSocket.new(@host, @port)
934
- @socks = [sock]
935
- @senders = {}
936
- end
937
-
938
- def recv_reply(readable_socks)
939
- len_data = readable_socks[0].read(2)
940
- raise EOFError if len_data.nil? || len_data.bytesize != 2
941
- len = len_data.unpack('n')[0]
942
- reply = @socks[0].read(len)
943
- raise EOFError if reply.nil? || reply.bytesize != len
944
- return reply, nil
945
- end
946
-
947
- def sender(msg, data, host=@host, port=@port)
948
- unless host == @host && port == @port
949
- raise RequestError.new("host/port don't match: #{host}:#{port}")
950
- end
951
- id = DNS.allocate_request_id(@host, @port)
952
- request = msg.encode
953
- request[0,2] = [request.length, id].pack('nn')
954
- return @senders[[nil,id]] = Sender.new(request, data, @socks[0])
955
- end
956
-
957
- class Sender < Requester::Sender # :nodoc:
958
- def send
959
- @sock.print(@msg)
960
- @sock.flush
961
- end
962
- attr_reader :data
963
- end
964
-
965
- def close
966
- super
967
- @senders.each_key {|from,id|
968
- DNS.free_request_id(@host, @port, id)
969
- }
970
- end
971
- end
972
-
973
- ##
974
- # Indicates a problem with the DNS request.
975
-
976
- class RequestError < StandardError
977
- end
978
- end
979
-
980
- class Config # :nodoc:
981
- def initialize(config_info=nil)
982
- @mutex = Thread::Mutex.new
983
- @config_info = config_info
984
- @initialized = nil
985
- @timeouts = nil
986
- end
987
-
988
- def timeouts=(values)
989
- if values
990
- values = Array(values)
991
- values.each do |t|
992
- Numeric === t or raise ArgumentError, "#{t.inspect} is not numeric"
993
- t > 0.0 or raise ArgumentError, "timeout=#{t} must be positive"
994
- end
995
- @timeouts = values
996
- else
997
- @timeouts = nil
998
- end
999
- end
1000
-
1001
- def Config.parse_resolv_conf(filename)
1002
- nameserver = []
1003
- search = nil
1004
- ndots = 1
1005
- File.open(filename, 'rb') {|f|
1006
- f.each {|line|
1007
- line.sub!(/[#;].*/, '')
1008
- keyword, *args = line.split(/\s+/)
1009
- next unless keyword
1010
- case keyword
1011
- when 'nameserver'
1012
- nameserver.concat(args.each(&:freeze))
1013
- when 'domain'
1014
- next if args.empty?
1015
- search = [args[0].freeze]
1016
- when 'search'
1017
- next if args.empty?
1018
- search = args.each(&:freeze)
1019
- when 'options'
1020
- args.each {|arg|
1021
- case arg
1022
- when /\Andots:(\d+)\z/
1023
- ndots = $1.to_i
1024
- end
1025
- }
1026
- end
1027
- }
1028
- }
1029
- return { :nameserver => nameserver.freeze, :search => search.freeze, :ndots => ndots.freeze }.freeze
1030
- end
1031
-
1032
- def Config.default_config_hash(filename="/etc/resolv.conf")
1033
- if File.exist? filename
1034
- Config.parse_resolv_conf(filename)
1035
- elsif defined?(Win32::Resolv)
1036
- search, nameserver = Win32::Resolv.get_resolv_info
1037
- config_hash = {}
1038
- config_hash[:nameserver] = nameserver if nameserver
1039
- config_hash[:search] = [search].flatten if search
1040
- config_hash
1041
- else
1042
- {}
1043
- end
1044
- end
1045
-
1046
- def lazy_initialize
1047
- @mutex.synchronize {
1048
- unless @initialized
1049
- @nameserver_port = []
1050
- @use_ipv6 = nil
1051
- @search = nil
1052
- @ndots = 1
1053
- case @config_info
1054
- when nil
1055
- config_hash = Config.default_config_hash
1056
- when String
1057
- config_hash = Config.parse_resolv_conf(@config_info)
1058
- when Hash
1059
- config_hash = @config_info.dup
1060
- if String === config_hash[:nameserver]
1061
- config_hash[:nameserver] = [config_hash[:nameserver]]
1062
- end
1063
- if String === config_hash[:search]
1064
- config_hash[:search] = [config_hash[:search]]
1065
- end
1066
- else
1067
- raise ArgumentError.new("invalid resolv configuration: #{@config_info.inspect}")
1068
- end
1069
- if config_hash.include? :nameserver
1070
- @nameserver_port = config_hash[:nameserver].map {|ns| [ns, Port] }
1071
- end
1072
- if config_hash.include? :nameserver_port
1073
- @nameserver_port = config_hash[:nameserver_port].map {|ns, port| [ns, (port || Port)] }
1074
- end
1075
- if config_hash.include? :use_ipv6
1076
- @use_ipv6 = config_hash[:use_ipv6]
1077
- end
1078
- @search = config_hash[:search] if config_hash.include? :search
1079
- @ndots = config_hash[:ndots] if config_hash.include? :ndots
1080
- @raise_timeout_errors = config_hash[:raise_timeout_errors]
1081
-
1082
- if @nameserver_port.empty?
1083
- @nameserver_port << ['0.0.0.0', Port]
1084
- end
1085
- if @search
1086
- @search = @search.map {|arg| Label.split(arg) }
1087
- else
1088
- hostname = Socket.gethostname
1089
- if /\./ =~ hostname
1090
- @search = [Label.split($')]
1091
- else
1092
- @search = [[]]
1093
- end
1094
- end
1095
-
1096
- if !@nameserver_port.kind_of?(Array) ||
1097
- @nameserver_port.any? {|ns_port|
1098
- !(Array === ns_port) ||
1099
- ns_port.length != 2
1100
- !(String === ns_port[0]) ||
1101
- !(Integer === ns_port[1])
1102
- }
1103
- raise ArgumentError.new("invalid nameserver config: #{@nameserver_port.inspect}")
1104
- end
1105
-
1106
- if !@search.kind_of?(Array) ||
1107
- !@search.all? {|ls| ls.all? {|l| Label::Str === l } }
1108
- raise ArgumentError.new("invalid search config: #{@search.inspect}")
1109
- end
1110
-
1111
- if !@ndots.kind_of?(Integer)
1112
- raise ArgumentError.new("invalid ndots config: #{@ndots.inspect}")
1113
- end
1114
-
1115
- @initialized = true
1116
- end
1117
- }
1118
- self
1119
- end
1120
-
1121
- def single?
1122
- lazy_initialize
1123
- if @nameserver_port.length == 1
1124
- return @nameserver_port[0]
1125
- else
1126
- return nil
1127
- end
1128
- end
1129
-
1130
- def nameserver_port
1131
- @nameserver_port
1132
- end
1133
-
1134
- def use_ipv6?
1135
- @use_ipv6
1136
- end
1137
-
1138
- def generate_candidates(name)
1139
- candidates = nil
1140
- name = Name.create(name)
1141
- if name.absolute?
1142
- candidates = [name]
1143
- else
1144
- if @ndots <= name.length - 1
1145
- candidates = [Name.new(name.to_a)]
1146
- else
1147
- candidates = []
1148
- end
1149
- candidates.concat(@search.map {|domain| Name.new(name.to_a + domain)})
1150
- fname = Name.create("#{name}.")
1151
- if !candidates.include?(fname)
1152
- candidates << fname
1153
- end
1154
- end
1155
- return candidates
1156
- end
1157
-
1158
- InitialTimeout = 5
1159
-
1160
- def generate_timeouts
1161
- ts = [InitialTimeout]
1162
- ts << ts[-1] * 2 / @nameserver_port.length
1163
- ts << ts[-1] * 2
1164
- ts << ts[-1] * 2
1165
- return ts
1166
- end
1167
-
1168
- def resolv(name)
1169
- candidates = generate_candidates(name)
1170
- timeouts = @timeouts || generate_timeouts
1171
- timeout_error = false
1172
- begin
1173
- candidates.each {|candidate|
1174
- begin
1175
- timeouts.each {|tout|
1176
- @nameserver_port.each {|nameserver, port|
1177
- begin
1178
- yield candidate, tout, nameserver, port
1179
- rescue ResolvTimeout
1180
- end
1181
- }
1182
- }
1183
- timeout_error = true
1184
- raise ResolvError.new("DNS resolv timeout: #{name}")
1185
- rescue NXDomain
1186
- end
1187
- }
1188
- rescue ResolvError
1189
- raise if @raise_timeout_errors && timeout_error
1190
- end
1191
- end
1192
-
1193
- ##
1194
- # Indicates no such domain was found.
1195
-
1196
- class NXDomain < ResolvError
1197
- end
1198
-
1199
- ##
1200
- # Indicates some other unhandled resolver error was encountered.
1201
-
1202
- class OtherResolvError < ResolvError
1203
- end
1204
- end
1205
-
1206
- module OpCode # :nodoc:
1207
- Query = 0
1208
- IQuery = 1
1209
- Status = 2
1210
- Notify = 4
1211
- Update = 5
1212
- end
1213
-
1214
- module RCode # :nodoc:
1215
- NoError = 0
1216
- FormErr = 1
1217
- ServFail = 2
1218
- NXDomain = 3
1219
- NotImp = 4
1220
- Refused = 5
1221
- YXDomain = 6
1222
- YXRRSet = 7
1223
- NXRRSet = 8
1224
- NotAuth = 9
1225
- NotZone = 10
1226
- BADVERS = 16
1227
- BADSIG = 16
1228
- BADKEY = 17
1229
- BADTIME = 18
1230
- BADMODE = 19
1231
- BADNAME = 20
1232
- BADALG = 21
1233
- end
1234
-
1235
- ##
1236
- # Indicates that the DNS response was unable to be decoded.
1237
-
1238
- class DecodeError < StandardError
1239
- end
1240
-
1241
- ##
1242
- # Indicates that the DNS request was unable to be encoded.
1243
-
1244
- class EncodeError < StandardError
1245
- end
1246
-
1247
- module Label # :nodoc:
1248
- def self.split(arg)
1249
- labels = []
1250
- arg.scan(/[^\.]+/) {labels << Str.new($&)}
1251
- return labels
1252
- end
1253
-
1254
- class Str # :nodoc:
1255
- def initialize(string)
1256
- # A label is limited to 63 octets. [RFC 1035 2.3.4] Checking it here
1257
- # makes it an invariant of the object: every label, however it was
1258
- # built, fits in its length octet and cannot wrap it. Callers turn
1259
- # this into the error their own contract promises.
1260
- if string.bytesize > 63
1261
- raise ArgumentError, "DNS label is too long (#{string.bytesize} bytes, max 63): #{string.inspect}"
1262
- end
1263
- @string = string
1264
- # case insensivity of DNS labels doesn't apply non-ASCII characters. [RFC 4343]
1265
- # This assumes @string is given in ASCII compatible encoding.
1266
- @downcase = string.b.downcase
1267
- end
1268
- attr_reader :string, :downcase
1269
-
1270
- def to_s
1271
- return @string
1272
- end
1273
-
1274
- def inspect
1275
- return "#<#{self.class} #{self}>"
1276
- end
1277
-
1278
- def ==(other)
1279
- return self.class == other.class && @downcase == other.downcase
1280
- end
1281
-
1282
- def eql?(other)
1283
- return self == other
1284
- end
1285
-
1286
- def hash
1287
- return @downcase.hash
1288
- end
1289
- end
1290
- end
1291
-
1292
- ##
1293
- # A representation of a DNS name.
1294
-
1295
- class Name
1296
-
1297
- ##
1298
- # Creates a new DNS name from +arg+. +arg+ can be:
1299
- #
1300
- # Name:: returns +arg+.
1301
- # String:: Creates a new Name.
1302
-
1303
- def self.create(arg)
1304
- case arg
1305
- when Name
1306
- return arg
1307
- when String
1308
- # A hostname is runtime data rather than a programming mistake, so
1309
- # both size limits surface as ResolvError to stay rescuable alongside
1310
- # the rest of name resolution. The type check below is a caller
1311
- # mistake and keeps raising ArgumentError.
1312
- begin
1313
- labels = Label.split(arg)
1314
- rescue ArgumentError => e
1315
- raise ResolvError.new(e.message)
1316
- end
1317
- # Label::Str enforces the per-label limit. Only the total is knowable
1318
- # here, and it counts the encoded form, so size starts at 1 for the
1319
- # root label's terminating zero octet. [RFC 1035 2.3.4, 3.1]
1320
- size = 1
1321
- labels.each do |label|
1322
- size += 1 + label.string.bytesize
1323
- if size > 255
1324
- raise ResolvError.new("DNS name is too long (#{size} octets, max 255): #{arg.inspect}")
1325
- end
1326
- end
1327
- return Name.new(labels, /\.\z/ =~ arg ? true : false)
1328
- else
1329
- raise ArgumentError.new("cannot interpret as DNS name: #{arg.inspect}")
1330
- end
1331
- end
1332
-
1333
- def initialize(labels, absolute=true) # :nodoc:
1334
- labels = labels.map {|label|
1335
- case label
1336
- when String then Label::Str.new(label)
1337
- when Label::Str then label
1338
- else
1339
- raise ArgumentError, "unexpected label: #{label.inspect}"
1340
- end
1341
- }
1342
- @labels = labels
1343
- @absolute = absolute
1344
- end
1345
-
1346
- def inspect # :nodoc:
1347
- "#<#{self.class}: #{self}#{@absolute ? '.' : ''}>"
1348
- end
1349
-
1350
- ##
1351
- # True if this name is absolute.
1352
-
1353
- def absolute?
1354
- return @absolute
1355
- end
1356
-
1357
- def ==(other) # :nodoc:
1358
- return false unless Name === other
1359
- return false unless @absolute == other.absolute?
1360
- return @labels == other.to_a
1361
- end
1362
-
1363
- alias eql? == # :nodoc:
1364
-
1365
- ##
1366
- # Returns true if +other+ is a subdomain.
1367
- #
1368
- # Example:
1369
- #
1370
- # domain = Resolv::DNS::Name.create("y.z")
1371
- # p Resolv::DNS::Name.create("w.x.y.z").subdomain_of?(domain) #=> true
1372
- # p Resolv::DNS::Name.create("x.y.z").subdomain_of?(domain) #=> true
1373
- # p Resolv::DNS::Name.create("y.z").subdomain_of?(domain) #=> false
1374
- # p Resolv::DNS::Name.create("z").subdomain_of?(domain) #=> false
1375
- # p Resolv::DNS::Name.create("x.y.z.").subdomain_of?(domain) #=> false
1376
- # p Resolv::DNS::Name.create("w.z").subdomain_of?(domain) #=> false
1377
- #
1378
-
1379
- def subdomain_of?(other)
1380
- raise ArgumentError, "not a domain name: #{other.inspect}" unless Name === other
1381
- return false if @absolute != other.absolute?
1382
- other_len = other.length
1383
- return false if @labels.length <= other_len
1384
- return @labels[-other_len, other_len] == other.to_a
1385
- end
1386
-
1387
- def hash # :nodoc:
1388
- return @labels.hash ^ @absolute.hash
1389
- end
1390
-
1391
- def to_a # :nodoc:
1392
- return @labels
1393
- end
1394
-
1395
- def length # :nodoc:
1396
- return @labels.length
1397
- end
1398
-
1399
- def [](i) # :nodoc:
1400
- return @labels[i]
1401
- end
1402
-
1403
- ##
1404
- # returns the domain name as a string.
1405
- #
1406
- # The domain name doesn't have a trailing dot even if the name object is
1407
- # absolute.
1408
- #
1409
- # Example:
1410
- #
1411
- # p Resolv::DNS::Name.create("x.y.z.").to_s #=> "x.y.z"
1412
- # p Resolv::DNS::Name.create("x.y.z").to_s #=> "x.y.z"
1413
-
1414
- def to_s
1415
- return @labels.join('.')
1416
- end
1417
- end
1418
-
1419
- class Message # :nodoc:
1420
- @@identifier = -1
1421
-
1422
- def initialize(id = (@@identifier += 1) & 0xffff)
1423
- @id = id
1424
- @qr = 0
1425
- @opcode = 0
1426
- @aa = 0
1427
- @tc = 0
1428
- @rd = 0 # recursion desired
1429
- @ra = 0 # recursion available
1430
- @rcode = 0
1431
- @question = []
1432
- @answer = []
1433
- @authority = []
1434
- @additional = []
1435
- end
1436
-
1437
- attr_accessor :id, :qr, :opcode, :aa, :tc, :rd, :ra, :rcode
1438
- attr_reader :question, :answer, :authority, :additional
1439
-
1440
- def ==(other)
1441
- return @id == other.id &&
1442
- @qr == other.qr &&
1443
- @opcode == other.opcode &&
1444
- @aa == other.aa &&
1445
- @tc == other.tc &&
1446
- @rd == other.rd &&
1447
- @ra == other.ra &&
1448
- @rcode == other.rcode &&
1449
- question_equal?(other.question) &&
1450
- @answer == other.answer &&
1451
- @authority == other.authority &&
1452
- @additional == other.additional
1453
- end
1454
-
1455
- # A question holds the resource class itself, and decoding creates a fresh
1456
- # class for each unknown type, so the classes cannot be compared by
1457
- # identity alone.
1458
- private def question_equal?(other_question) # :nodoc:
1459
- return false unless @question.length == other_question.length
1460
- @question.zip(other_question) {|(name, typeclass), (o_name, o_typeclass)|
1461
- return false unless name == o_name &&
1462
- Resource::Generic.type_class_equal?(typeclass, o_typeclass)
1463
- }
1464
- return true
1465
- end
1466
-
1467
- def add_question(name, typeclass)
1468
- @question << [Name.create(name), typeclass]
1469
- end
1470
-
1471
- def each_question
1472
- @question.each {|name, typeclass|
1473
- yield name, typeclass
1474
- }
1475
- end
1476
-
1477
- def add_answer(name, ttl, data)
1478
- @answer << [Name.create(name), ttl, data]
1479
- end
1480
-
1481
- def each_answer
1482
- @answer.each {|name, ttl, data|
1483
- yield name, ttl, data
1484
- }
1485
- end
1486
-
1487
- def add_authority(name, ttl, data)
1488
- @authority << [Name.create(name), ttl, data]
1489
- end
1490
-
1491
- def each_authority
1492
- @authority.each {|name, ttl, data|
1493
- yield name, ttl, data
1494
- }
1495
- end
1496
-
1497
- def add_additional(name, ttl, data)
1498
- @additional << [Name.create(name), ttl, data]
1499
- end
1500
-
1501
- def each_additional
1502
- @additional.each {|name, ttl, data|
1503
- yield name, ttl, data
1504
- }
1505
- end
1506
-
1507
- def each_resource
1508
- each_answer {|name, ttl, data| yield name, ttl, data}
1509
- each_authority {|name, ttl, data| yield name, ttl, data}
1510
- each_additional {|name, ttl, data| yield name, ttl, data}
1511
- end
1512
-
1513
- def encode
1514
- return MessageEncoder.new {|msg|
1515
- msg.put_pack('nnnnnn',
1516
- @id,
1517
- (@qr & 1) << 15 |
1518
- (@opcode & 15) << 11 |
1519
- (@aa & 1) << 10 |
1520
- (@tc & 1) << 9 |
1521
- (@rd & 1) << 8 |
1522
- (@ra & 1) << 7 |
1523
- (@rcode & 15),
1524
- @question.length,
1525
- @answer.length,
1526
- @authority.length,
1527
- @additional.length)
1528
- @question.each {|q|
1529
- name, typeclass = q
1530
- msg.put_name(name)
1531
- msg.put_pack('nn', typeclass::TypeValue, typeclass::ClassValue)
1532
- }
1533
- [@answer, @authority, @additional].each {|rr|
1534
- rr.each {|r|
1535
- name, ttl, data = r
1536
- msg.put_name(name)
1537
- msg.put_pack('nnN', data.class::TypeValue, data.class::ClassValue, ttl)
1538
- msg.put_length16 {data.encode_rdata(msg)}
1539
- }
1540
- }
1541
- }.to_s
1542
- end
1543
-
1544
- class MessageEncoder # :nodoc:
1545
- def initialize
1546
- @data = ''.dup
1547
- @names = {}
1548
- yield self
1549
- end
1550
-
1551
- def to_s
1552
- return @data
1553
- end
1554
-
1555
- def put_bytes(d)
1556
- @data << d
1557
- end
1558
-
1559
- def put_pack(template, *d)
1560
- @data << d.pack(template)
1561
- end
1562
-
1563
- def put_length16
1564
- length_index = @data.length
1565
- @data << "\0\0"
1566
- data_start = @data.length
1567
- yield
1568
- data_end = @data.length
1569
- @data[length_index, 2] = [data_end - data_start].pack("n")
1570
- end
1571
-
1572
- def put_string(d)
1573
- s = d.to_s
1574
- # A character-string is prefixed by a single length octet, so it can
1575
- # hold at most 255 octets. [RFC 1035 3.3] Reject anything longer to
1576
- # avoid silently truncating the length to its low 8 bits (mod 256).
1577
- if s.bytesize > 255
1578
- raise ArgumentError, "character-string is too long (#{s.bytesize} bytes, max 255): #{s.inspect}"
1579
- end
1580
- self.put_pack("C", s.bytesize)
1581
- @data << s
1582
- end
1583
-
1584
- def put_string_list(ds)
1585
- ds.each {|d|
1586
- self.put_string(d)
1587
- }
1588
- end
1589
-
1590
- def put_name(d, compress: true)
1591
- put_labels(d.to_a, compress: compress)
1592
- end
1593
-
1594
- def put_labels(d, compress: true)
1595
- d.each_index {|i|
1596
- domain = d[i..-1]
1597
- if compress && idx = @names[domain]
1598
- self.put_pack("n", 0xc000 | idx)
1599
- return
1600
- else
1601
- if @data.length < 0x4000
1602
- @names[domain] = @data.length
1603
- end
1604
- self.put_label(d[i])
1605
- end
1606
- }
1607
- @data << "\0"
1608
- end
1609
-
1610
- def put_label(d)
1611
- s = d.to_s
1612
- # Label::Str applies this limit when a label is built, so what is left
1613
- # for here is a raw string handed straight to put_labels. The two ways
1614
- # an over-long label goes wrong differ: 64 to 255 octets write a length
1615
- # octet in the reserved or compression pointer range, and 256 or more
1616
- # wrap it mod 256. Either way the encoded name stops being the name the
1617
- # caller asked for. [RFC 1035 2.3.4, 4.1.4]
1618
- if s.bytesize > 63
1619
- raise ArgumentError, "DNS label is too long (#{s.bytesize} bytes, max 63): #{s.inspect}"
1620
- end
1621
- self.put_string(s)
1622
- end
1623
- end
1624
-
1625
- def Message.decode(m)
1626
- o = Message.new(0)
1627
- MessageDecoder.new(m) {|msg|
1628
- id, flag, qdcount, ancount, nscount, arcount =
1629
- msg.get_unpack('nnnnnn')
1630
- o.id = id
1631
- o.tc = (flag >> 9) & 1
1632
- o.rcode = flag & 15
1633
- return o unless o.tc.zero?
1634
-
1635
- o.qr = (flag >> 15) & 1
1636
- o.opcode = (flag >> 11) & 15
1637
- o.aa = (flag >> 10) & 1
1638
- o.rd = (flag >> 8) & 1
1639
- o.ra = (flag >> 7) & 1
1640
- (1..qdcount).each {
1641
- name, typeclass = msg.get_question
1642
- o.add_question(name, typeclass)
1643
- }
1644
- (1..ancount).each {
1645
- name, ttl, data = msg.get_rr
1646
- o.add_answer(name, ttl, data)
1647
- }
1648
- (1..nscount).each {
1649
- name, ttl, data = msg.get_rr
1650
- o.add_authority(name, ttl, data)
1651
- }
1652
- (1..arcount).each {
1653
- name, ttl, data = msg.get_rr
1654
- o.add_additional(name, ttl, data)
1655
- }
1656
- }
1657
- return o
1658
- end
1659
-
1660
- class MessageDecoder # :nodoc:
1661
- def initialize(data)
1662
- @data = data
1663
- @index = 0
1664
- @limit = data.bytesize
1665
- yield self
1666
- end
1667
-
1668
- def inspect
1669
- "\#<#{self.class}: #{@data.byteslice(0, @index).inspect} #{@data.byteslice(@index..-1).inspect}>"
1670
- end
1671
-
1672
- def get_length16
1673
- len, = self.get_unpack('n')
1674
- save_limit = @limit
1675
- @limit = @index + len
1676
- d = yield(len)
1677
- if @index < @limit
1678
- raise DecodeError.new("junk exists")
1679
- elsif @limit < @index
1680
- raise DecodeError.new("limit exceeded")
1681
- end
1682
- @limit = save_limit
1683
- return d
1684
- end
1685
-
1686
- def get_bytes(len = @limit - @index)
1687
- raise DecodeError.new("limit exceeded") if @limit < @index + len
1688
- d = @data.byteslice(@index, len)
1689
- @index += len
1690
- return d
1691
- end
1692
-
1693
- def get_unpack(template)
1694
- len = 0
1695
- template.each_byte {|byte|
1696
- byte = "%c" % byte
1697
- case byte
1698
- when ?c, ?C
1699
- len += 1
1700
- when ?n
1701
- len += 2
1702
- when ?N
1703
- len += 4
1704
- else
1705
- raise StandardError.new("unsupported template: '#{byte.chr}' in '#{template}'")
1706
- end
1707
- }
1708
- raise DecodeError.new("limit exceeded") if @limit < @index + len
1709
- arr = @data.unpack("@#{@index}#{template}")
1710
- @index += len
1711
- return arr
1712
- end
1713
-
1714
- def get_string
1715
- raise DecodeError.new("limit exceeded") if @limit <= @index
1716
- len = @data.getbyte(@index)
1717
- raise DecodeError.new("limit exceeded") if @limit < @index + 1 + len
1718
- d = @data.byteslice(@index + 1, len)
1719
- @index += 1 + len
1720
- return d
1721
- end
1722
-
1723
- def get_string_list
1724
- strings = []
1725
- while @index < @limit
1726
- strings << self.get_string
1727
- end
1728
- strings
1729
- end
1730
-
1731
- def get_list
1732
- [].tap do |values|
1733
- while @index < @limit
1734
- values << yield
1735
- end
1736
- end
1737
- end
1738
-
1739
- def get_name
1740
- return Name.new(self.get_labels)
1741
- end
1742
-
1743
- def get_labels
1744
- prev_index = @index
1745
- save_index = nil
1746
- d = []
1747
- # size counts the encoded form, so it starts at 1 for the root
1748
- # label's terminating zero octet. [RFC 1035 3.1]
1749
- size = 1
1750
- while true
1751
- raise DecodeError.new("limit exceeded") if @limit <= @index
1752
- case @data.getbyte(@index)
1753
- when 0
1754
- @index += 1
1755
- if save_index
1756
- @index = save_index
1757
- end
1758
- return d
1759
- when 192..255
1760
- idx = self.get_unpack('n')[0] & 0x3fff
1761
- if prev_index <= idx
1762
- raise DecodeError.new("non-backward name pointer")
1763
- end
1764
- prev_index = idx
1765
- if !save_index
1766
- save_index = @index
1767
- end
1768
- @index = idx
1769
- else
1770
- l = self.get_label
1771
- d << l
1772
- size += 1 + l.string.bytesize
1773
- raise DecodeError.new("name label data exceed 255 octets") if size > 255
1774
- end
1775
- end
1776
- end
1777
-
1778
- def get_label
1779
- return Label::Str.new(self.get_string)
1780
- rescue ArgumentError => e
1781
- # A length octet of 64..191 is reserved rather than a label length,
1782
- # but this decoder used to read it as one. [RFC 1035 4.1.4] Report it
1783
- # the way the rest of a malformed message is reported.
1784
- raise DecodeError.new(e.message)
1785
- end
1786
-
1787
- def get_question
1788
- name = self.get_name
1789
- type, klass = self.get_unpack("nn")
1790
- return name, Resource.get_class(type, klass)
1791
- end
1792
-
1793
- def get_rr
1794
- name = self.get_name
1795
- type, klass, ttl = self.get_unpack('nnN')
1796
- typeclass = Resource.get_class(type, klass)
1797
- res = self.get_length16 do
1798
- begin
1799
- typeclass.decode_rdata self
1800
- rescue => e
1801
- raise DecodeError, e.message, e.backtrace
1802
- end
1803
- end
1804
- res.instance_variable_set :@ttl, ttl
1805
- return name, ttl, res
1806
- end
1807
- end
1808
- end
1809
-
1810
- ##
1811
- # SvcParams for service binding RRs. [RFC9460]
1812
-
1813
- class SvcParams
1814
- include Enumerable
1815
-
1816
- ##
1817
- # Create a list of SvcParams with the given initial content.
1818
- #
1819
- # +params+ has to be an enumerable of +SvcParam+s.
1820
- # If its content has +SvcParam+s with the duplicate key,
1821
- # the one appears last takes precedence.
1822
-
1823
- def initialize(params = [])
1824
- @params = {}
1825
-
1826
- params.each do |param|
1827
- add param
1828
- end
1829
- end
1830
-
1831
- ##
1832
- # Get SvcParam for the given +key+ in this list.
1833
-
1834
- def [](key)
1835
- @params[canonical_key(key)]
1836
- end
1837
-
1838
- ##
1839
- # Get the number of SvcParams in this list.
1840
-
1841
- def count
1842
- @params.count
1843
- end
1844
-
1845
- ##
1846
- # Get whether this list is empty.
1847
-
1848
- def empty?
1849
- @params.empty?
1850
- end
1851
-
1852
- ##
1853
- # Add the SvcParam +param+ to this list, overwriting the existing one with the same key.
1854
-
1855
- def add(param)
1856
- @params[param.class.key_number] = param
1857
- end
1858
-
1859
- ##
1860
- # Remove the +SvcParam+ with the given +key+ and return it.
1861
-
1862
- def delete(key)
1863
- @params.delete(canonical_key(key))
1864
- end
1865
-
1866
- ##
1867
- # Enumerate the +SvcParam+s in this list.
1868
-
1869
- def each(&block)
1870
- return enum_for(:each) unless block
1871
- @params.each_value(&block)
1872
- end
1873
-
1874
- def encode(msg) # :nodoc:
1875
- @params.keys.sort.each do |key|
1876
- msg.put_pack('n', key)
1877
- msg.put_length16 do
1878
- @params.fetch(key).encode(msg)
1879
- end
1880
- end
1881
- end
1882
-
1883
- def self.decode(msg) # :nodoc:
1884
- params = msg.get_list do
1885
- key, = msg.get_unpack('n')
1886
- msg.get_length16 do
1887
- SvcParam::ClassHash[key].decode(msg)
1888
- end
1889
- end
1890
-
1891
- return self.new(params)
1892
- end
1893
-
1894
- private
1895
-
1896
- def canonical_key(key) # :nodoc:
1897
- case key
1898
- when Integer
1899
- key
1900
- when /\Akey(\d+)\z/
1901
- Integer($1)
1902
- when Symbol
1903
- SvcParam::ClassHash[key].key_number
1904
- else
1905
- raise TypeError, 'key must be either String or Symbol'
1906
- end
1907
- end
1908
- end
1909
-
1910
- ##
1911
- # Base class for SvcParam. [RFC9460]
1912
-
1913
- class SvcParam
1914
-
1915
- ##
1916
- # Get the presentation name of the SvcParamKey.
1917
-
1918
- def self.key_name
1919
- const_get(:KeyName)
1920
- end
1921
-
1922
- ##
1923
- # Get the registered number of the SvcParamKey.
1924
-
1925
- def self.key_number
1926
- const_get(:KeyNumber)
1927
- end
1928
-
1929
- ClassHash = Hash.new do |h, key| # :nodoc:
1930
- case key
1931
- when Integer
1932
- Generic.create(key)
1933
- when /\Akey(?<key>\d+)\z/
1934
- Generic.create(key.to_int)
1935
- when Symbol
1936
- raise KeyError, "unknown key #{key}"
1937
- else
1938
- raise TypeError, 'key must be either String or Symbol'
1939
- end
1940
- end
1941
-
1942
- ##
1943
- # Generic SvcParam abstract class.
1944
-
1945
- class Generic < SvcParam
1946
-
1947
- ##
1948
- # SvcParamValue in wire-format byte string.
1949
-
1950
- attr_reader :value
1951
-
1952
- ##
1953
- # Create generic SvcParam
1954
-
1955
- def initialize(value)
1956
- @value = value
1957
- end
1958
-
1959
- def encode(msg) # :nodoc:
1960
- msg.put_bytes(@value)
1961
- end
1962
-
1963
- def self.decode(msg) # :nodoc:
1964
- return self.new(msg.get_bytes)
1965
- end
1966
-
1967
- def self.create(key_number)
1968
- c = Class.new(Generic)
1969
- key_name = :"key#{key_number}"
1970
- c.const_set(:KeyName, key_name)
1971
- c.const_set(:KeyNumber, key_number)
1972
- # Not registered in a constant or in ClassHash. ClassHash creates a
1973
- # class for every unknown SvcParamKey, so registering them
1974
- # permanently would let a malicious response exhaust memory.
1975
- return c
1976
- end
1977
- end
1978
-
1979
- ##
1980
- # "mandatory" SvcParam -- Mandatory keys in service binding RR
1981
-
1982
- class Mandatory < SvcParam
1983
- KeyName = :mandatory
1984
- KeyNumber = 0
1985
- ClassHash[KeyName] = ClassHash[KeyNumber] = self # :nodoc:
1986
-
1987
- ##
1988
- # Mandatory keys.
1989
-
1990
- attr_reader :keys
1991
-
1992
- ##
1993
- # Initialize "mandatory" ScvParam.
1994
-
1995
- def initialize(keys)
1996
- @keys = keys.map(&:to_int)
1997
- end
1998
-
1999
- def encode(msg) # :nodoc:
2000
- @keys.sort.each do |key|
2001
- msg.put_pack('n', key)
2002
- end
2003
- end
2004
-
2005
- def self.decode(msg) # :nodoc:
2006
- keys = msg.get_list { msg.get_unpack('n')[0] }
2007
- return self.new(keys)
2008
- end
2009
- end
2010
-
2011
- ##
2012
- # "alpn" SvcParam -- Additional supported protocols
2013
-
2014
- class ALPN < SvcParam
2015
- KeyName = :alpn
2016
- KeyNumber = 1
2017
- ClassHash[KeyName] = ClassHash[KeyNumber] = self # :nodoc:
2018
-
2019
- ##
2020
- # Supported protocol IDs.
2021
-
2022
- attr_reader :protocol_ids
2023
-
2024
- ##
2025
- # Initialize "alpn" ScvParam.
2026
-
2027
- def initialize(protocol_ids)
2028
- @protocol_ids = protocol_ids.map(&:to_str)
2029
- end
2030
-
2031
- def encode(msg) # :nodoc:
2032
- msg.put_string_list(@protocol_ids)
2033
- end
2034
-
2035
- def self.decode(msg) # :nodoc:
2036
- return self.new(msg.get_string_list)
2037
- end
2038
- end
2039
-
2040
- ##
2041
- # "no-default-alpn" SvcParam -- No support for default protocol
2042
-
2043
- class NoDefaultALPN < SvcParam
2044
- KeyName = :'no-default-alpn'
2045
- KeyNumber = 2
2046
- ClassHash[KeyName] = ClassHash[KeyNumber] = self # :nodoc:
2047
-
2048
- def encode(msg) # :nodoc:
2049
- # no payload
2050
- end
2051
-
2052
- def self.decode(msg) # :nodoc:
2053
- return self.new
2054
- end
2055
- end
2056
-
2057
- ##
2058
- # "port" SvcParam -- Port for alternative endpoint
2059
-
2060
- class Port < SvcParam
2061
- KeyName = :port
2062
- KeyNumber = 3
2063
- ClassHash[KeyName] = ClassHash[KeyNumber] = self # :nodoc:
2064
-
2065
- ##
2066
- # Port number.
2067
-
2068
- attr_reader :port
2069
-
2070
- ##
2071
- # Initialize "port" ScvParam.
2072
-
2073
- def initialize(port)
2074
- @port = port.to_int
2075
- end
2076
-
2077
- def encode(msg) # :nodoc:
2078
- msg.put_pack('n', @port)
2079
- end
2080
-
2081
- def self.decode(msg) # :nodoc:
2082
- port, = msg.get_unpack('n')
2083
- return self.new(port)
2084
- end
2085
- end
2086
-
2087
- ##
2088
- # "ipv4hint" SvcParam -- IPv4 address hints
2089
-
2090
- class IPv4Hint < SvcParam
2091
- KeyName = :ipv4hint
2092
- KeyNumber = 4
2093
- ClassHash[KeyName] = ClassHash[KeyNumber] = self # :nodoc:
2094
-
2095
- ##
2096
- # Set of IPv4 addresses.
2097
-
2098
- attr_reader :addresses
2099
-
2100
- ##
2101
- # Initialize "ipv4hint" ScvParam.
2102
-
2103
- def initialize(addresses)
2104
- @addresses = addresses.map {|address| IPv4.create(address) }
2105
- end
2106
-
2107
- def encode(msg) # :nodoc:
2108
- @addresses.each do |address|
2109
- msg.put_bytes(address.address)
2110
- end
2111
- end
2112
-
2113
- def self.decode(msg) # :nodoc:
2114
- addresses = msg.get_list { IPv4.new(msg.get_bytes(4)) }
2115
- return self.new(addresses)
2116
- end
2117
- end
2118
-
2119
- ##
2120
- # "ipv6hint" SvcParam -- IPv6 address hints
2121
-
2122
- class IPv6Hint < SvcParam
2123
- KeyName = :ipv6hint
2124
- KeyNumber = 6
2125
- ClassHash[KeyName] = ClassHash[KeyNumber] = self # :nodoc:
2126
-
2127
- ##
2128
- # Set of IPv6 addresses.
2129
-
2130
- attr_reader :addresses
2131
-
2132
- ##
2133
- # Initialize "ipv6hint" ScvParam.
2134
-
2135
- def initialize(addresses)
2136
- @addresses = addresses.map {|address| IPv6.create(address) }
2137
- end
2138
-
2139
- def encode(msg) # :nodoc:
2140
- @addresses.each do |address|
2141
- msg.put_bytes(address.address)
2142
- end
2143
- end
2144
-
2145
- def self.decode(msg) # :nodoc:
2146
- addresses = msg.get_list { IPv6.new(msg.get_bytes(16)) }
2147
- return self.new(addresses)
2148
- end
2149
- end
2150
-
2151
- ##
2152
- # "dohpath" SvcParam -- DNS over HTTPS path template [RFC9461]
2153
-
2154
- class DoHPath < SvcParam
2155
- KeyName = :dohpath
2156
- KeyNumber = 7
2157
- ClassHash[KeyName] = ClassHash[KeyNumber] = self # :nodoc:
2158
-
2159
- ##
2160
- # URI template for DoH queries.
2161
-
2162
- attr_reader :template
2163
-
2164
- ##
2165
- # Initialize "dohpath" ScvParam.
2166
-
2167
- def initialize(template)
2168
- @template = template.encode('utf-8')
2169
- end
2170
-
2171
- def encode(msg) # :nodoc:
2172
- msg.put_bytes(@template)
2173
- end
2174
-
2175
- def self.decode(msg) # :nodoc:
2176
- template = msg.get_bytes.force_encoding('utf-8')
2177
- return self.new(template)
2178
- end
2179
- end
2180
- end
2181
-
2182
- ##
2183
- # A DNS query abstract class.
2184
-
2185
- class Query
2186
- def encode_rdata(msg) # :nodoc:
2187
- raise EncodeError.new("#{self.class} is query.")
2188
- end
2189
-
2190
- def self.decode_rdata(msg) # :nodoc:
2191
- raise DecodeError.new("#{self.class} is query.")
2192
- end
2193
- end
2194
-
2195
- ##
2196
- # A DNS resource abstract class.
2197
-
2198
- class Resource < Query
2199
-
2200
- ##
2201
- # Remaining Time To Live for this Resource.
2202
-
2203
- attr_reader :ttl
2204
-
2205
- ClassHash = Module.new do
2206
- module_function
2207
-
2208
- def []=(type_class_value, klass)
2209
- type_value, class_value = type_class_value
2210
- Resource.const_set(:"Type#{type_value}_Class#{class_value}", klass)
2211
- end
2212
- end
2213
-
2214
- def encode_rdata(msg) # :nodoc:
2215
- raise NotImplementedError.new
2216
- end
2217
-
2218
- def self.decode_rdata(msg) # :nodoc:
2219
- raise NotImplementedError.new
2220
- end
2221
-
2222
- def ==(other) # :nodoc:
2223
- return false unless self.class == other.class
2224
- s_ivars = self.instance_variables
2225
- s_ivars.sort!
2226
- s_ivars.delete :@ttl
2227
- o_ivars = other.instance_variables
2228
- o_ivars.sort!
2229
- o_ivars.delete :@ttl
2230
- return s_ivars == o_ivars &&
2231
- s_ivars.collect {|name| self.instance_variable_get name} ==
2232
- o_ivars.collect {|name| other.instance_variable_get name}
2233
- end
2234
-
2235
- def eql?(other) # :nodoc:
2236
- return self == other
2237
- end
2238
-
2239
- def hash # :nodoc:
2240
- h = 0
2241
- vars = self.instance_variables
2242
- vars.delete :@ttl
2243
- vars.each {|name|
2244
- h ^= self.instance_variable_get(name).hash
2245
- }
2246
- return h
2247
- end
2248
-
2249
- def self.get_class(type_value, class_value) # :nodoc:
2250
- cache = :"Type#{type_value}_Class#{class_value}"
2251
-
2252
- return (const_defined?(cache) && const_get(cache)) ||
2253
- Generic.create(type_value, class_value)
2254
- end
2255
-
2256
- ##
2257
- # A generic resource abstract class.
2258
-
2259
- class Generic < Resource
2260
-
2261
- ##
2262
- # Creates a new generic resource.
2263
-
2264
- def initialize(data)
2265
- @data = data
2266
- end
2267
-
2268
- ##
2269
- # Data for this generic resource.
2270
-
2271
- attr_reader :data
2272
-
2273
- def encode_rdata(msg) # :nodoc:
2274
- msg.put_bytes(data)
2275
- end
2276
-
2277
- def self.decode_rdata(msg) # :nodoc:
2278
- return self.new(msg.get_bytes)
2279
- end
2280
-
2281
- # create makes a fresh class for each decoded resource, so the type and
2282
- # class values have to be compared instead of the class itself.
2283
- def self.type_class_equal?(klass, other) # :nodoc:
2284
- return true if klass.equal?(other)
2285
- Generic > klass && Generic > other &&
2286
- klass::TypeValue == other::TypeValue &&
2287
- klass::ClassValue == other::ClassValue
2288
- end
2289
-
2290
- def ==(other) # :nodoc:
2291
- return other.is_a?(Generic) &&
2292
- Generic.type_class_equal?(self.class, other.class) &&
2293
- @data == other.data
2294
- end
2295
-
2296
- def self.create(type_value, class_value) # :nodoc:
2297
- c = Class.new(Generic)
2298
- c.const_set(:TypeValue, type_value)
2299
- c.const_set(:ClassValue, class_value)
2300
- # Not registered in a constant or in ClassHash. get_class creates a
2301
- # class for every unknown (type, class) pair, so registering them
2302
- # permanently would let a malicious response exhaust memory.
2303
- return c
2304
- end
2305
- end
2306
-
2307
- ##
2308
- # Domain Name resource abstract class.
2309
-
2310
- class DomainName < Resource
2311
-
2312
- ##
2313
- # Creates a new DomainName from +name+.
2314
-
2315
- def initialize(name)
2316
- @name = name
2317
- end
2318
-
2319
- ##
2320
- # The name of this DomainName.
2321
-
2322
- attr_reader :name
2323
-
2324
- def encode_rdata(msg) # :nodoc:
2325
- msg.put_name(@name)
2326
- end
2327
-
2328
- def self.decode_rdata(msg) # :nodoc:
2329
- return self.new(msg.get_name)
2330
- end
2331
- end
2332
-
2333
- # Standard (class generic) RRs
2334
-
2335
- ClassValue = nil # :nodoc:
2336
-
2337
- ##
2338
- # An authoritative name server.
2339
-
2340
- class NS < DomainName
2341
- TypeValue = 2 # :nodoc:
2342
- end
2343
-
2344
- ##
2345
- # The canonical name for an alias.
2346
-
2347
- class CNAME < DomainName
2348
- TypeValue = 5 # :nodoc:
2349
- end
2350
-
2351
- ##
2352
- # Start Of Authority resource.
2353
-
2354
- class SOA < Resource
2355
-
2356
- TypeValue = 6 # :nodoc:
2357
-
2358
- ##
2359
- # Creates a new SOA record. See the attr documentation for the
2360
- # details of each argument.
2361
-
2362
- def initialize(mname, rname, serial, refresh, retry_, expire, minimum)
2363
- @mname = mname
2364
- @rname = rname
2365
- @serial = serial
2366
- @refresh = refresh
2367
- @retry = retry_
2368
- @expire = expire
2369
- @minimum = minimum
2370
- end
2371
-
2372
- ##
2373
- # Name of the host where the master zone file for this zone resides.
2374
-
2375
- attr_reader :mname
2376
-
2377
- ##
2378
- # The person responsible for this domain name.
2379
-
2380
- attr_reader :rname
2381
-
2382
- ##
2383
- # The version number of the zone file.
2384
-
2385
- attr_reader :serial
2386
-
2387
- ##
2388
- # How often, in seconds, a secondary name server is to check for
2389
- # updates from the primary name server.
2390
-
2391
- attr_reader :refresh
2392
-
2393
- ##
2394
- # How often, in seconds, a secondary name server is to retry after a
2395
- # failure to check for a refresh.
2396
-
2397
- attr_reader :retry
2398
-
2399
- ##
2400
- # Time in seconds that a secondary name server is to use the data
2401
- # before refreshing from the primary name server.
2402
-
2403
- attr_reader :expire
2404
-
2405
- ##
2406
- # The minimum number of seconds to be used for TTL values in RRs.
2407
-
2408
- attr_reader :minimum
2409
-
2410
- def encode_rdata(msg) # :nodoc:
2411
- msg.put_name(@mname)
2412
- msg.put_name(@rname)
2413
- msg.put_pack('NNNNN', @serial, @refresh, @retry, @expire, @minimum)
2414
- end
2415
-
2416
- def self.decode_rdata(msg) # :nodoc:
2417
- mname = msg.get_name
2418
- rname = msg.get_name
2419
- serial, refresh, retry_, expire, minimum = msg.get_unpack('NNNNN')
2420
- return self.new(
2421
- mname, rname, serial, refresh, retry_, expire, minimum)
2422
- end
2423
- end
2424
-
2425
- ##
2426
- # A Pointer to another DNS name.
2427
-
2428
- class PTR < DomainName
2429
- TypeValue = 12 # :nodoc:
2430
- end
2431
-
2432
- ##
2433
- # Host Information resource.
2434
-
2435
- class HINFO < Resource
2436
-
2437
- TypeValue = 13 # :nodoc:
2438
-
2439
- ##
2440
- # Creates a new HINFO running +os+ on +cpu+.
2441
-
2442
- def initialize(cpu, os)
2443
- @cpu = cpu
2444
- @os = os
2445
- end
2446
-
2447
- ##
2448
- # CPU architecture for this resource.
2449
-
2450
- attr_reader :cpu
2451
-
2452
- ##
2453
- # Operating system for this resource.
2454
-
2455
- attr_reader :os
2456
-
2457
- def encode_rdata(msg) # :nodoc:
2458
- msg.put_string(@cpu)
2459
- msg.put_string(@os)
2460
- end
2461
-
2462
- def self.decode_rdata(msg) # :nodoc:
2463
- cpu = msg.get_string
2464
- os = msg.get_string
2465
- return self.new(cpu, os)
2466
- end
2467
- end
2468
-
2469
- ##
2470
- # Mailing list or mailbox information.
2471
-
2472
- class MINFO < Resource
2473
-
2474
- TypeValue = 14 # :nodoc:
2475
-
2476
- def initialize(rmailbx, emailbx)
2477
- @rmailbx = rmailbx
2478
- @emailbx = emailbx
2479
- end
2480
-
2481
- ##
2482
- # Domain name responsible for this mail list or mailbox.
2483
-
2484
- attr_reader :rmailbx
2485
-
2486
- ##
2487
- # Mailbox to use for error messages related to the mail list or mailbox.
2488
-
2489
- attr_reader :emailbx
2490
-
2491
- def encode_rdata(msg) # :nodoc:
2492
- msg.put_name(@rmailbx)
2493
- msg.put_name(@emailbx)
2494
- end
2495
-
2496
- def self.decode_rdata(msg) # :nodoc:
2497
- rmailbx = msg.get_string
2498
- emailbx = msg.get_string
2499
- return self.new(rmailbx, emailbx)
2500
- end
2501
- end
2502
-
2503
- ##
2504
- # Mail Exchanger resource.
2505
-
2506
- class MX < Resource
2507
-
2508
- TypeValue= 15 # :nodoc:
2509
-
2510
- ##
2511
- # Creates a new MX record with +preference+, accepting mail at
2512
- # +exchange+.
2513
-
2514
- def initialize(preference, exchange)
2515
- @preference = preference
2516
- @exchange = exchange
2517
- end
2518
-
2519
- ##
2520
- # The preference for this MX.
2521
-
2522
- attr_reader :preference
2523
-
2524
- ##
2525
- # The host of this MX.
2526
-
2527
- attr_reader :exchange
2528
-
2529
- def encode_rdata(msg) # :nodoc:
2530
- msg.put_pack('n', @preference)
2531
- msg.put_name(@exchange)
2532
- end
2533
-
2534
- def self.decode_rdata(msg) # :nodoc:
2535
- preference, = msg.get_unpack('n')
2536
- exchange = msg.get_name
2537
- return self.new(preference, exchange)
2538
- end
2539
- end
2540
-
2541
- ##
2542
- # Unstructured text resource.
2543
-
2544
- class TXT < Resource
2545
-
2546
- TypeValue = 16 # :nodoc:
2547
-
2548
- def initialize(first_string, *rest_strings)
2549
- @strings = [first_string, *rest_strings]
2550
- end
2551
-
2552
- ##
2553
- # Returns an Array of Strings for this TXT record.
2554
-
2555
- attr_reader :strings
2556
-
2557
- ##
2558
- # Returns the concatenated string from +strings+.
2559
-
2560
- def data
2561
- @strings.join("")
2562
- end
2563
-
2564
- def encode_rdata(msg) # :nodoc:
2565
- msg.put_string_list(@strings)
2566
- end
2567
-
2568
- def self.decode_rdata(msg) # :nodoc:
2569
- strings = msg.get_string_list
2570
- return self.new(*strings)
2571
- end
2572
- end
2573
-
2574
- ##
2575
- # Location resource
2576
-
2577
- class LOC < Resource
2578
-
2579
- TypeValue = 29 # :nodoc:
2580
-
2581
- def initialize(version, ssize, hprecision, vprecision, latitude, longitude, altitude)
2582
- @version = version
2583
- @ssize = Resolv::LOC::Size.create(ssize)
2584
- @hprecision = Resolv::LOC::Size.create(hprecision)
2585
- @vprecision = Resolv::LOC::Size.create(vprecision)
2586
- @latitude = Resolv::LOC::Coord.create(latitude)
2587
- @longitude = Resolv::LOC::Coord.create(longitude)
2588
- @altitude = Resolv::LOC::Alt.create(altitude)
2589
- end
2590
-
2591
- ##
2592
- # Returns the version value for this LOC record which should always be 00
2593
-
2594
- attr_reader :version
2595
-
2596
- ##
2597
- # The spherical size of this LOC
2598
- # in meters using scientific notation as 2 integers of XeY
2599
-
2600
- attr_reader :ssize
2601
-
2602
- ##
2603
- # The horizontal precision using ssize type values
2604
- # in meters using scientific notation as 2 integers of XeY
2605
- # for precision use value/2 e.g. 2m = +/-1m
2606
-
2607
- attr_reader :hprecision
2608
-
2609
- ##
2610
- # The vertical precision using ssize type values
2611
- # in meters using scientific notation as 2 integers of XeY
2612
- # for precision use value/2 e.g. 2m = +/-1m
2613
-
2614
- attr_reader :vprecision
2615
-
2616
- ##
2617
- # The latitude for this LOC where 2**31 is the equator
2618
- # in thousandths of an arc second as an unsigned 32bit integer
2619
-
2620
- attr_reader :latitude
2621
-
2622
- ##
2623
- # The longitude for this LOC where 2**31 is the prime meridian
2624
- # in thousandths of an arc second as an unsigned 32bit integer
2625
-
2626
- attr_reader :longitude
2627
-
2628
- ##
2629
- # The altitude of the LOC above a reference sphere whose surface sits 100km below the WGS84 spheroid
2630
- # in centimeters as an unsigned 32bit integer
2631
-
2632
- attr_reader :altitude
2633
-
2634
- def encode_rdata(msg) # :nodoc:
2635
- msg.put_bytes(@version)
2636
- msg.put_bytes(@ssize.scalar)
2637
- msg.put_bytes(@hprecision.scalar)
2638
- msg.put_bytes(@vprecision.scalar)
2639
- msg.put_bytes(@latitude.coordinates)
2640
- msg.put_bytes(@longitude.coordinates)
2641
- msg.put_bytes(@altitude.altitude)
2642
- end
2643
-
2644
- def self.decode_rdata(msg) # :nodoc:
2645
- version = msg.get_bytes(1)
2646
- ssize = msg.get_bytes(1)
2647
- hprecision = msg.get_bytes(1)
2648
- vprecision = msg.get_bytes(1)
2649
- latitude = msg.get_bytes(4)
2650
- longitude = msg.get_bytes(4)
2651
- altitude = msg.get_bytes(4)
2652
- return self.new(
2653
- version,
2654
- Resolv::LOC::Size.new(ssize),
2655
- Resolv::LOC::Size.new(hprecision),
2656
- Resolv::LOC::Size.new(vprecision),
2657
- Resolv::LOC::Coord.new(latitude,"lat"),
2658
- Resolv::LOC::Coord.new(longitude,"lon"),
2659
- Resolv::LOC::Alt.new(altitude)
2660
- )
2661
- end
2662
- end
2663
-
2664
- ##
2665
- # A Query type requesting any RR.
2666
-
2667
- class ANY < Query
2668
- TypeValue = 255 # :nodoc:
2669
- end
2670
-
2671
- ##
2672
- # CAA resource record defined in RFC 8659
2673
- #
2674
- # These records identify certificate authority allowed to issue
2675
- # certificates for the given domain.
2676
-
2677
- class CAA < Resource
2678
- TypeValue = 257
2679
-
2680
- ##
2681
- # Creates a new CAA for +flags+, +tag+ and +value+.
2682
-
2683
- def initialize(flags, tag, value)
2684
- unless (0..255) === flags
2685
- raise ArgumentError.new('flags must be an Integer between 0 and 255')
2686
- end
2687
- unless (1..15) === tag.bytesize
2688
- raise ArgumentError.new('length of tag must be between 1 and 15')
2689
- end
2690
-
2691
- @flags = flags
2692
- @tag = tag
2693
- @value = value
2694
- end
2695
-
2696
- ##
2697
- # Flags for this property:
2698
- # - Bit 0 : 0 = not critical, 1 = critical
2699
-
2700
- attr_reader :flags
2701
-
2702
- ##
2703
- # Property tag ("issue", "issuewild", "iodef"...).
2704
-
2705
- attr_reader :tag
2706
-
2707
- ##
2708
- # Property value.
2709
-
2710
- attr_reader :value
2711
-
2712
- ##
2713
- # Whether the critical flag is set on this property.
2714
-
2715
- def critical?
2716
- flags & 0x80 != 0
2717
- end
2718
-
2719
- def encode_rdata(msg) # :nodoc:
2720
- msg.put_pack('C', @flags)
2721
- msg.put_string(@tag)
2722
- msg.put_bytes(@value)
2723
- end
2724
-
2725
- def self.decode_rdata(msg) # :nodoc:
2726
- flags, = msg.get_unpack('C')
2727
- tag = msg.get_string
2728
- value = msg.get_bytes
2729
- self.new flags, tag, value
2730
- end
2731
- end
2732
-
2733
- ClassInsensitiveTypes = [ # :nodoc:
2734
- NS, CNAME, SOA, PTR, HINFO, MINFO, MX, TXT, LOC, ANY, CAA
2735
- ]
2736
-
2737
- ##
2738
- # module IN contains ARPA Internet specific RRs.
2739
-
2740
- module IN
2741
-
2742
- ClassValue = 1 # :nodoc:
2743
-
2744
- ClassInsensitiveTypes.each {|s|
2745
- c = Class.new(s)
2746
- c.const_set(:TypeValue, s::TypeValue)
2747
- c.const_set(:ClassValue, ClassValue)
2748
- ClassHash[[s::TypeValue, ClassValue]] = c
2749
- self.const_set(s.name.sub(/.*::/, ''), c)
2750
- }
2751
-
2752
- ##
2753
- # IPv4 Address resource
2754
-
2755
- class A < Resource
2756
- TypeValue = 1
2757
- ClassValue = IN::ClassValue
2758
- ClassHash[[TypeValue, ClassValue]] = self # :nodoc:
2759
-
2760
- ##
2761
- # Creates a new A for +address+.
2762
-
2763
- def initialize(address)
2764
- @address = IPv4.create(address)
2765
- end
2766
-
2767
- ##
2768
- # The Resolv::IPv4 address for this A.
2769
-
2770
- attr_reader :address
2771
-
2772
- def encode_rdata(msg) # :nodoc:
2773
- msg.put_bytes(@address.address)
2774
- end
2775
-
2776
- def self.decode_rdata(msg) # :nodoc:
2777
- return self.new(IPv4.new(msg.get_bytes(4)))
2778
- end
2779
- end
2780
-
2781
- ##
2782
- # Well Known Service resource.
2783
-
2784
- class WKS < Resource
2785
- TypeValue = 11
2786
- ClassValue = IN::ClassValue
2787
- ClassHash[[TypeValue, ClassValue]] = self # :nodoc:
2788
-
2789
- def initialize(address, protocol, bitmap)
2790
- @address = IPv4.create(address)
2791
- @protocol = protocol
2792
- @bitmap = bitmap
2793
- end
2794
-
2795
- ##
2796
- # The host these services run on.
2797
-
2798
- attr_reader :address
2799
-
2800
- ##
2801
- # IP protocol number for these services.
2802
-
2803
- attr_reader :protocol
2804
-
2805
- ##
2806
- # A bit map of enabled services on this host.
2807
- #
2808
- # If protocol is 6 (TCP) then the 26th bit corresponds to the SMTP
2809
- # service (port 25). If this bit is set, then an SMTP server should
2810
- # be listening on TCP port 25; if zero, SMTP service is not
2811
- # supported.
2812
-
2813
- attr_reader :bitmap
2814
-
2815
- def encode_rdata(msg) # :nodoc:
2816
- msg.put_bytes(@address.address)
2817
- msg.put_pack("n", @protocol)
2818
- msg.put_bytes(@bitmap)
2819
- end
2820
-
2821
- def self.decode_rdata(msg) # :nodoc:
2822
- address = IPv4.new(msg.get_bytes(4))
2823
- protocol, = msg.get_unpack("n")
2824
- bitmap = msg.get_bytes
2825
- return self.new(address, protocol, bitmap)
2826
- end
2827
- end
2828
-
2829
- ##
2830
- # An IPv6 address record.
2831
-
2832
- class AAAA < Resource
2833
- TypeValue = 28
2834
- ClassValue = IN::ClassValue
2835
- ClassHash[[TypeValue, ClassValue]] = self # :nodoc:
2836
-
2837
- ##
2838
- # Creates a new AAAA for +address+.
2839
-
2840
- def initialize(address)
2841
- @address = IPv6.create(address)
2842
- end
2843
-
2844
- ##
2845
- # The Resolv::IPv6 address for this AAAA.
2846
-
2847
- attr_reader :address
2848
-
2849
- def encode_rdata(msg) # :nodoc:
2850
- msg.put_bytes(@address.address)
2851
- end
2852
-
2853
- def self.decode_rdata(msg) # :nodoc:
2854
- return self.new(IPv6.new(msg.get_bytes(16)))
2855
- end
2856
- end
2857
-
2858
- ##
2859
- # SRV resource record defined in RFC 2782
2860
- #
2861
- # These records identify the hostname and port that a service is
2862
- # available at.
2863
-
2864
- class SRV < Resource
2865
- TypeValue = 33
2866
- ClassValue = IN::ClassValue
2867
- ClassHash[[TypeValue, ClassValue]] = self # :nodoc:
2868
-
2869
- # Create a SRV resource record.
2870
- #
2871
- # See the documentation for #priority, #weight, #port and #target
2872
- # for +priority+, +weight+, +port and +target+ respectively.
2873
-
2874
- def initialize(priority, weight, port, target)
2875
- @priority = priority.to_int
2876
- @weight = weight.to_int
2877
- @port = port.to_int
2878
- @target = Name.create(target)
2879
- end
2880
-
2881
- # The priority of this target host.
2882
- #
2883
- # A client MUST attempt to contact the target host with the
2884
- # lowest-numbered priority it can reach; target hosts with the same
2885
- # priority SHOULD be tried in an order defined by the weight field.
2886
- # The range is 0-65535. Note that it is not widely implemented and
2887
- # should be set to zero.
2888
-
2889
- attr_reader :priority
2890
-
2891
- # A server selection mechanism.
2892
- #
2893
- # The weight field specifies a relative weight for entries with the
2894
- # same priority. Larger weights SHOULD be given a proportionately
2895
- # higher probability of being selected. The range of this number is
2896
- # 0-65535. Domain administrators SHOULD use Weight 0 when there
2897
- # isn't any server selection to do, to make the RR easier to read
2898
- # for humans (less noisy). Note that it is not widely implemented
2899
- # and should be set to zero.
2900
-
2901
- attr_reader :weight
2902
-
2903
- # The port on this target host of this service.
2904
- #
2905
- # The range is 0-65535.
2906
-
2907
- attr_reader :port
2908
-
2909
- # The domain name of the target host.
2910
- #
2911
- # A target of "." means that the service is decidedly not available
2912
- # at this domain.
2913
-
2914
- attr_reader :target
2915
-
2916
- def encode_rdata(msg) # :nodoc:
2917
- msg.put_pack("n", @priority)
2918
- msg.put_pack("n", @weight)
2919
- msg.put_pack("n", @port)
2920
- msg.put_name(@target, compress: false)
2921
- end
2922
-
2923
- def self.decode_rdata(msg) # :nodoc:
2924
- priority, = msg.get_unpack("n")
2925
- weight, = msg.get_unpack("n")
2926
- port, = msg.get_unpack("n")
2927
- target = msg.get_name
2928
- return self.new(priority, weight, port, target)
2929
- end
2930
- end
2931
-
2932
- ##
2933
- # Common implementation for SVCB-compatible resource records.
2934
-
2935
- class ServiceBinding
2936
-
2937
- ##
2938
- # Create a service binding resource record.
2939
-
2940
- def initialize(priority, target, params = [])
2941
- @priority = priority.to_int
2942
- @target = Name.create(target)
2943
- @params = SvcParams.new(params)
2944
- end
2945
-
2946
- ##
2947
- # The priority of this target host.
2948
- #
2949
- # The range is 0-65535.
2950
- # If set to 0, this RR is in AliasMode. Otherwise, it is in ServiceMode.
2951
-
2952
- attr_reader :priority
2953
-
2954
- ##
2955
- # The domain name of the target host.
2956
-
2957
- attr_reader :target
2958
-
2959
- ##
2960
- # The service parameters for the target host.
2961
-
2962
- attr_reader :params
2963
-
2964
- ##
2965
- # Whether this RR is in AliasMode.
2966
-
2967
- def alias_mode?
2968
- self.priority == 0
2969
- end
2970
-
2971
- ##
2972
- # Whether this RR is in ServiceMode.
2973
-
2974
- def service_mode?
2975
- !alias_mode?
2976
- end
2977
-
2978
- def encode_rdata(msg) # :nodoc:
2979
- msg.put_pack("n", @priority)
2980
- msg.put_name(@target, compress: false)
2981
- @params.encode(msg)
2982
- end
2983
-
2984
- def self.decode_rdata(msg) # :nodoc:
2985
- priority, = msg.get_unpack("n")
2986
- target = msg.get_name
2987
- params = SvcParams.decode(msg)
2988
- return self.new(priority, target, params)
2989
- end
2990
- end
2991
-
2992
- ##
2993
- # SVCB resource record [RFC9460]
2994
-
2995
- class SVCB < ServiceBinding
2996
- TypeValue = 64
2997
- ClassValue = IN::ClassValue
2998
- ClassHash[[TypeValue, ClassValue]] = self # :nodoc:
2999
- end
3000
-
3001
- ##
3002
- # HTTPS resource record [RFC9460]
3003
-
3004
- class HTTPS < ServiceBinding
3005
- TypeValue = 65
3006
- ClassValue = IN::ClassValue
3007
- ClassHash[[TypeValue, ClassValue]] = self # :nodoc:
3008
- end
3009
- end
3010
- end
3011
- end
3012
-
3013
- ##
3014
- # A Resolv::DNS IPv4 address.
3015
-
3016
- class IPv4
3017
-
3018
- Regex256 = /0
3019
- |1(?:[0-9][0-9]?)?
3020
- |2(?:[0-4][0-9]?|5[0-5]?|[6-9])?
3021
- |[3-9][0-9]?/x # :nodoc:
3022
-
3023
- ##
3024
- # Regular expression IPv4 addresses must match.
3025
- Regex = /\A(#{Regex256})\.(#{Regex256})\.(#{Regex256})\.(#{Regex256})\z/
3026
-
3027
- ##
3028
- # Creates a new IPv4 address from +arg+ which may be:
3029
- #
3030
- # IPv4:: returns +arg+.
3031
- # String:: +arg+ must match the IPv4::Regex constant
3032
-
3033
- def self.create(arg)
3034
- case arg
3035
- when IPv4
3036
- return arg
3037
- when Regex
3038
- if (0..255) === (a = $1.to_i) &&
3039
- (0..255) === (b = $2.to_i) &&
3040
- (0..255) === (c = $3.to_i) &&
3041
- (0..255) === (d = $4.to_i)
3042
- return self.new([a, b, c, d].pack("CCCC"))
3043
- else
3044
- raise ArgumentError.new("IPv4 address with invalid value: " + arg)
3045
- end
3046
- else
3047
- raise ArgumentError.new("cannot interpret as IPv4 address: #{arg.inspect}")
3048
- end
3049
- end
3050
-
3051
- def initialize(address) # :nodoc:
3052
- unless address.kind_of?(String)
3053
- raise ArgumentError, 'IPv4 address must be a string'
3054
- end
3055
- unless address.length == 4
3056
- raise ArgumentError, "IPv4 address expects 4 bytes but #{address.length} bytes"
3057
- end
3058
- @address = address
3059
- end
3060
-
3061
- ##
3062
- # A String representation of this IPv4 address.
3063
-
3064
- ##
3065
- # The raw IPv4 address as a String.
3066
-
3067
- attr_reader :address
3068
-
3069
- def to_s # :nodoc:
3070
- return sprintf("%d.%d.%d.%d", *@address.unpack("CCCC"))
3071
- end
3072
-
3073
- def inspect # :nodoc:
3074
- return "#<#{self.class} #{self}>"
3075
- end
3076
-
3077
- ##
3078
- # Turns this IPv4 address into a Resolv::DNS::Name.
3079
-
3080
- def to_name
3081
- return DNS::Name.create(
3082
- '%d.%d.%d.%d.in-addr.arpa.' % @address.unpack('CCCC').reverse)
3083
- end
3084
-
3085
- def ==(other) # :nodoc:
3086
- return @address == other.address
3087
- end
3088
-
3089
- def eql?(other) # :nodoc:
3090
- return self == other
3091
- end
3092
-
3093
- def hash # :nodoc:
3094
- return @address.hash
3095
- end
3096
- end
3097
-
3098
- ##
3099
- # A Resolv::DNS IPv6 address.
3100
-
3101
- class IPv6
3102
-
3103
- ##
3104
- # IPv6 address format a:b:c:d:e:f:g:h
3105
- Regex_8Hex = /\A
3106
- (?:[0-9A-Fa-f]{1,4}:){7}
3107
- [0-9A-Fa-f]{1,4}
3108
- \z/x
3109
-
3110
- ##
3111
- # Compressed IPv6 address format a::b
3112
-
3113
- Regex_CompressedHex = /\A
3114
- ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) ::
3115
- ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?)
3116
- \z/x
3117
-
3118
- ##
3119
- # IPv4 mapped IPv6 address format a:b:c:d:e:f:w.x.y.z
3120
-
3121
- Regex_6Hex4Dec = /\A
3122
- ((?:[0-9A-Fa-f]{1,4}:){6,6})
3123
- (\d+)\.(\d+)\.(\d+)\.(\d+)
3124
- \z/x
3125
-
3126
- ##
3127
- # Compressed IPv4 mapped IPv6 address format a::b:w.x.y.z
3128
-
3129
- Regex_CompressedHex4Dec = /\A
3130
- ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) ::
3131
- ((?:[0-9A-Fa-f]{1,4}:)*)
3132
- (\d+)\.(\d+)\.(\d+)\.(\d+)
3133
- \z/x
3134
-
3135
- ##
3136
- # IPv6 link local address format fe80:b:c:d:e:f:g:h%em1
3137
- Regex_8HexLinkLocal = /\A
3138
- [Ff][Ee]80
3139
- (?::[0-9A-Fa-f]{1,4}){7}
3140
- %[-0-9A-Za-z._~]+
3141
- \z/x
3142
-
3143
- ##
3144
- # Compressed IPv6 link local address format fe80::b%em1
3145
-
3146
- Regex_CompressedHexLinkLocal = /\A
3147
- [Ff][Ee]80:
3148
- (?:
3149
- ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) ::
3150
- ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?)
3151
- |
3152
- :((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?)
3153
- )?
3154
- :[0-9A-Fa-f]{1,4}%[-0-9A-Za-z._~]+
3155
- \z/x
3156
-
3157
- ##
3158
- # A composite IPv6 address Regexp.
3159
-
3160
- Regex = /
3161
- (?:#{Regex_8Hex}) |
3162
- (?:#{Regex_CompressedHex}) |
3163
- (?:#{Regex_6Hex4Dec}) |
3164
- (?:#{Regex_CompressedHex4Dec}) |
3165
- (?:#{Regex_8HexLinkLocal}) |
3166
- (?:#{Regex_CompressedHexLinkLocal})
3167
- /x
3168
-
3169
- ##
3170
- # Creates a new IPv6 address from +arg+ which may be:
3171
- #
3172
- # IPv6:: returns +arg+.
3173
- # String:: +arg+ must match one of the IPv6::Regex* constants
3174
-
3175
- def self.create(arg)
3176
- case arg
3177
- when IPv6
3178
- return arg
3179
- when String
3180
- address = ''.b
3181
- if Regex_8Hex =~ arg
3182
- arg.scan(/[0-9A-Fa-f]+/) {|hex| address << [hex.hex].pack('n')}
3183
- elsif Regex_CompressedHex =~ arg
3184
- prefix = $1
3185
- suffix = $2
3186
- a1 = ''.b
3187
- a2 = ''.b
3188
- prefix.scan(/[0-9A-Fa-f]+/) {|hex| a1 << [hex.hex].pack('n')}
3189
- suffix.scan(/[0-9A-Fa-f]+/) {|hex| a2 << [hex.hex].pack('n')}
3190
- omitlen = 16 - a1.length - a2.length
3191
- address << a1 << "\0" * omitlen << a2
3192
- elsif Regex_6Hex4Dec =~ arg
3193
- prefix, a, b, c, d = $1, $2.to_i, $3.to_i, $4.to_i, $5.to_i
3194
- if (0..255) === a && (0..255) === b && (0..255) === c && (0..255) === d
3195
- prefix.scan(/[0-9A-Fa-f]+/) {|hex| address << [hex.hex].pack('n')}
3196
- address << [a, b, c, d].pack('CCCC')
3197
- else
3198
- raise ArgumentError.new("not numeric IPv6 address: " + arg)
3199
- end
3200
- elsif Regex_CompressedHex4Dec =~ arg
3201
- prefix, suffix, a, b, c, d = $1, $2, $3.to_i, $4.to_i, $5.to_i, $6.to_i
3202
- if (0..255) === a && (0..255) === b && (0..255) === c && (0..255) === d
3203
- a1 = ''.b
3204
- a2 = ''.b
3205
- prefix.scan(/[0-9A-Fa-f]+/) {|hex| a1 << [hex.hex].pack('n')}
3206
- suffix.scan(/[0-9A-Fa-f]+/) {|hex| a2 << [hex.hex].pack('n')}
3207
- omitlen = 12 - a1.length - a2.length
3208
- address << a1 << "\0" * omitlen << a2 << [a, b, c, d].pack('CCCC')
3209
- else
3210
- raise ArgumentError.new("not numeric IPv6 address: " + arg)
3211
- end
3212
- else
3213
- raise ArgumentError.new("not numeric IPv6 address: " + arg)
3214
- end
3215
- return IPv6.new(address)
3216
- else
3217
- raise ArgumentError.new("cannot interpret as IPv6 address: #{arg.inspect}")
3218
- end
3219
- end
3220
-
3221
- def initialize(address) # :nodoc:
3222
- unless address.kind_of?(String) && address.length == 16
3223
- raise ArgumentError.new('IPv6 address must be 16 bytes')
3224
- end
3225
- @address = address
3226
- end
3227
-
3228
- ##
3229
- # The raw IPv6 address as a String.
3230
-
3231
- attr_reader :address
3232
-
3233
- def to_s # :nodoc:
3234
- sprintf("%x:%x:%x:%x:%x:%x:%x:%x", *@address.unpack("nnnnnnnn")).sub(/(^|:)0(:0)+(:|$)/, '::')
3235
- end
3236
-
3237
- def inspect # :nodoc:
3238
- return "#<#{self.class} #{self}>"
3239
- end
3240
-
3241
- ##
3242
- # Turns this IPv6 address into a Resolv::DNS::Name.
3243
- #--
3244
- # ip6.arpa should be searched too. [RFC3152]
3245
-
3246
- def to_name
3247
- return DNS::Name.new(
3248
- @address.unpack("H32")[0].split(//).reverse + ['ip6', 'arpa'])
3249
- end
3250
-
3251
- def ==(other) # :nodoc:
3252
- return @address == other.address
3253
- end
3254
-
3255
- def eql?(other) # :nodoc:
3256
- return self == other
3257
- end
3258
-
3259
- def hash # :nodoc:
3260
- return @address.hash
3261
- end
3262
- end
3263
-
3264
- ##
3265
- # Resolv::MDNS is a one-shot Multicast DNS (mDNS) resolver. It blindly
3266
- # makes queries to the mDNS addresses without understanding anything about
3267
- # multicast ports.
3268
- #
3269
- # Information taken form the following places:
3270
- #
3271
- # * RFC 6762
3272
-
3273
- class MDNS < DNS
3274
-
3275
- ##
3276
- # Default mDNS Port
3277
-
3278
- Port = 5353
3279
-
3280
- ##
3281
- # Default IPv4 mDNS address
3282
-
3283
- AddressV4 = '224.0.0.251'
3284
-
3285
- ##
3286
- # Default IPv6 mDNS address
3287
-
3288
- AddressV6 = 'ff02::fb'
3289
-
3290
- ##
3291
- # Default mDNS addresses
3292
-
3293
- Addresses = [
3294
- [AddressV4, Port],
3295
- [AddressV6, Port],
3296
- ]
3297
-
3298
- ##
3299
- # Creates a new one-shot Multicast DNS (mDNS) resolver.
3300
- #
3301
- # +config_info+ can be:
3302
- #
3303
- # nil::
3304
- # Uses the default mDNS addresses
3305
- #
3306
- # Hash::
3307
- # Must contain :nameserver or :nameserver_port like
3308
- # Resolv::DNS#initialize.
3309
-
3310
- def initialize(config_info=nil)
3311
- if config_info then
3312
- super({ nameserver_port: Addresses }.merge(config_info))
3313
- else
3314
- super(nameserver_port: Addresses)
3315
- end
3316
- end
3317
-
3318
- ##
3319
- # Iterates over all IP addresses for +name+ retrieved from the mDNS
3320
- # resolver, provided name ends with "local". If the name does not end in
3321
- # "local" no records will be returned.
3322
- #
3323
- # +name+ can be a Resolv::DNS::Name or a String. Retrieved addresses will
3324
- # be a Resolv::IPv4 or Resolv::IPv6
3325
-
3326
- def each_address(name)
3327
- name = Resolv::DNS::Name.create(name)
3328
-
3329
- return unless name[-1].to_s == 'local'
3330
-
3331
- super(name)
3332
- end
3333
-
3334
- def make_udp_requester # :nodoc:
3335
- nameserver_port = @config.nameserver_port
3336
- Requester::MDNSOneShot.new(*nameserver_port)
3337
- end
3338
-
3339
- end
3340
-
3341
- module LOC # :nodoc:
3342
-
3343
- ##
3344
- # A Resolv::LOC::Size
3345
-
3346
- class Size
3347
-
3348
- # Regular expression LOC size must match.
3349
-
3350
- Regex = /^(\d+\.*\d*)[m]$/
3351
-
3352
- ##
3353
- # Creates a new LOC::Size from +arg+ which may be:
3354
- #
3355
- # LOC::Size:: returns +arg+.
3356
- # String:: +arg+ must match the LOC::Size::Regex constant
3357
-
3358
- def self.create(arg)
3359
- case arg
3360
- when Size
3361
- return arg
3362
- when String
3363
- scalar = ''
3364
- if Regex =~ arg
3365
- scalar = [(($1.to_f*(1e2)).to_i.to_s[0].to_i*(2**4)+(($1.to_f*(1e2)).to_i.to_s.length-1))].pack("C")
3366
- else
3367
- raise ArgumentError.new("not a properly formed Size string: " + arg)
3368
- end
3369
- return Size.new(scalar)
3370
- else
3371
- raise ArgumentError.new("cannot interpret as Size: #{arg.inspect}")
3372
- end
3373
- end
3374
-
3375
- # Internal use; use self.create.
3376
- def initialize(scalar)
3377
- @scalar = scalar
3378
- end
3379
-
3380
- ##
3381
- # The raw size
3382
-
3383
- attr_reader :scalar
3384
-
3385
- def to_s # :nodoc:
3386
- s = @scalar.unpack("H2").join.to_s
3387
- return ((s[0].to_i)*(10**(s[1].to_i-2))).to_s << "m"
3388
- end
3389
-
3390
- def inspect # :nodoc:
3391
- return "#<#{self.class} #{self}>"
3392
- end
3393
-
3394
- def ==(other) # :nodoc:
3395
- return @scalar == other.scalar
3396
- end
3397
-
3398
- def eql?(other) # :nodoc:
3399
- return self == other
3400
- end
3401
-
3402
- def hash # :nodoc:
3403
- return @scalar.hash
3404
- end
3405
-
3406
- end
3407
-
3408
- ##
3409
- # A Resolv::LOC::Coord
3410
-
3411
- class Coord
3412
-
3413
- # Regular expression LOC Coord must match.
3414
-
3415
- Regex = /^(\d+)\s(\d+)\s(\d+\.\d+)\s([NESW])$/
3416
-
3417
- ##
3418
- # Creates a new LOC::Coord from +arg+ which may be:
3419
- #
3420
- # LOC::Coord:: returns +arg+.
3421
- # String:: +arg+ must match the LOC::Coord::Regex constant
3422
-
3423
- def self.create(arg)
3424
- case arg
3425
- when Coord
3426
- return arg
3427
- when String
3428
- coordinates = ''
3429
- if Regex =~ arg && $1.to_f < 180
3430
- m = $~
3431
- hemi = (m[4][/[NE]/]) || (m[4][/[SW]/]) ? 1 : -1
3432
- coordinates = [ ((m[1].to_i*(36e5)) + (m[2].to_i*(6e4)) +
3433
- (m[3].to_f*(1e3))) * hemi+(2**31) ].pack("N")
3434
- orientation = m[4][/[NS]/] ? 'lat' : 'lon'
3435
- else
3436
- raise ArgumentError.new("not a properly formed Coord string: " + arg)
3437
- end
3438
- return Coord.new(coordinates,orientation)
3439
- else
3440
- raise ArgumentError.new("cannot interpret as Coord: #{arg.inspect}")
3441
- end
3442
- end
3443
-
3444
- # Internal use; use self.create.
3445
- def initialize(coordinates,orientation)
3446
- unless coordinates.kind_of?(String)
3447
- raise ArgumentError.new("Coord must be a 32bit unsigned integer in hex format: #{coordinates.inspect}")
3448
- end
3449
- unless orientation.kind_of?(String) && orientation[/^lon$|^lat$/]
3450
- raise ArgumentError.new('Coord expects orientation to be a String argument of "lat" or "lon"')
3451
- end
3452
- @coordinates = coordinates
3453
- @orientation = orientation
3454
- end
3455
-
3456
- ##
3457
- # The raw coordinates
3458
-
3459
- attr_reader :coordinates
3460
-
3461
- ## The orientation of the hemisphere as 'lat' or 'lon'
3462
-
3463
- attr_reader :orientation
3464
-
3465
- def to_s # :nodoc:
3466
- c = @coordinates.unpack("N").join.to_i
3467
- val = (c - (2**31)).abs
3468
- fracsecs = (val % 1e3).to_i.to_s
3469
- val = val / 1e3
3470
- secs = (val % 60).to_i.to_s
3471
- val = val / 60
3472
- mins = (val % 60).to_i.to_s
3473
- degs = (val / 60).to_i.to_s
3474
- posi = (c >= 2**31)
3475
- case posi
3476
- when true
3477
- hemi = @orientation[/^lat$/] ? "N" : "E"
3478
- else
3479
- hemi = @orientation[/^lon$/] ? "W" : "S"
3480
- end
3481
- return degs << " " << mins << " " << secs << "." << fracsecs << " " << hemi
3482
- end
3483
-
3484
- def inspect # :nodoc:
3485
- return "#<#{self.class} #{self}>"
3486
- end
3487
-
3488
- def ==(other) # :nodoc:
3489
- return @coordinates == other.coordinates
3490
- end
3491
-
3492
- def eql?(other) # :nodoc:
3493
- return self == other
3494
- end
3495
-
3496
- def hash # :nodoc:
3497
- return @coordinates.hash
3498
- end
3499
-
3500
- end
3501
-
3502
- ##
3503
- # A Resolv::LOC::Alt
3504
-
3505
- class Alt
3506
-
3507
- # Regular expression LOC Alt must match.
3508
-
3509
- Regex = /^([+-]*\d+\.*\d*)[m]$/
3510
-
3511
- ##
3512
- # Creates a new LOC::Alt from +arg+ which may be:
3513
- #
3514
- # LOC::Alt:: returns +arg+.
3515
- # String:: +arg+ must match the LOC::Alt::Regex constant
3516
-
3517
- def self.create(arg)
3518
- case arg
3519
- when Alt
3520
- return arg
3521
- when String
3522
- altitude = ''
3523
- if Regex =~ arg
3524
- altitude = [($1.to_f*(1e2))+(1e7)].pack("N")
3525
- else
3526
- raise ArgumentError.new("not a properly formed Alt string: " + arg)
3527
- end
3528
- return Alt.new(altitude)
3529
- else
3530
- raise ArgumentError.new("cannot interpret as Alt: #{arg.inspect}")
3531
- end
3532
- end
3533
-
3534
- # Internal use; use self.create.
3535
- def initialize(altitude)
3536
- @altitude = altitude
3537
- end
3538
-
3539
- ##
3540
- # The raw altitude
3541
-
3542
- attr_reader :altitude
3543
-
3544
- def to_s # :nodoc:
3545
- a = @altitude.unpack("N").join.to_i
3546
- return ((a.to_f/1e2)-1e5).to_s + "m"
3547
- end
3548
-
3549
- def inspect # :nodoc:
3550
- return "#<#{self.class} #{self}>"
3551
- end
3552
-
3553
- def ==(other) # :nodoc:
3554
- return @altitude == other.altitude
3555
- end
3556
-
3557
- def eql?(other) # :nodoc:
3558
- return self == other
3559
- end
3560
-
3561
- def hash # :nodoc:
3562
- return @altitude.hash
3563
- end
3564
-
3565
- end
3566
-
3567
- end
3568
-
3569
- ##
3570
- # Default resolver to use for Resolv class methods.
3571
-
3572
- DefaultResolver = self.new
3573
-
3574
- ##
3575
- # Replaces the resolvers in the default resolver with +new_resolvers+. This
3576
- # allows resolvers to be changed for resolv-replace.
3577
-
3578
- def DefaultResolver.replace_resolvers new_resolvers
3579
- @resolvers = new_resolvers
3580
- end
3581
-
3582
- ##
3583
- # Address Regexp to use for matching IP addresses.
3584
-
3585
- AddressRegex = /(?:#{IPv4::Regex})|(?:#{IPv6::Regex})/
3586
-
3587
- end