@ai-ecoverse/wasix-ruby 3.4.11-2 → 3.4.11-3
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.
- package/PRESTAGE.md +38 -6
- package/bin/ruby +1 -0
- package/bin/ruby.wasm +0 -0
- package/lib/ruby/3.4.0/socket.rb +1790 -0
- package/lib/ruby/3.4.0/wasm32-wasi/rbconfig.rb +5 -5
- package/lib/ruby/3.4.11/English.gemspec +22 -0
- package/lib/ruby/3.4.11/English.rb +164 -0
- package/lib/ruby/3.4.11/benchmark.gemspec +32 -0
- package/lib/ruby/3.4.11/benchmark.rb +594 -0
- package/lib/ruby/3.4.11/bundled_gems.rb +248 -0
- package/lib/ruby/3.4.11/bundler/.document +1 -0
- package/lib/ruby/3.4.11/bundler/build_metadata.rb +43 -0
- package/lib/ruby/3.4.11/bundler/bundler.gemspec +45 -0
- package/lib/ruby/3.4.11/bundler/capistrano.rb +22 -0
- package/lib/ruby/3.4.11/bundler/checksum.rb +264 -0
- package/lib/ruby/3.4.11/bundler/ci_detector.rb +75 -0
- package/lib/ruby/3.4.11/bundler/cli/add.rb +49 -0
- package/lib/ruby/3.4.11/bundler/cli/binstubs.rb +57 -0
- package/lib/ruby/3.4.11/bundler/cli/cache.rb +43 -0
- package/lib/ruby/3.4.11/bundler/cli/check.rb +40 -0
- package/lib/ruby/3.4.11/bundler/cli/clean.rb +25 -0
- package/lib/ruby/3.4.11/bundler/cli/common.rb +138 -0
- package/lib/ruby/3.4.11/bundler/cli/config.rb +204 -0
- package/lib/ruby/3.4.11/bundler/cli/console.rb +42 -0
- package/lib/ruby/3.4.11/bundler/cli/doctor/diagnose.rb +167 -0
- package/lib/ruby/3.4.11/bundler/cli/doctor/ssl.rb +249 -0
- package/lib/ruby/3.4.11/bundler/cli/doctor.rb +33 -0
- package/lib/ruby/3.4.11/bundler/cli/exec.rb +89 -0
- package/lib/ruby/3.4.11/bundler/cli/fund.rb +36 -0
- package/lib/ruby/3.4.11/bundler/cli/gem.rb +467 -0
- package/lib/ruby/3.4.11/bundler/cli/info.rb +83 -0
- package/lib/ruby/3.4.11/bundler/cli/init.rb +51 -0
- package/lib/ruby/3.4.11/bundler/cli/inject.rb +60 -0
- package/lib/ruby/3.4.11/bundler/cli/install.rb +199 -0
- package/lib/ruby/3.4.11/bundler/cli/issue.rb +41 -0
- package/lib/ruby/3.4.11/bundler/cli/list.rb +66 -0
- package/lib/ruby/3.4.11/bundler/cli/lock.rb +94 -0
- package/lib/ruby/3.4.11/bundler/cli/open.rb +29 -0
- package/lib/ruby/3.4.11/bundler/cli/outdated.rb +297 -0
- package/lib/ruby/3.4.11/bundler/cli/platform.rb +48 -0
- package/lib/ruby/3.4.11/bundler/cli/plugin.rb +35 -0
- package/lib/ruby/3.4.11/bundler/cli/pristine.rb +60 -0
- package/lib/ruby/3.4.11/bundler/cli/remove.rb +17 -0
- package/lib/ruby/3.4.11/bundler/cli/show.rb +75 -0
- package/lib/ruby/3.4.11/bundler/cli/update.rb +123 -0
- package/lib/ruby/3.4.11/bundler/cli/viz.rb +31 -0
- package/lib/ruby/3.4.11/bundler/cli.rb +790 -0
- package/lib/ruby/3.4.11/bundler/compact_index_client/cache.rb +96 -0
- package/lib/ruby/3.4.11/bundler/compact_index_client/cache_file.rb +148 -0
- package/lib/ruby/3.4.11/bundler/compact_index_client/parser.rb +84 -0
- package/lib/ruby/3.4.11/bundler/compact_index_client/updater.rb +105 -0
- package/lib/ruby/3.4.11/bundler/compact_index_client.rb +97 -0
- package/lib/ruby/3.4.11/bundler/constants.rb +14 -0
- package/lib/ruby/3.4.11/bundler/current_ruby.rb +82 -0
- package/lib/ruby/3.4.11/bundler/definition.rb +1187 -0
- package/lib/ruby/3.4.11/bundler/dependency.rb +151 -0
- package/lib/ruby/3.4.11/bundler/deployment.rb +69 -0
- package/lib/ruby/3.4.11/bundler/deprecate.rb +44 -0
- package/lib/ruby/3.4.11/bundler/digest.rb +71 -0
- package/lib/ruby/3.4.11/bundler/dsl.rb +638 -0
- package/lib/ruby/3.4.11/bundler/endpoint_specification.rb +174 -0
- package/lib/ruby/3.4.11/bundler/env.rb +148 -0
- package/lib/ruby/3.4.11/bundler/environment_preserver.rb +68 -0
- package/lib/ruby/3.4.11/bundler/errors.rb +281 -0
- package/lib/ruby/3.4.11/bundler/feature_flag.rb +50 -0
- package/lib/ruby/3.4.11/bundler/fetcher/base.rb +52 -0
- package/lib/ruby/3.4.11/bundler/fetcher/compact_index.rb +120 -0
- package/lib/ruby/3.4.11/bundler/fetcher/dependency.rb +78 -0
- package/lib/ruby/3.4.11/bundler/fetcher/downloader.rb +91 -0
- package/lib/ruby/3.4.11/bundler/fetcher/gem_remote_fetcher.rb +16 -0
- package/lib/ruby/3.4.11/bundler/fetcher/index.rb +25 -0
- package/lib/ruby/3.4.11/bundler/fetcher.rb +331 -0
- package/lib/ruby/3.4.11/bundler/force_platform.rb +16 -0
- package/lib/ruby/3.4.11/bundler/friendly_errors.rb +126 -0
- package/lib/ruby/3.4.11/bundler/gem_helper.rb +237 -0
- package/lib/ruby/3.4.11/bundler/gem_helpers.rb +144 -0
- package/lib/ruby/3.4.11/bundler/gem_tasks.rb +7 -0
- package/lib/ruby/3.4.11/bundler/gem_version_promoter.rb +147 -0
- package/lib/ruby/3.4.11/bundler/graph.rb +152 -0
- package/lib/ruby/3.4.11/bundler/index.rb +205 -0
- package/lib/ruby/3.4.11/bundler/injector.rb +285 -0
- package/lib/ruby/3.4.11/bundler/inline.rb +98 -0
- package/lib/ruby/3.4.11/bundler/installer/gem_installer.rb +85 -0
- package/lib/ruby/3.4.11/bundler/installer/parallel_installer.rb +203 -0
- package/lib/ruby/3.4.11/bundler/installer/standalone.rb +113 -0
- package/lib/ruby/3.4.11/bundler/installer.rb +243 -0
- package/lib/ruby/3.4.11/bundler/lazy_specification.rb +243 -0
- package/lib/ruby/3.4.11/bundler/lockfile_generator.rb +104 -0
- package/lib/ruby/3.4.11/bundler/lockfile_parser.rb +300 -0
- package/lib/ruby/3.4.11/bundler/man/.document +1 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-add.1 +76 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-add.1.ronn +87 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-binstubs.1 +33 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-binstubs.1.ronn +44 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-cache.1 +68 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-cache.1.ronn +108 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-check.1 +24 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-check.1.ronn +31 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-clean.1 +17 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-clean.1.ronn +18 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-config.1 +317 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-config.1.ronn +408 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-console.1 +33 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-console.1.ronn +39 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-doctor.1 +30 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-doctor.1.ronn +33 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-env.1 +9 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-env.1.ronn +10 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-exec.1 +107 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-exec.1.ronn +154 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-fund.1 +22 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-fund.1.ronn +25 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-gem.1 +87 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-gem.1.ronn +149 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-help.1 +9 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-help.1.ronn +12 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-info.1 +17 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-info.1.ronn +21 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-init.1 +20 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-init.1.ronn +32 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-inject.1 +31 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-inject.1.ronn +32 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-install.1 +218 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-install.1.ronn +387 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-issue.1 +45 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-issue.1.ronn +37 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-licenses.1 +9 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-licenses.1.ronn +10 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-list.1 +35 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-list.1.ronn +36 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-lock.1 +75 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-lock.1.ronn +115 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-open.1 +32 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-open.1.ronn +28 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-outdated.1 +103 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-outdated.1.ronn +110 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-platform.1 +49 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-platform.1.ronn +49 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-plugin.1 +58 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-plugin.1.ronn +63 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-pristine.1 +23 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-pristine.1.ronn +34 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-remove.1 +21 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-remove.1.ronn +23 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-show.1 +19 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-show.1.ronn +25 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-update.1 +281 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-update.1.ronn +359 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-version.1 +22 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-version.1.ronn +24 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-viz.1 +30 -0
- package/lib/ruby/3.4.11/bundler/man/bundle-viz.1.ronn +36 -0
- package/lib/ruby/3.4.11/bundler/man/bundle.1 +102 -0
- package/lib/ruby/3.4.11/bundler/man/bundle.1.ronn +116 -0
- package/lib/ruby/3.4.11/bundler/man/gemfile.5 +472 -0
- package/lib/ruby/3.4.11/bundler/man/gemfile.5.ronn +558 -0
- package/lib/ruby/3.4.11/bundler/man/index.txt +33 -0
- package/lib/ruby/3.4.11/bundler/match_metadata.rb +30 -0
- package/lib/ruby/3.4.11/bundler/match_platform.rb +23 -0
- package/lib/ruby/3.4.11/bundler/match_remote_metadata.rb +29 -0
- package/lib/ruby/3.4.11/bundler/materialization.rb +59 -0
- package/lib/ruby/3.4.11/bundler/mirror.rb +221 -0
- package/lib/ruby/3.4.11/bundler/plugin/api/source.rb +322 -0
- package/lib/ruby/3.4.11/bundler/plugin/api.rb +81 -0
- package/lib/ruby/3.4.11/bundler/plugin/dsl.rb +53 -0
- package/lib/ruby/3.4.11/bundler/plugin/events.rb +85 -0
- package/lib/ruby/3.4.11/bundler/plugin/index.rb +197 -0
- package/lib/ruby/3.4.11/bundler/plugin/installer/git.rb +34 -0
- package/lib/ruby/3.4.11/bundler/plugin/installer/path.rb +26 -0
- package/lib/ruby/3.4.11/bundler/plugin/installer/rubygems.rb +19 -0
- package/lib/ruby/3.4.11/bundler/plugin/installer.rb +132 -0
- package/lib/ruby/3.4.11/bundler/plugin/source_list.rb +31 -0
- package/lib/ruby/3.4.11/bundler/plugin.rb +378 -0
- package/lib/ruby/3.4.11/bundler/process_lock.rb +20 -0
- package/lib/ruby/3.4.11/bundler/remote_specification.rb +126 -0
- package/lib/ruby/3.4.11/bundler/resolver/base.rb +118 -0
- package/lib/ruby/3.4.11/bundler/resolver/candidate.rb +85 -0
- package/lib/ruby/3.4.11/bundler/resolver/incompatibility.rb +15 -0
- package/lib/ruby/3.4.11/bundler/resolver/package.rb +94 -0
- package/lib/ruby/3.4.11/bundler/resolver/root.rb +25 -0
- package/lib/ruby/3.4.11/bundler/resolver/spec_group.rb +74 -0
- package/lib/ruby/3.4.11/bundler/resolver/strategy.rb +40 -0
- package/lib/ruby/3.4.11/bundler/resolver.rb +526 -0
- package/lib/ruby/3.4.11/bundler/retry.rb +66 -0
- package/lib/ruby/3.4.11/bundler/ruby_dsl.rb +62 -0
- package/lib/ruby/3.4.11/bundler/ruby_version.rb +137 -0
- package/lib/ruby/3.4.11/bundler/rubygems_ext.rb +485 -0
- package/lib/ruby/3.4.11/bundler/rubygems_gem_installer.rb +172 -0
- package/lib/ruby/3.4.11/bundler/rubygems_integration.rb +455 -0
- package/lib/ruby/3.4.11/bundler/runtime.rb +320 -0
- package/lib/ruby/3.4.11/bundler/safe_marshal.rb +31 -0
- package/lib/ruby/3.4.11/bundler/self_manager.rb +206 -0
- package/lib/ruby/3.4.11/bundler/settings/validator.rb +102 -0
- package/lib/ruby/3.4.11/bundler/settings.rb +599 -0
- package/lib/ruby/3.4.11/bundler/setup.rb +39 -0
- package/lib/ruby/3.4.11/bundler/shared_helpers.rb +398 -0
- package/lib/ruby/3.4.11/bundler/similarity_detector.rb +63 -0
- package/lib/ruby/3.4.11/bundler/source/gemspec.rb +15 -0
- package/lib/ruby/3.4.11/bundler/source/git/git_proxy.rb +472 -0
- package/lib/ruby/3.4.11/bundler/source/git.rb +452 -0
- package/lib/ruby/3.4.11/bundler/source/metadata.rb +63 -0
- package/lib/ruby/3.4.11/bundler/source/path/installer.rb +53 -0
- package/lib/ruby/3.4.11/bundler/source/path.rb +250 -0
- package/lib/ruby/3.4.11/bundler/source/rubygems/remote.rb +76 -0
- package/lib/ruby/3.4.11/bundler/source/rubygems.rb +522 -0
- package/lib/ruby/3.4.11/bundler/source/rubygems_aggregate.rb +68 -0
- package/lib/ruby/3.4.11/bundler/source.rb +118 -0
- package/lib/ruby/3.4.11/bundler/source_list.rb +273 -0
- package/lib/ruby/3.4.11/bundler/source_map.rb +71 -0
- package/lib/ruby/3.4.11/bundler/spec_set.rb +395 -0
- package/lib/ruby/3.4.11/bundler/stub_specification.rb +146 -0
- package/lib/ruby/3.4.11/bundler/templates/.document +1 -0
- package/lib/ruby/3.4.11/bundler/templates/Executable +27 -0
- package/lib/ruby/3.4.11/bundler/templates/Executable.bundler +109 -0
- package/lib/ruby/3.4.11/bundler/templates/Executable.standalone +14 -0
- package/lib/ruby/3.4.11/bundler/templates/Gemfile +5 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +132 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/Cargo.toml.tt +7 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/Gemfile.tt +24 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/LICENSE.txt.tt +21 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/README.md.tt +49 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/Rakefile.tt +67 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/bin/console.tt +11 -0
- package/lib/ruby/{gems/3.4.0/gems/nkf-0.2.0/bin/setup → 3.4.11/bundler/templates/newgem/bin/setup.tt} +0 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/circleci/config.yml.tt +25 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/exe/newgem.tt +3 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +10 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/newgem.c.tt +9 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/newgem.h.tt +6 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/github/workflows/main.yml.tt +37 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/gitignore.tt +23 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/gitlab-ci.yml.tt +18 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/lib/newgem/version.rb.tt +9 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/lib/newgem.rb.tt +15 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/newgem.gemspec.tt +52 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/rspec.tt +3 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/rubocop.yml.tt +8 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/spec/newgem_spec.rb.tt +11 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/spec/spec_helper.rb.tt +15 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/standard.yml.tt +3 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/test/minitest/test_helper.rb.tt +6 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/test/minitest/test_newgem.rb.tt +13 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +15 -0
- package/lib/ruby/3.4.11/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +6 -0
- package/lib/ruby/3.4.11/bundler/ui/rg_proxy.rb +19 -0
- package/lib/ruby/3.4.11/bundler/ui/shell.rb +187 -0
- package/lib/ruby/3.4.11/bundler/ui/silent.rb +96 -0
- package/lib/ruby/3.4.11/bundler/ui.rb +9 -0
- package/lib/ruby/3.4.11/bundler/uri_credentials_filter.rb +43 -0
- package/lib/ruby/3.4.11/bundler/uri_normalizer.rb +23 -0
- package/lib/ruby/3.4.11/bundler/vendor/.document +1 -0
- package/lib/ruby/3.4.11/bundler/vendor/connection_pool/.document +1 -0
- package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +224 -0
- package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool/version.rb +3 -0
- package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +56 -0
- package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool.rb +186 -0
- package/lib/ruby/3.4.11/bundler/vendor/fileutils/.document +1 -0
- package/lib/ruby/3.4.11/bundler/vendor/fileutils/lib/fileutils.rb +2696 -0
- package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/.document +1 -0
- package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +41 -0
- package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +65 -0
- package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +79 -0
- package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1111 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/.document +1 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +169 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +150 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +61 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/strategy.rb +42 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +129 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +423 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +236 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
- package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
- package/lib/ruby/3.4.11/bundler/vendor/securerandom/.document +1 -0
- package/lib/ruby/3.4.11/bundler/vendor/securerandom/lib/securerandom.rb +102 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/.document +1 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/create_file.rb +105 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/create_link.rb +61 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/directory.rb +108 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +143 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +371 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +130 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions.rb +340 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/base.rb +825 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/command.rb +151 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +107 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/error.rb +106 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/group.rb +292 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/invocation.rb +178 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/line_editor/basic.rb +37 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/line_editor/readline.rb +88 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/line_editor.rb +17 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/nested_context.rb +29 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/argument.rb +86 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/arguments.rb +195 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/option.rb +178 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/options.rb +294 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser.rb +4 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/rake_compat.rb +72 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/runner.rb +335 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/basic.rb +388 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/color.rb +112 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/column_printer.rb +29 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/html.rb +81 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/table_printer.rb +118 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/terminal.rb +42 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +38 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell.rb +81 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/util.rb +285 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/version.rb +3 -0
- package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor.rb +674 -0
- package/lib/ruby/3.4.11/bundler/vendor/tsort/.document +1 -0
- package/lib/ruby/3.4.11/bundler/vendor/tsort/lib/tsort.rb +455 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/.document +1 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/common.rb +880 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/file.rb +100 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ftp.rb +267 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/generic.rb +1592 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/http.rb +125 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/https.rb +23 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ldap.rb +261 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ldaps.rb +22 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/mailto.rb +293 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +546 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +206 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/version.rb +6 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ws.rb +83 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/wss.rb +23 -0
- package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri.rb +104 -0
- package/lib/ruby/3.4.11/bundler/vendored_fileutils.rb +4 -0
- package/lib/ruby/3.4.11/bundler/vendored_net_http.rb +23 -0
- package/lib/ruby/3.4.11/bundler/vendored_persistent.rb +11 -0
- package/lib/ruby/3.4.11/bundler/vendored_pub_grub.rb +4 -0
- package/lib/ruby/3.4.11/bundler/vendored_securerandom.rb +12 -0
- package/lib/ruby/3.4.11/bundler/vendored_thor.rb +8 -0
- package/lib/ruby/3.4.11/bundler/vendored_timeout.rb +12 -0
- package/lib/ruby/3.4.11/bundler/vendored_tsort.rb +4 -0
- package/lib/ruby/3.4.11/bundler/vendored_uri.rb +21 -0
- package/lib/ruby/3.4.11/bundler/version.rb +13 -0
- package/lib/ruby/3.4.11/bundler/vlad.rb +17 -0
- package/lib/ruby/3.4.11/bundler/worker.rb +117 -0
- package/lib/ruby/3.4.11/bundler/yaml_serializer.rb +98 -0
- package/lib/ruby/3.4.11/bundler.rb +701 -0
- package/lib/ruby/3.4.11/cgi/cgi.gemspec +43 -0
- package/lib/ruby/3.4.11/cgi/cookie.rb +210 -0
- package/lib/ruby/3.4.11/cgi/core.rb +900 -0
- package/lib/ruby/3.4.11/cgi/html.rb +1035 -0
- package/lib/ruby/3.4.11/cgi/session/pstore.rb +91 -0
- package/lib/ruby/3.4.11/cgi/session.rb +562 -0
- package/lib/ruby/3.4.11/cgi/util.rb +258 -0
- package/lib/ruby/3.4.11/cgi.rb +297 -0
- package/lib/ruby/3.4.11/delegate.gemspec +29 -0
- package/lib/ruby/3.4.11/delegate.rb +444 -0
- package/lib/ruby/3.4.11/did_you_mean/core_ext/name_error.rb +57 -0
- package/lib/ruby/3.4.11/did_you_mean/did_you_mean.gemspec +25 -0
- package/lib/ruby/3.4.11/did_you_mean/experimental.rb +2 -0
- package/lib/ruby/3.4.11/did_you_mean/formatter.rb +44 -0
- package/lib/ruby/3.4.11/did_you_mean/formatters/plain_formatter.rb +4 -0
- package/lib/ruby/3.4.11/did_you_mean/formatters/verbose_formatter.rb +10 -0
- package/lib/ruby/3.4.11/did_you_mean/jaro_winkler.rb +84 -0
- package/lib/ruby/3.4.11/did_you_mean/levenshtein.rb +57 -0
- package/lib/ruby/3.4.11/did_you_mean/spell_checker.rb +46 -0
- package/lib/ruby/3.4.11/did_you_mean/spell_checkers/key_error_checker.rb +28 -0
- package/lib/ruby/3.4.11/did_you_mean/spell_checkers/method_name_checker.rb +79 -0
- package/lib/ruby/3.4.11/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb +49 -0
- package/lib/ruby/3.4.11/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb +85 -0
- package/lib/ruby/3.4.11/did_you_mean/spell_checkers/name_error_checkers.rb +20 -0
- package/lib/ruby/3.4.11/did_you_mean/spell_checkers/null_checker.rb +6 -0
- package/lib/ruby/3.4.11/did_you_mean/spell_checkers/pattern_key_name_checker.rb +28 -0
- package/lib/ruby/3.4.11/did_you_mean/spell_checkers/require_path_checker.rb +39 -0
- package/lib/ruby/3.4.11/did_you_mean/tree_spell_checker.rb +109 -0
- package/lib/ruby/3.4.11/did_you_mean/verbose.rb +2 -0
- package/lib/ruby/3.4.11/did_you_mean/version.rb +3 -0
- package/lib/ruby/3.4.11/did_you_mean.rb +131 -0
- package/lib/ruby/3.4.11/erb/compiler.rb +472 -0
- package/lib/ruby/3.4.11/erb/def_method.rb +47 -0
- package/lib/ruby/3.4.11/erb/util.rb +63 -0
- package/lib/ruby/3.4.11/erb/version.rb +5 -0
- package/lib/ruby/3.4.11/erb.gemspec +38 -0
- package/lib/ruby/3.4.11/erb.rb +509 -0
- package/lib/ruby/3.4.11/error_highlight/base.rb +830 -0
- package/lib/ruby/3.4.11/error_highlight/core_ext.rb +47 -0
- package/lib/ruby/3.4.11/error_highlight/error_highlight.gemspec +27 -0
- package/lib/ruby/3.4.11/error_highlight/formatter.rb +74 -0
- package/lib/ruby/3.4.11/error_highlight/version.rb +3 -0
- package/lib/ruby/3.4.11/error_highlight.rb +2 -0
- package/lib/ruby/3.4.11/fileutils.gemspec +31 -0
- package/lib/ruby/3.4.11/fileutils.rb +2696 -0
- package/lib/ruby/3.4.11/find.gemspec +29 -0
- package/lib/ruby/3.4.11/find.rb +90 -0
- package/lib/ruby/3.4.11/forwardable/forwardable.gemspec +26 -0
- package/lib/ruby/3.4.11/forwardable/impl.rb +17 -0
- package/lib/ruby/3.4.11/forwardable.rb +321 -0
- package/lib/ruby/3.4.11/ipaddr.gemspec +36 -0
- package/lib/ruby/3.4.11/ipaddr.rb +841 -0
- package/lib/ruby/3.4.11/irb/cmd/nop.rb +4 -0
- package/lib/ruby/3.4.11/irb/color.rb +262 -0
- package/lib/ruby/3.4.11/irb/color_printer.rb +55 -0
- package/lib/ruby/3.4.11/irb/command/backtrace.rb +17 -0
- package/lib/ruby/3.4.11/irb/command/base.rb +60 -0
- package/lib/ruby/3.4.11/irb/command/break.rb +17 -0
- package/lib/ruby/3.4.11/irb/command/catch.rb +17 -0
- package/lib/ruby/3.4.11/irb/command/cd.rb +51 -0
- package/lib/ruby/3.4.11/irb/command/chws.rb +40 -0
- package/lib/ruby/3.4.11/irb/command/context.rb +16 -0
- package/lib/ruby/3.4.11/irb/command/continue.rb +17 -0
- package/lib/ruby/3.4.11/irb/command/debug.rb +73 -0
- package/lib/ruby/3.4.11/irb/command/delete.rb +17 -0
- package/lib/ruby/3.4.11/irb/command/disable_irb.rb +19 -0
- package/lib/ruby/3.4.11/irb/command/edit.rb +63 -0
- package/lib/ruby/3.4.11/irb/command/exit.rb +18 -0
- package/lib/ruby/3.4.11/irb/command/finish.rb +17 -0
- package/lib/ruby/3.4.11/irb/command/force_exit.rb +18 -0
- package/lib/ruby/3.4.11/irb/command/help.rb +83 -0
- package/lib/ruby/3.4.11/irb/command/history.rb +45 -0
- package/lib/ruby/3.4.11/irb/command/info.rb +17 -0
- package/lib/ruby/3.4.11/irb/command/internal_helpers.rb +27 -0
- package/lib/ruby/3.4.11/irb/command/irb_info.rb +33 -0
- package/lib/ruby/3.4.11/irb/command/load.rb +91 -0
- package/lib/ruby/3.4.11/irb/command/ls.rb +167 -0
- package/lib/ruby/3.4.11/irb/command/measure.rb +49 -0
- package/lib/ruby/3.4.11/irb/command/next.rb +17 -0
- package/lib/ruby/3.4.11/irb/command/pushws.rb +65 -0
- package/lib/ruby/3.4.11/irb/command/show_doc.rb +51 -0
- package/lib/ruby/3.4.11/irb/command/show_source.rb +74 -0
- package/lib/ruby/3.4.11/irb/command/step.rb +17 -0
- package/lib/ruby/3.4.11/irb/command/subirb.rb +123 -0
- package/lib/ruby/3.4.11/irb/command/whereami.rb +23 -0
- package/lib/ruby/3.4.11/irb/command.rb +23 -0
- package/lib/ruby/3.4.11/irb/completion.rb +504 -0
- package/lib/ruby/3.4.11/irb/context.rb +716 -0
- package/lib/ruby/3.4.11/irb/debug/ui.rb +101 -0
- package/lib/ruby/3.4.11/irb/debug.rb +127 -0
- package/lib/ruby/3.4.11/irb/default_commands.rb +276 -0
- package/lib/ruby/3.4.11/irb/easter-egg.rb +152 -0
- package/lib/ruby/3.4.11/irb/ext/change-ws.rb +37 -0
- package/lib/ruby/3.4.11/irb/ext/eval_history.rb +149 -0
- package/lib/ruby/3.4.11/irb/ext/loader.rb +127 -0
- package/lib/ruby/3.4.11/irb/ext/multi-irb.rb +258 -0
- package/lib/ruby/3.4.11/irb/ext/tracer.rb +39 -0
- package/lib/ruby/3.4.11/irb/ext/use-loader.rb +67 -0
- package/lib/ruby/3.4.11/irb/ext/workspaces.rb +36 -0
- package/lib/ruby/3.4.11/irb/frame.rb +80 -0
- package/lib/ruby/3.4.11/irb/help.rb +28 -0
- package/lib/ruby/3.4.11/irb/helper_method/base.rb +16 -0
- package/lib/ruby/3.4.11/irb/helper_method/conf.rb +11 -0
- package/lib/ruby/3.4.11/irb/helper_method.rb +29 -0
- package/lib/ruby/3.4.11/irb/history.rb +112 -0
- package/lib/ruby/3.4.11/irb/init.rb +538 -0
- package/lib/ruby/3.4.11/irb/input-method.rb +515 -0
- package/lib/ruby/3.4.11/irb/inspector.rb +131 -0
- package/lib/ruby/3.4.11/irb/irb.gemspec +46 -0
- package/lib/ruby/3.4.11/irb/lc/error.rb +52 -0
- package/lib/ruby/3.4.11/irb/lc/help-message +55 -0
- package/lib/ruby/3.4.11/irb/lc/ja/error.rb +53 -0
- package/lib/ruby/3.4.11/irb/lc/ja/help-message +58 -0
- package/lib/ruby/3.4.11/irb/locale.rb +153 -0
- package/lib/ruby/3.4.11/irb/nesting_parser.rb +239 -0
- package/lib/ruby/3.4.11/irb/notifier.rb +230 -0
- package/lib/ruby/3.4.11/irb/output-method.rb +80 -0
- package/lib/ruby/3.4.11/irb/pager.rb +100 -0
- package/lib/ruby/3.4.11/irb/ruby-lex.rb +476 -0
- package/lib/ruby/3.4.11/irb/ruby_logo.aa +118 -0
- package/lib/ruby/3.4.11/irb/source_finder.rb +138 -0
- package/lib/ruby/3.4.11/irb/statement.rb +80 -0
- package/lib/ruby/3.4.11/irb/version.rb +11 -0
- package/lib/ruby/3.4.11/irb/workspace.rb +171 -0
- package/lib/ruby/3.4.11/irb/ws-for-case-2.rb +9 -0
- package/lib/ruby/3.4.11/irb/xmp.rb +164 -0
- package/lib/ruby/3.4.11/irb.rb +1593 -0
- package/lib/ruby/3.4.11/logger/errors.rb +9 -0
- package/lib/ruby/3.4.11/logger/formatter.rb +36 -0
- package/lib/ruby/3.4.11/logger/log_device.rb +236 -0
- package/lib/ruby/3.4.11/logger/logger.gemspec +22 -0
- package/lib/ruby/3.4.11/logger/period.rb +47 -0
- package/lib/ruby/3.4.11/logger/severity.rb +38 -0
- package/lib/ruby/3.4.11/logger/version.rb +5 -0
- package/lib/ruby/3.4.11/logger.rb +761 -0
- package/lib/ruby/3.4.11/mkmf.rb +3045 -0
- package/lib/ruby/3.4.11/net/http/exceptions.rb +34 -0
- package/lib/ruby/3.4.11/net/http/generic_request.rb +414 -0
- package/lib/ruby/3.4.11/net/http/header.rb +981 -0
- package/lib/ruby/3.4.11/net/http/net-http.gemspec +39 -0
- package/lib/ruby/3.4.11/net/http/proxy_delta.rb +17 -0
- package/lib/ruby/3.4.11/net/http/request.rb +88 -0
- package/lib/ruby/3.4.11/net/http/requests.rb +430 -0
- package/lib/ruby/3.4.11/net/http/response.rb +738 -0
- package/lib/ruby/3.4.11/net/http/responses.rb +1174 -0
- package/lib/ruby/3.4.11/net/http/status.rb +84 -0
- package/lib/ruby/3.4.11/net/http.rb +2574 -0
- package/lib/ruby/3.4.11/net/https.rb +23 -0
- package/lib/ruby/3.4.11/net/net-protocol.gemspec +34 -0
- package/lib/ruby/3.4.11/net/protocol.rb +544 -0
- package/lib/ruby/3.4.11/open-uri.gemspec +32 -0
- package/lib/ruby/3.4.11/open-uri.rb +895 -0
- package/lib/ruby/3.4.11/open3/open3.gemspec +33 -0
- package/lib/ruby/3.4.11/open3/version.rb +3 -0
- package/lib/ruby/3.4.11/open3.rb +1410 -0
- package/lib/ruby/3.4.11/optionparser.rb +2 -0
- package/lib/ruby/3.4.11/optparse/ac.rb +70 -0
- package/lib/ruby/3.4.11/optparse/date.rb +18 -0
- package/lib/ruby/3.4.11/optparse/kwargs.rb +27 -0
- package/lib/ruby/3.4.11/optparse/optparse.gemspec +31 -0
- package/lib/ruby/3.4.11/optparse/shellwords.rb +7 -0
- package/lib/ruby/3.4.11/optparse/time.rb +11 -0
- package/lib/ruby/3.4.11/optparse/uri.rb +7 -0
- package/lib/ruby/3.4.11/optparse/version.rb +80 -0
- package/lib/ruby/3.4.11/optparse.rb +2429 -0
- package/lib/ruby/3.4.11/ostruct.gemspec +24 -0
- package/lib/ruby/3.4.11/ostruct.rb +489 -0
- package/lib/ruby/3.4.11/pp.gemspec +35 -0
- package/lib/ruby/3.4.11/pp.rb +699 -0
- package/lib/ruby/3.4.11/prettyprint.gemspec +29 -0
- package/lib/ruby/3.4.11/prettyprint.rb +558 -0
- package/lib/ruby/3.4.11/prism/compiler.rb +801 -0
- package/lib/ruby/3.4.11/prism/desugar_compiler.rb +392 -0
- package/lib/ruby/3.4.11/prism/dispatcher.rb +2210 -0
- package/lib/ruby/3.4.11/prism/dsl.rb +1003 -0
- package/lib/ruby/3.4.11/prism/ffi.rb +570 -0
- package/lib/ruby/3.4.11/prism/inspect_visitor.rb +2392 -0
- package/lib/ruby/3.4.11/prism/lex_compat.rb +928 -0
- package/lib/ruby/3.4.11/prism/mutation_compiler.rb +772 -0
- package/lib/ruby/3.4.11/prism/node.rb +18816 -0
- package/lib/ruby/3.4.11/prism/node_ext.rb +511 -0
- package/lib/ruby/3.4.11/prism/pack.rb +230 -0
- package/lib/ruby/3.4.11/prism/parse_result/comments.rb +188 -0
- package/lib/ruby/3.4.11/prism/parse_result/errors.rb +66 -0
- package/lib/ruby/3.4.11/prism/parse_result/newlines.rb +155 -0
- package/lib/ruby/3.4.11/prism/parse_result.rb +911 -0
- package/lib/ruby/3.4.11/prism/pattern.rb +269 -0
- package/lib/ruby/3.4.11/prism/polyfill/append_as_bytes.rb +15 -0
- package/lib/ruby/3.4.11/prism/polyfill/byteindex.rb +13 -0
- package/lib/ruby/3.4.11/prism/polyfill/scan_byte.rb +14 -0
- package/lib/ruby/3.4.11/prism/polyfill/unpack1.rb +14 -0
- package/lib/ruby/3.4.11/prism/polyfill/warn.rb +36 -0
- package/lib/ruby/3.4.11/prism/prism.gemspec +174 -0
- package/lib/ruby/3.4.11/prism/reflection.rb +416 -0
- package/lib/ruby/3.4.11/prism/relocation.rb +505 -0
- package/lib/ruby/3.4.11/prism/serialize.rb +2400 -0
- package/lib/ruby/3.4.11/prism/string_query.rb +31 -0
- package/lib/ruby/3.4.11/prism/translation/parser/builder.rb +62 -0
- package/lib/ruby/3.4.11/prism/translation/parser/compiler.rb +2234 -0
- package/lib/ruby/3.4.11/prism/translation/parser/lexer.rb +820 -0
- package/lib/ruby/3.4.11/prism/translation/parser.rb +374 -0
- package/lib/ruby/3.4.11/prism/translation/parser33.rb +13 -0
- package/lib/ruby/3.4.11/prism/translation/parser34.rb +13 -0
- package/lib/ruby/3.4.11/prism/translation/parser35.rb +13 -0
- package/lib/ruby/3.4.11/prism/translation/parser_current.rb +24 -0
- package/lib/ruby/3.4.11/prism/translation/ripper/sexp.rb +126 -0
- package/lib/ruby/3.4.11/prism/translation/ripper/shim.rb +5 -0
- package/lib/ruby/3.4.11/prism/translation/ripper.rb +3474 -0
- package/lib/ruby/3.4.11/prism/translation/ruby_parser.rb +1929 -0
- package/lib/ruby/3.4.11/prism/translation.rb +16 -0
- package/lib/ruby/3.4.11/prism/visitor.rb +813 -0
- package/lib/ruby/3.4.11/prism.rb +91 -0
- package/lib/ruby/3.4.11/pstore.gemspec +32 -0
- package/lib/ruby/3.4.11/pstore.rb +736 -0
- package/lib/ruby/3.4.11/random/formatter.rb +372 -0
- package/lib/ruby/3.4.11/rdoc/.document +2 -0
- package/lib/ruby/3.4.11/rdoc/code_object/alias.rb +104 -0
- package/lib/ruby/3.4.11/rdoc/code_object/anon_class.rb +10 -0
- package/lib/ruby/3.4.11/rdoc/code_object/any_method.rb +374 -0
- package/lib/ruby/3.4.11/rdoc/code_object/attr.rb +172 -0
- package/lib/ruby/3.4.11/rdoc/code_object/class_module.rb +888 -0
- package/lib/ruby/3.4.11/rdoc/code_object/constant.rb +186 -0
- package/lib/ruby/3.4.11/rdoc/code_object/context/section.rb +175 -0
- package/lib/ruby/3.4.11/rdoc/code_object/context.rb +1222 -0
- package/lib/ruby/3.4.11/rdoc/code_object/extend.rb +9 -0
- package/lib/ruby/3.4.11/rdoc/code_object/ghost_method.rb +6 -0
- package/lib/ruby/3.4.11/rdoc/code_object/include.rb +9 -0
- package/lib/ruby/3.4.11/rdoc/code_object/meta_method.rb +6 -0
- package/lib/ruby/3.4.11/rdoc/code_object/method_attr.rb +410 -0
- package/lib/ruby/3.4.11/rdoc/code_object/mixin.rb +120 -0
- package/lib/ruby/3.4.11/rdoc/code_object/normal_class.rb +92 -0
- package/lib/ruby/3.4.11/rdoc/code_object/normal_module.rb +73 -0
- package/lib/ruby/3.4.11/rdoc/code_object/require.rb +51 -0
- package/lib/ruby/3.4.11/rdoc/code_object/single_class.rb +30 -0
- package/lib/ruby/3.4.11/rdoc/code_object/top_level.rb +273 -0
- package/lib/ruby/3.4.11/rdoc/code_object.rb +395 -0
- package/lib/ruby/3.4.11/rdoc/code_objects.rb +5 -0
- package/lib/ruby/3.4.11/rdoc/comment.rb +236 -0
- package/lib/ruby/3.4.11/rdoc/cross_reference.rb +228 -0
- package/lib/ruby/3.4.11/rdoc/encoding.rb +120 -0
- package/lib/ruby/3.4.11/rdoc/erb_partial.rb +18 -0
- package/lib/ruby/3.4.11/rdoc/erbio.rb +37 -0
- package/lib/ruby/3.4.11/rdoc/generator/darkfish.rb +812 -0
- package/lib/ruby/3.4.11/rdoc/generator/json_index.rb +284 -0
- package/lib/ruby/3.4.11/rdoc/generator/markup.rb +171 -0
- package/lib/ruby/3.4.11/rdoc/generator/pot/message_extractor.rb +68 -0
- package/lib/ruby/3.4.11/rdoc/generator/pot/po.rb +84 -0
- package/lib/ruby/3.4.11/rdoc/generator/pot/po_entry.rb +141 -0
- package/lib/ruby/3.4.11/rdoc/generator/pot.rb +94 -0
- package/lib/ruby/3.4.11/rdoc/generator/ri.rb +30 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/.document +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_footer.rhtml +5 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_head.rhtml +48 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +5 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +15 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +15 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +15 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +21 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml +11 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +32 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +6 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_search.rhtml +14 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +11 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +39 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_toggle.rhtml +3 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/class.rhtml +221 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/css/fonts.css +167 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/css/rdoc.css +683 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/add.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/arrow_up.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/brick.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bug.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/date.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/delete.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/find.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/package.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/page_green.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/plugin.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/ruby.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/tag_blue.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/transparent.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/wrench.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/zoom.png +0 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/index.rhtml +23 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/js/darkfish.js +120 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/js/search.js +110 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/page.rhtml +18 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/servlet_not_found.rhtml +20 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/servlet_root.rhtml +65 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/table_of_contents.rhtml +70 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/json_index/.document +1 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/json_index/js/navigation.js +105 -0
- package/lib/ruby/3.4.11/rdoc/generator/template/json_index/js/searcher.js +229 -0
- package/lib/ruby/3.4.11/rdoc/generator.rb +51 -0
- package/lib/ruby/3.4.11/rdoc/i18n/locale.rb +102 -0
- package/lib/ruby/3.4.11/rdoc/i18n/text.rb +126 -0
- package/lib/ruby/3.4.11/rdoc/i18n.rb +10 -0
- package/lib/ruby/3.4.11/rdoc/known_classes.rb +74 -0
- package/lib/ruby/3.4.11/rdoc/markdown/.document +1 -0
- package/lib/ruby/3.4.11/rdoc/markdown/entities.rb +2131 -0
- package/lib/ruby/3.4.11/rdoc/markdown/literals.rb +454 -0
- package/lib/ruby/3.4.11/rdoc/markdown.rb +16806 -0
- package/lib/ruby/3.4.11/rdoc/markup/attr_changer.rb +22 -0
- package/lib/ruby/3.4.11/rdoc/markup/attr_span.rb +35 -0
- package/lib/ruby/3.4.11/rdoc/markup/attribute_manager.rb +405 -0
- package/lib/ruby/3.4.11/rdoc/markup/attributes.rb +70 -0
- package/lib/ruby/3.4.11/rdoc/markup/blank_line.rb +27 -0
- package/lib/ruby/3.4.11/rdoc/markup/block_quote.rb +14 -0
- package/lib/ruby/3.4.11/rdoc/markup/document.rb +164 -0
- package/lib/ruby/3.4.11/rdoc/markup/formatter.rb +272 -0
- package/lib/ruby/3.4.11/rdoc/markup/hard_break.rb +31 -0
- package/lib/ruby/3.4.11/rdoc/markup/heading.rb +84 -0
- package/lib/ruby/3.4.11/rdoc/markup/include.rb +42 -0
- package/lib/ruby/3.4.11/rdoc/markup/indented_paragraph.rb +47 -0
- package/lib/ruby/3.4.11/rdoc/markup/list.rb +101 -0
- package/lib/ruby/3.4.11/rdoc/markup/list_item.rb +99 -0
- package/lib/ruby/3.4.11/rdoc/markup/paragraph.rb +28 -0
- package/lib/ruby/3.4.11/rdoc/markup/parser.rb +585 -0
- package/lib/ruby/3.4.11/rdoc/markup/pre_process.rb +318 -0
- package/lib/ruby/3.4.11/rdoc/markup/raw.rb +69 -0
- package/lib/ruby/3.4.11/rdoc/markup/regexp_handling.rb +40 -0
- package/lib/ruby/3.4.11/rdoc/markup/rule.rb +20 -0
- package/lib/ruby/3.4.11/rdoc/markup/table.rb +56 -0
- package/lib/ruby/3.4.11/rdoc/markup/to_ansi.rb +93 -0
- package/lib/ruby/3.4.11/rdoc/markup/to_bs.rb +102 -0
- package/lib/ruby/3.4.11/rdoc/markup/to_html.rb +462 -0
- package/lib/ruby/3.4.11/rdoc/markup/to_html_crossref.rb +226 -0
- package/lib/ruby/3.4.11/rdoc/markup/to_html_snippet.rb +287 -0
- package/lib/ruby/3.4.11/rdoc/markup/to_joined_paragraph.rb +46 -0
- package/lib/ruby/3.4.11/rdoc/markup/to_label.rb +74 -0
- package/lib/ruby/3.4.11/rdoc/markup/to_markdown.rb +191 -0
- package/lib/ruby/3.4.11/rdoc/markup/to_rdoc.rb +353 -0
- package/lib/ruby/3.4.11/rdoc/markup/to_table_of_contents.rb +88 -0
- package/lib/ruby/3.4.11/rdoc/markup/to_test.rb +69 -0
- package/lib/ruby/3.4.11/rdoc/markup/to_tt_only.rb +120 -0
- package/lib/ruby/3.4.11/rdoc/markup/verbatim.rb +83 -0
- package/lib/ruby/3.4.11/rdoc/markup.rb +240 -0
- package/lib/ruby/3.4.11/rdoc/options.rb +1416 -0
- package/lib/ruby/3.4.11/rdoc/parser/c.rb +1257 -0
- package/lib/ruby/3.4.11/rdoc/parser/changelog.rb +350 -0
- package/lib/ruby/3.4.11/rdoc/parser/markdown.rb +22 -0
- package/lib/ruby/3.4.11/rdoc/parser/prism_ruby.rb +1092 -0
- package/lib/ruby/3.4.11/rdoc/parser/rd.rb +22 -0
- package/lib/ruby/3.4.11/rdoc/parser/ripper_state_lex.rb +302 -0
- package/lib/ruby/3.4.11/rdoc/parser/ruby.rb +2378 -0
- package/lib/ruby/3.4.11/rdoc/parser/ruby_tools.rb +165 -0
- package/lib/ruby/3.4.11/rdoc/parser/simple.rb +61 -0
- package/lib/ruby/3.4.11/rdoc/parser/text.rb +11 -0
- package/lib/ruby/3.4.11/rdoc/parser.rb +297 -0
- package/lib/ruby/3.4.11/rdoc/rd/.document +1 -0
- package/lib/ruby/3.4.11/rdoc/rd/block_parser.rb +1706 -0
- package/lib/ruby/3.4.11/rdoc/rd/inline.rb +71 -0
- package/lib/ruby/3.4.11/rdoc/rd/inline_parser.rb +1854 -0
- package/lib/ruby/3.4.11/rdoc/rd.rb +99 -0
- package/lib/ruby/3.4.11/rdoc/rdoc.gemspec +68 -0
- package/lib/ruby/3.4.11/rdoc/rdoc.rb +551 -0
- package/lib/ruby/3.4.11/rdoc/ri/driver.rb +1566 -0
- package/lib/ruby/3.4.11/rdoc/ri/formatter.rb +6 -0
- package/lib/ruby/3.4.11/rdoc/ri/paths.rb +171 -0
- package/lib/ruby/3.4.11/rdoc/ri/store.rb +6 -0
- package/lib/ruby/3.4.11/rdoc/ri/task.rb +71 -0
- package/lib/ruby/3.4.11/rdoc/ri.rb +20 -0
- package/lib/ruby/3.4.11/rdoc/rubygems_hook.rb +327 -0
- package/lib/ruby/3.4.11/rdoc/servlet.rb +452 -0
- package/lib/ruby/3.4.11/rdoc/stats/normal.rb +58 -0
- package/lib/ruby/3.4.11/rdoc/stats/quiet.rb +59 -0
- package/lib/ruby/3.4.11/rdoc/stats/verbose.rb +44 -0
- package/lib/ruby/3.4.11/rdoc/stats.rb +461 -0
- package/lib/ruby/3.4.11/rdoc/store.rb +997 -0
- package/lib/ruby/3.4.11/rdoc/task.rb +354 -0
- package/lib/ruby/3.4.11/rdoc/text.rb +322 -0
- package/lib/ruby/3.4.11/rdoc/token_stream.rb +118 -0
- package/lib/ruby/3.4.11/rdoc/tom_doc.rb +257 -0
- package/lib/ruby/3.4.11/rdoc/version.rb +10 -0
- package/lib/ruby/3.4.11/rdoc.rb +211 -0
- package/lib/ruby/3.4.11/readline.gemspec +33 -0
- package/lib/ruby/3.4.11/readline.rb +7 -0
- package/lib/ruby/3.4.11/reline/config.rb +373 -0
- package/lib/ruby/3.4.11/reline/face.rb +199 -0
- package/lib/ruby/3.4.11/reline/history.rb +76 -0
- package/lib/ruby/3.4.11/reline/io/ansi.rb +325 -0
- package/lib/ruby/3.4.11/reline/io/dumb.rb +120 -0
- package/lib/ruby/3.4.11/reline/io/windows.rb +530 -0
- package/lib/ruby/3.4.11/reline/io.rb +55 -0
- package/lib/ruby/3.4.11/reline/key_actor/base.rb +37 -0
- package/lib/ruby/3.4.11/reline/key_actor/composite.rb +17 -0
- package/lib/ruby/3.4.11/reline/key_actor/emacs.rb +517 -0
- package/lib/ruby/3.4.11/reline/key_actor/vi_command.rb +518 -0
- package/lib/ruby/3.4.11/reline/key_actor/vi_insert.rb +517 -0
- package/lib/ruby/3.4.11/reline/key_actor.rb +8 -0
- package/lib/ruby/3.4.11/reline/key_stroke.rb +119 -0
- package/lib/ruby/3.4.11/reline/kill_ring.rb +125 -0
- package/lib/ruby/3.4.11/reline/line_editor.rb +2382 -0
- package/lib/ruby/3.4.11/reline/reline.gemspec +30 -0
- package/lib/ruby/3.4.11/reline/unicode/east_asian_width.rb +1267 -0
- package/lib/ruby/3.4.11/reline/unicode.rb +415 -0
- package/lib/ruby/3.4.11/reline/version.rb +3 -0
- package/lib/ruby/3.4.11/reline.rb +519 -0
- package/lib/ruby/3.4.11/resolv.gemspec +30 -0
- package/lib/ruby/3.4.11/resolv.rb +3587 -0
- package/lib/ruby/3.4.11/ruby2_keywords.gemspec +23 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/.document +1 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/assembler.rb +1160 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/block.rb +11 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/branch_stub.rb +24 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/c_pointer.rb +394 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/c_type.rb +99 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/code_block.rb +91 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/compiler.rb +518 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/context.rb +377 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/entry_stub.rb +7 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/exit_compiler.rb +164 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/hooks.rb +36 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/insn_compiler.rb +6046 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/instruction.rb +1326 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/invariants.rb +155 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/jit_state.rb +65 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/stats.rb +191 -0
- package/lib/ruby/3.4.11/ruby_vm/rjit/type.rb +221 -0
- package/lib/ruby/3.4.11/rubygems/available_set.rb +165 -0
- package/lib/ruby/3.4.11/rubygems/basic_specification.rb +383 -0
- package/lib/ruby/3.4.11/rubygems/bundler_version_finder.rb +77 -0
- package/lib/ruby/3.4.11/rubygems/ci_detector.rb +75 -0
- package/lib/ruby/3.4.11/rubygems/command.rb +664 -0
- package/lib/ruby/3.4.11/rubygems/command_manager.rb +255 -0
- package/lib/ruby/3.4.11/rubygems/commands/build_command.rb +127 -0
- package/lib/ruby/3.4.11/rubygems/commands/cert_command.rb +325 -0
- package/lib/ruby/3.4.11/rubygems/commands/check_command.rb +97 -0
- package/lib/ruby/3.4.11/rubygems/commands/cleanup_command.rb +178 -0
- package/lib/ruby/3.4.11/rubygems/commands/contents_command.rb +196 -0
- package/lib/ruby/3.4.11/rubygems/commands/dependency_command.rb +206 -0
- package/lib/ruby/3.4.11/rubygems/commands/environment_command.rb +181 -0
- package/lib/ruby/3.4.11/rubygems/commands/exec_command.rb +256 -0
- package/lib/ruby/3.4.11/rubygems/commands/fetch_command.rb +109 -0
- package/lib/ruby/3.4.11/rubygems/commands/generate_index_command.rb +51 -0
- package/lib/ruby/3.4.11/rubygems/commands/help_command.rb +375 -0
- package/lib/ruby/3.4.11/rubygems/commands/info_command.rb +38 -0
- package/lib/ruby/3.4.11/rubygems/commands/install_command.rb +269 -0
- package/lib/ruby/3.4.11/rubygems/commands/list_command.rb +42 -0
- package/lib/ruby/3.4.11/rubygems/commands/lock_command.rb +109 -0
- package/lib/ruby/3.4.11/rubygems/commands/mirror_command.rb +26 -0
- package/lib/ruby/3.4.11/rubygems/commands/open_command.rb +83 -0
- package/lib/ruby/3.4.11/rubygems/commands/outdated_command.rb +33 -0
- package/lib/ruby/3.4.11/rubygems/commands/owner_command.rb +124 -0
- package/lib/ruby/3.4.11/rubygems/commands/pristine_command.rb +217 -0
- package/lib/ruby/3.4.11/rubygems/commands/push_command.rb +135 -0
- package/lib/ruby/3.4.11/rubygems/commands/query_command.rb +43 -0
- package/lib/ruby/3.4.11/rubygems/commands/rdoc_command.rb +90 -0
- package/lib/ruby/3.4.11/rubygems/commands/rebuild_command.rb +262 -0
- package/lib/ruby/3.4.11/rubygems/commands/search_command.rb +41 -0
- package/lib/ruby/3.4.11/rubygems/commands/server_command.rb +26 -0
- package/lib/ruby/3.4.11/rubygems/commands/setup_command.rb +663 -0
- package/lib/ruby/3.4.11/rubygems/commands/signin_command.rb +34 -0
- package/lib/ruby/3.4.11/rubygems/commands/signout_command.rb +32 -0
- package/lib/ruby/3.4.11/rubygems/commands/sources_command.rb +227 -0
- package/lib/ruby/3.4.11/rubygems/commands/specification_command.rb +156 -0
- package/lib/ruby/3.4.11/rubygems/commands/stale_command.rb +40 -0
- package/lib/ruby/3.4.11/rubygems/commands/uninstall_command.rb +204 -0
- package/lib/ruby/3.4.11/rubygems/commands/unpack_command.rb +168 -0
- package/lib/ruby/3.4.11/rubygems/commands/update_command.rb +326 -0
- package/lib/ruby/3.4.11/rubygems/commands/which_command.rb +88 -0
- package/lib/ruby/3.4.11/rubygems/commands/yank_command.rb +99 -0
- package/lib/ruby/3.4.11/rubygems/compatibility.rb +41 -0
- package/lib/ruby/3.4.11/rubygems/config_file.rb +618 -0
- package/lib/ruby/3.4.11/rubygems/core_ext/kernel_gem.rb +68 -0
- package/lib/ruby/3.4.11/rubygems/core_ext/kernel_require.rb +149 -0
- package/lib/ruby/3.4.11/rubygems/core_ext/kernel_warn.rb +45 -0
- package/lib/ruby/3.4.11/rubygems/core_ext/tcpsocket_init.rb +54 -0
- package/lib/ruby/3.4.11/rubygems/defaults.rb +308 -0
- package/lib/ruby/3.4.11/rubygems/dependency.rb +348 -0
- package/lib/ruby/3.4.11/rubygems/dependency_installer.rb +335 -0
- package/lib/ruby/3.4.11/rubygems/dependency_list.rb +243 -0
- package/lib/ruby/3.4.11/rubygems/deprecate.rb +169 -0
- package/lib/ruby/3.4.11/rubygems/doctor.rb +132 -0
- package/lib/ruby/3.4.11/rubygems/errors.rb +177 -0
- package/lib/ruby/3.4.11/rubygems/exceptions.rb +293 -0
- package/lib/ruby/3.4.11/rubygems/ext/build_error.rb +9 -0
- package/lib/ruby/3.4.11/rubygems/ext/builder.rb +260 -0
- package/lib/ruby/3.4.11/rubygems/ext/cargo_builder/link_flag_converter.rb +27 -0
- package/lib/ruby/3.4.11/rubygems/ext/cargo_builder.rb +346 -0
- package/lib/ruby/3.4.11/rubygems/ext/cmake_builder.rb +21 -0
- package/lib/ruby/3.4.11/rubygems/ext/configure_builder.rb +26 -0
- package/lib/ruby/3.4.11/rubygems/ext/ext_conf_builder.rb +77 -0
- package/lib/ruby/3.4.11/rubygems/ext/rake_builder.rb +37 -0
- package/lib/ruby/3.4.11/rubygems/ext.rb +20 -0
- package/lib/ruby/3.4.11/rubygems/gem_runner.rb +89 -0
- package/lib/ruby/3.4.11/rubygems/gemcutter_utilities/webauthn_listener/response.rb +163 -0
- package/lib/ruby/3.4.11/rubygems/gemcutter_utilities/webauthn_listener.rb +105 -0
- package/lib/ruby/3.4.11/rubygems/gemcutter_utilities/webauthn_poller.rb +80 -0
- package/lib/ruby/3.4.11/rubygems/gemcutter_utilities.rb +397 -0
- package/lib/ruby/3.4.11/rubygems/gemspec_helpers.rb +19 -0
- package/lib/ruby/3.4.11/rubygems/install_default_message.rb +13 -0
- package/lib/ruby/3.4.11/rubygems/install_message.rb +13 -0
- package/lib/ruby/3.4.11/rubygems/install_update_options.rb +204 -0
- package/lib/ruby/3.4.11/rubygems/installer.rb +1031 -0
- package/lib/ruby/3.4.11/rubygems/installer_uninstaller_utils.rb +27 -0
- package/lib/ruby/3.4.11/rubygems/local_remote_options.rb +146 -0
- package/lib/ruby/3.4.11/rubygems/name_tuple.rb +119 -0
- package/lib/ruby/3.4.11/rubygems/openssl.rb +7 -0
- package/lib/ruby/3.4.11/rubygems/package/digest_io.rb +63 -0
- package/lib/ruby/3.4.11/rubygems/package/file_source.rb +32 -0
- package/lib/ruby/3.4.11/rubygems/package/io_source.rb +48 -0
- package/lib/ruby/3.4.11/rubygems/package/old.rb +169 -0
- package/lib/ruby/3.4.11/rubygems/package/source.rb +4 -0
- package/lib/ruby/3.4.11/rubygems/package/tar_header.rb +277 -0
- package/lib/ruby/3.4.11/rubygems/package/tar_reader/entry.rb +244 -0
- package/lib/ruby/3.4.11/rubygems/package/tar_reader.rb +101 -0
- package/lib/ruby/3.4.11/rubygems/package/tar_writer.rb +332 -0
- package/lib/ruby/3.4.11/rubygems/package.rb +742 -0
- package/lib/ruby/3.4.11/rubygems/package_task.rb +123 -0
- package/lib/ruby/3.4.11/rubygems/path_support.rb +85 -0
- package/lib/ruby/3.4.11/rubygems/platform.rb +269 -0
- package/lib/ruby/3.4.11/rubygems/psych_tree.rb +37 -0
- package/lib/ruby/3.4.11/rubygems/query_utils.rb +349 -0
- package/lib/ruby/3.4.11/rubygems/rdoc.rb +26 -0
- package/lib/ruby/3.4.11/rubygems/remote_fetcher.rb +341 -0
- package/lib/ruby/3.4.11/rubygems/request/connection_pools.rb +95 -0
- package/lib/ruby/3.4.11/rubygems/request/http_pool.rb +47 -0
- package/lib/ruby/3.4.11/rubygems/request/https_pool.rb +10 -0
- package/lib/ruby/3.4.11/rubygems/request.rb +298 -0
- package/lib/ruby/3.4.11/rubygems/request_set/gem_dependency_api.rb +841 -0
- package/lib/ruby/3.4.11/rubygems/request_set/lockfile/parser.rb +344 -0
- package/lib/ruby/3.4.11/rubygems/request_set/lockfile/tokenizer.rb +122 -0
- package/lib/ruby/3.4.11/rubygems/request_set/lockfile.rb +235 -0
- package/lib/ruby/3.4.11/rubygems/request_set.rb +468 -0
- package/lib/ruby/3.4.11/rubygems/requirement.rb +298 -0
- package/lib/ruby/3.4.11/rubygems/resolver/activation_request.rb +159 -0
- package/lib/ruby/3.4.11/rubygems/resolver/api_set/gem_parser.rb +21 -0
- package/lib/ruby/3.4.11/rubygems/resolver/api_set.rb +139 -0
- package/lib/ruby/3.4.11/rubygems/resolver/api_specification.rb +105 -0
- package/lib/ruby/3.4.11/rubygems/resolver/best_set.rb +49 -0
- package/lib/ruby/3.4.11/rubygems/resolver/composed_set.rb +65 -0
- package/lib/ruby/3.4.11/rubygems/resolver/conflict.rb +146 -0
- package/lib/ruby/3.4.11/rubygems/resolver/current_set.rb +12 -0
- package/lib/ruby/3.4.11/rubygems/resolver/dependency_request.rb +119 -0
- package/lib/ruby/3.4.11/rubygems/resolver/git_set.rb +120 -0
- package/lib/ruby/3.4.11/rubygems/resolver/git_specification.rb +57 -0
- package/lib/ruby/3.4.11/rubygems/resolver/index_set.rb +79 -0
- package/lib/ruby/3.4.11/rubygems/resolver/index_specification.rb +101 -0
- package/lib/ruby/3.4.11/rubygems/resolver/installed_specification.rb +57 -0
- package/lib/ruby/3.4.11/rubygems/resolver/installer_set.rb +271 -0
- package/lib/ruby/3.4.11/rubygems/resolver/local_specification.rb +40 -0
- package/lib/ruby/3.4.11/rubygems/resolver/lock_set.rb +81 -0
- package/lib/ruby/3.4.11/rubygems/resolver/lock_specification.rb +86 -0
- package/lib/ruby/3.4.11/rubygems/resolver/requirement_list.rb +82 -0
- package/lib/ruby/3.4.11/rubygems/resolver/set.rb +55 -0
- package/lib/ruby/3.4.11/rubygems/resolver/source_set.rb +47 -0
- package/lib/ruby/3.4.11/rubygems/resolver/spec_specification.rb +76 -0
- package/lib/ruby/3.4.11/rubygems/resolver/specification.rb +126 -0
- package/lib/ruby/3.4.11/rubygems/resolver/stats.rb +46 -0
- package/lib/ruby/3.4.11/rubygems/resolver/vendor_set.rb +86 -0
- package/lib/ruby/3.4.11/rubygems/resolver/vendor_specification.rb +23 -0
- package/lib/ruby/3.4.11/rubygems/resolver.rb +341 -0
- package/lib/ruby/3.4.11/rubygems/s3_uri_signer.rb +177 -0
- package/lib/ruby/3.4.11/rubygems/safe_marshal/elements.rb +146 -0
- package/lib/ruby/3.4.11/rubygems/safe_marshal/reader.rb +325 -0
- package/lib/ruby/3.4.11/rubygems/safe_marshal/visitors/stream_printer.rb +31 -0
- package/lib/ruby/3.4.11/rubygems/safe_marshal/visitors/to_ruby.rb +428 -0
- package/lib/ruby/3.4.11/rubygems/safe_marshal/visitors/visitor.rb +74 -0
- package/lib/ruby/3.4.11/rubygems/safe_marshal.rb +74 -0
- package/lib/ruby/3.4.11/rubygems/safe_yaml.rb +45 -0
- package/lib/ruby/3.4.11/rubygems/security/policies.rb +114 -0
- package/lib/ruby/3.4.11/rubygems/security/policy.rb +288 -0
- package/lib/ruby/3.4.11/rubygems/security/signer.rb +212 -0
- package/lib/ruby/3.4.11/rubygems/security/trust_dir.rb +117 -0
- package/lib/ruby/3.4.11/rubygems/security.rb +615 -0
- package/lib/ruby/3.4.11/rubygems/security_option.rb +43 -0
- package/lib/ruby/3.4.11/rubygems/source/git.rb +244 -0
- package/lib/ruby/3.4.11/rubygems/source/installed.rb +39 -0
- package/lib/ruby/3.4.11/rubygems/source/local.rb +131 -0
- package/lib/ruby/3.4.11/rubygems/source/lock.rb +49 -0
- package/lib/ruby/3.4.11/rubygems/source/specific_file.rb +73 -0
- package/lib/ruby/3.4.11/rubygems/source/vendor.rb +24 -0
- package/lib/ruby/3.4.11/rubygems/source.rb +247 -0
- package/lib/ruby/3.4.11/rubygems/source_list.rb +146 -0
- package/lib/ruby/3.4.11/rubygems/spec_fetcher.rb +290 -0
- package/lib/ruby/3.4.11/rubygems/specification.rb +2666 -0
- package/lib/ruby/3.4.11/rubygems/specification_policy.rb +558 -0
- package/lib/ruby/3.4.11/rubygems/specification_record.rb +212 -0
- package/lib/ruby/3.4.11/rubygems/ssl_certs/.document +1 -0
- package/lib/ruby/3.4.11/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem +21 -0
- package/lib/ruby/3.4.11/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem +21 -0
- package/lib/ruby/3.4.11/rubygems/stub_specification.rb +235 -0
- package/lib/ruby/3.4.11/rubygems/target_rbconfig.rb +50 -0
- package/lib/ruby/3.4.11/rubygems/text.rb +85 -0
- package/lib/ruby/3.4.11/rubygems/uninstaller.rb +429 -0
- package/lib/ruby/3.4.11/rubygems/unknown_command_spell_checker.rb +21 -0
- package/lib/ruby/3.4.11/rubygems/update_suggestion.rb +56 -0
- package/lib/ruby/3.4.11/rubygems/uri.rb +126 -0
- package/lib/ruby/3.4.11/rubygems/uri_formatter.rb +47 -0
- package/lib/ruby/3.4.11/rubygems/user_interaction.rb +650 -0
- package/lib/ruby/3.4.11/rubygems/util/licenses.rb +834 -0
- package/lib/ruby/3.4.11/rubygems/util/list.rb +40 -0
- package/lib/ruby/3.4.11/rubygems/util.rb +118 -0
- package/lib/ruby/3.4.11/rubygems/validator.rb +144 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/.document +1 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +57 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +88 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +36 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +66 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +62 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +63 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +61 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +126 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +46 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +36 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +164 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph.rb +255 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/errors.rb +149 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb +6 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +112 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/modules/ui.rb +67 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/resolution.rb +839 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/resolver.rb +46 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/state.rb +58 -0
- package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo.rb +11 -0
- package/lib/ruby/3.4.11/rubygems/vendor/net-http/.document +1 -0
- package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/exceptions.rb +34 -0
- package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/generic_request.rb +414 -0
- package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/header.rb +981 -0
- package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/proxy_delta.rb +17 -0
- package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/request.rb +88 -0
- package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/requests.rb +430 -0
- package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/response.rb +738 -0
- package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/responses.rb +1174 -0
- package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/status.rb +84 -0
- package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http.rb +2580 -0
- package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/https.rb +23 -0
- package/lib/ruby/3.4.11/rubygems/vendor/net-protocol/.document +1 -0
- package/lib/ruby/3.4.11/rubygems/vendor/net-protocol/lib/net/protocol.rb +544 -0
- package/lib/ruby/3.4.11/rubygems/vendor/optparse/.document +1 -0
- package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optionparser.rb +2 -0
- package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/ac.rb +70 -0
- package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/date.rb +18 -0
- package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/kwargs.rb +27 -0
- package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/shellwords.rb +7 -0
- package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/time.rb +11 -0
- package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/uri.rb +7 -0
- package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/version.rb +80 -0
- package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse.rb +2426 -0
- package/lib/ruby/3.4.11/rubygems/vendor/resolv/.document +1 -0
- package/lib/ruby/3.4.11/rubygems/vendor/resolv/lib/resolv.rb +3455 -0
- package/lib/ruby/3.4.11/rubygems/vendor/securerandom/.document +1 -0
- package/lib/ruby/3.4.11/rubygems/vendor/securerandom/lib/securerandom.rb +102 -0
- package/lib/ruby/3.4.11/rubygems/vendor/timeout/.document +1 -0
- package/lib/ruby/3.4.11/rubygems/vendor/timeout/lib/timeout.rb +198 -0
- package/lib/ruby/3.4.11/rubygems/vendor/tsort/.document +1 -0
- package/lib/ruby/3.4.11/rubygems/vendor/tsort/lib/tsort.rb +455 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/.document +1 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/common.rb +880 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/file.rb +100 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ftp.rb +267 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/generic.rb +1592 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/http.rb +125 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/https.rb +23 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ldap.rb +261 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ldaps.rb +22 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/mailto.rb +293 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +546 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb +206 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/version.rb +6 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ws.rb +83 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/wss.rb +23 -0
- package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri.rb +104 -0
- package/lib/ruby/3.4.11/rubygems/vendored_molinillo.rb +3 -0
- package/lib/ruby/3.4.11/rubygems/vendored_net_http.rb +5 -0
- package/lib/ruby/3.4.11/rubygems/vendored_optparse.rb +3 -0
- package/lib/ruby/3.4.11/rubygems/vendored_securerandom.rb +3 -0
- package/lib/ruby/3.4.11/rubygems/vendored_timeout.rb +5 -0
- package/lib/ruby/3.4.11/rubygems/vendored_tsort.rb +3 -0
- package/lib/ruby/3.4.11/rubygems/version.rb +441 -0
- package/lib/ruby/3.4.11/rubygems/version_option.rb +80 -0
- package/lib/ruby/3.4.11/rubygems/yaml_serializer.rb +98 -0
- package/lib/ruby/3.4.11/rubygems.rb +1417 -0
- package/lib/ruby/3.4.11/securerandom.gemspec +34 -0
- package/lib/ruby/3.4.11/securerandom.rb +102 -0
- package/lib/ruby/3.4.11/set/set.gemspec +30 -0
- package/lib/ruby/3.4.11/set/sorted_set.rb +6 -0
- package/lib/ruby/3.4.11/set.rb +855 -0
- package/lib/ruby/3.4.11/shellwords.gemspec +31 -0
- package/lib/ruby/3.4.11/shellwords.rb +254 -0
- package/lib/ruby/3.4.11/singleton.gemspec +30 -0
- package/lib/ruby/3.4.11/singleton.rb +239 -0
- package/lib/ruby/3.4.11/syntax_suggest/api.rb +233 -0
- package/lib/ruby/3.4.11/syntax_suggest/around_block_scan.rb +232 -0
- package/lib/ruby/3.4.11/syntax_suggest/block_expand.rb +165 -0
- package/lib/ruby/3.4.11/syntax_suggest/capture/before_after_keyword_ends.rb +85 -0
- package/lib/ruby/3.4.11/syntax_suggest/capture/falling_indent_lines.rb +71 -0
- package/lib/ruby/3.4.11/syntax_suggest/capture_code_context.rb +245 -0
- package/lib/ruby/3.4.11/syntax_suggest/clean_document.rb +306 -0
- package/lib/ruby/3.4.11/syntax_suggest/cli.rb +130 -0
- package/lib/ruby/3.4.11/syntax_suggest/code_block.rb +100 -0
- package/lib/ruby/3.4.11/syntax_suggest/code_frontier.rb +178 -0
- package/lib/ruby/3.4.11/syntax_suggest/code_line.rb +243 -0
- package/lib/ruby/3.4.11/syntax_suggest/code_search.rb +139 -0
- package/lib/ruby/3.4.11/syntax_suggest/core_ext.rb +96 -0
- package/lib/ruby/3.4.11/syntax_suggest/display_code_with_line_numbers.rb +70 -0
- package/lib/ruby/3.4.11/syntax_suggest/display_invalid_blocks.rb +83 -0
- package/lib/ruby/3.4.11/syntax_suggest/explain_syntax.rb +117 -0
- package/lib/ruby/3.4.11/syntax_suggest/left_right_lex_count.rb +168 -0
- package/lib/ruby/3.4.11/syntax_suggest/lex_all.rb +74 -0
- package/lib/ruby/3.4.11/syntax_suggest/lex_value.rb +70 -0
- package/lib/ruby/3.4.11/syntax_suggest/mini_stringio.rb +30 -0
- package/lib/ruby/3.4.11/syntax_suggest/parse_blocks_from_indent_line.rb +60 -0
- package/lib/ruby/3.4.11/syntax_suggest/pathname_from_message.rb +59 -0
- package/lib/ruby/3.4.11/syntax_suggest/priority_engulf_queue.rb +63 -0
- package/lib/ruby/3.4.11/syntax_suggest/priority_queue.rb +105 -0
- package/lib/ruby/3.4.11/syntax_suggest/ripper_errors.rb +39 -0
- package/lib/ruby/3.4.11/syntax_suggest/scan_history.rb +134 -0
- package/lib/ruby/3.4.11/syntax_suggest/syntax_suggest.gemspec +32 -0
- package/lib/ruby/3.4.11/syntax_suggest/unvisited_lines.rb +36 -0
- package/lib/ruby/3.4.11/syntax_suggest/version.rb +5 -0
- package/lib/ruby/3.4.11/syntax_suggest.rb +3 -0
- package/lib/ruby/3.4.11/tempfile.gemspec +33 -0
- package/lib/ruby/3.4.11/tempfile.rb +640 -0
- package/lib/ruby/3.4.11/time.gemspec +35 -0
- package/lib/ruby/3.4.11/time.rb +731 -0
- package/lib/ruby/3.4.11/timeout.gemspec +33 -0
- package/lib/ruby/3.4.11/timeout.rb +200 -0
- package/lib/ruby/3.4.11/tmpdir.gemspec +30 -0
- package/lib/ruby/3.4.11/tmpdir.rb +189 -0
- package/lib/ruby/3.4.11/tsort.gemspec +29 -0
- package/lib/ruby/3.4.11/tsort.rb +455 -0
- package/lib/ruby/3.4.11/un.gemspec +31 -0
- package/lib/ruby/3.4.11/un.rb +441 -0
- package/lib/ruby/3.4.11/unicode_normalize/normalize.rb +181 -0
- package/lib/ruby/3.4.11/unicode_normalize/tables.rb +9259 -0
- package/lib/ruby/3.4.11/uri/common.rb +880 -0
- package/lib/ruby/3.4.11/uri/file.rb +100 -0
- package/lib/ruby/3.4.11/uri/ftp.rb +267 -0
- package/lib/ruby/3.4.11/uri/generic.rb +1592 -0
- package/lib/ruby/3.4.11/uri/http.rb +125 -0
- package/lib/ruby/3.4.11/uri/https.rb +23 -0
- package/lib/ruby/3.4.11/uri/ldap.rb +261 -0
- package/lib/ruby/3.4.11/uri/ldaps.rb +22 -0
- package/lib/ruby/3.4.11/uri/mailto.rb +293 -0
- package/lib/ruby/3.4.11/uri/rfc2396_parser.rb +546 -0
- package/lib/ruby/3.4.11/uri/rfc3986_parser.rb +206 -0
- package/lib/ruby/3.4.11/uri/uri.gemspec +42 -0
- package/lib/ruby/3.4.11/uri/version.rb +6 -0
- package/lib/ruby/3.4.11/uri/ws.rb +83 -0
- package/lib/ruby/3.4.11/uri/wss.rb +23 -0
- package/lib/ruby/3.4.11/uri.rb +104 -0
- package/lib/ruby/3.4.11/weakref.gemspec +34 -0
- package/lib/ruby/3.4.11/weakref.rb +58 -0
- package/lib/ruby/3.4.11/yaml/dbm.rb +295 -0
- package/lib/ruby/3.4.11/yaml/store.rb +98 -0
- package/lib/ruby/3.4.11/yaml/yaml.gemspec +30 -0
- package/lib/ruby/3.4.11/yaml.rb +70 -0
- package/lib/ruby/gems/3.4.0/cache/abbrev-0.1.2.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/base64-0.2.0.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/csv-3.3.2.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/drb-2.2.1.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/getoptlong-0.2.1.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/matrix-0.4.2.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/minitest-5.25.4.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/mutex_m-0.3.0.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/net-ftp-0.3.8.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/net-imap-0.5.15.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/net-pop-0.1.2.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/net-smtp-0.5.1.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/observer-0.1.2.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/power_assert-2.0.5.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/prime-0.1.3.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/rake-13.2.1.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/repl_type_completor-0.1.9.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/resolv-replace-0.1.1.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/rexml-3.4.4.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/rinda-0.2.0.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/rss-0.3.1.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/test-unit-3.6.7.gem +0 -0
- package/lib/ruby/gems/3.4.0/cache/typeprof-0.30.1.gem +0 -0
- package/lib/ruby/gems/3.4.0/gems/abbrev-0.1.2/bin/console +0 -0
- package/lib/ruby/gems/3.4.0/gems/abbrev-0.1.2/bin/setup +0 -0
- package/lib/ruby/gems/3.4.0/gems/bundler-2.6.9/exe/bundle +29 -0
- package/lib/ruby/gems/3.4.0/gems/bundler-2.6.9/exe/bundler +4 -0
- package/lib/ruby/gems/3.4.0/gems/erb-4.0.4.1/libexec/erb +164 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/bin/console +0 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/bin/setup +0 -0
- package/lib/ruby/gems/3.4.0/gems/irb-1.14.3/exe/irb +9 -0
- package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/bin/console +0 -0
- package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/bin/setup +0 -0
- package/lib/ruby/gems/3.4.0/gems/rdoc-6.14.0/exe/rdoc +43 -0
- package/lib/ruby/gems/3.4.0/gems/rdoc-6.14.0/exe/ri +12 -0
- package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/bin/console +0 -0
- package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/bin/setup +0 -0
- package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/bin/console +0 -0
- package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/bin/setup +0 -0
- package/lib/ruby/gems/3.4.0/gems/syntax_suggest-2.0.3/exe/syntax_suggest +7 -0
- package/lib/ruby/gems/3.4.0/specifications/abbrev-0.1.2.gemspec +5 -4
- package/lib/ruby/gems/3.4.0/specifications/base64-0.2.0.gemspec +4 -3
- package/lib/ruby/gems/3.4.0/specifications/csv-3.3.2.gemspec +5 -3
- package/lib/ruby/gems/3.4.0/specifications/default/benchmark-0.4.0.gemspec +22 -0
- package/lib/ruby/gems/3.4.0/specifications/default/bundler-2.6.9.gemspec +23 -0
- package/lib/ruby/gems/3.4.0/specifications/default/cgi-0.4.2.gemspec +23 -0
- package/lib/ruby/gems/3.4.0/specifications/default/date-3.4.1.gemspec +23 -0
- package/lib/ruby/gems/3.4.0/specifications/default/delegate-0.4.0.gemspec +21 -0
- package/lib/ruby/gems/3.4.0/specifications/default/did_you_mean-2.0.0.gemspec +20 -0
- package/lib/ruby/gems/3.4.0/specifications/default/digest-3.2.0.gemspec +22 -0
- package/lib/ruby/gems/3.4.0/specifications/default/english-0.8.0.gemspec +21 -0
- package/lib/ruby/gems/3.4.0/specifications/default/erb-4.0.4.1.gemspec +29 -0
- package/lib/ruby/gems/3.4.0/specifications/default/error_highlight-0.7.0.gemspec +20 -0
- package/lib/ruby/gems/3.4.0/specifications/default/etc-1.4.6.gemspec +25 -0
- package/lib/ruby/gems/3.4.0/specifications/default/fcntl-1.2.0.gemspec +24 -0
- package/lib/ruby/gems/3.4.0/specifications/default/fileutils-1.7.3.gemspec +21 -0
- package/lib/ruby/gems/3.4.0/specifications/default/find-0.2.0.gemspec +21 -0
- package/lib/ruby/gems/3.4.0/specifications/default/forwardable-1.3.3.gemspec +21 -0
- package/lib/ruby/gems/3.4.0/specifications/default/io-console-0.8.1.gemspec +23 -0
- package/lib/ruby/gems/3.4.0/specifications/default/io-nonblock-0.3.2.gemspec +23 -0
- package/lib/ruby/gems/3.4.0/specifications/default/io-wait-0.3.2.gemspec +24 -0
- package/lib/ruby/gems/3.4.0/specifications/default/ipaddr-1.2.7.gemspec +20 -0
- package/lib/ruby/gems/3.4.0/specifications/default/irb-1.14.3.gemspec +28 -0
- package/lib/ruby/gems/3.4.0/specifications/default/json-2.9.1.gemspec +23 -0
- package/lib/ruby/gems/3.4.0/specifications/default/logger-1.6.4.gemspec +20 -0
- package/lib/ruby/gems/3.4.0/specifications/default/net-http-0.6.0.gemspec +26 -0
- package/lib/ruby/gems/3.4.0/specifications/default/net-protocol-0.2.2.gemspec +25 -0
- package/lib/ruby/gems/3.4.0/specifications/default/open-uri-0.5.0.gemspec +27 -0
- package/lib/ruby/gems/3.4.0/specifications/default/open3-0.2.1.gemspec +22 -0
- package/lib/ruby/gems/3.4.0/specifications/default/openssl-3.3.3.gemspec +24 -0
- package/lib/ruby/gems/3.4.0/specifications/default/optparse-0.6.0.gemspec +23 -0
- package/lib/ruby/gems/3.4.0/specifications/default/ostruct-0.6.1.gemspec +20 -0
- package/lib/ruby/gems/3.4.0/specifications/default/pathname-0.4.0.gemspec +24 -0
- package/lib/ruby/gems/3.4.0/specifications/default/pp-0.6.2.gemspec +26 -0
- package/lib/ruby/gems/3.4.0/specifications/default/prettyprint-0.2.0.gemspec +22 -0
- package/lib/ruby/gems/3.4.0/specifications/default/prism-1.5.3.gemspec +22 -0
- package/lib/ruby/gems/3.4.0/specifications/default/pstore-0.2.1.gemspec +21 -0
- package/lib/ruby/gems/3.4.0/specifications/default/psych-5.2.2.gemspec +30 -0
- package/lib/ruby/gems/3.4.0/specifications/default/rdoc-6.14.0.gemspec +30 -0
- package/lib/ruby/gems/3.4.0/specifications/default/readline-0.0.4.gemspec +23 -0
- package/lib/ruby/gems/3.4.0/specifications/default/reline-0.6.0.gemspec +25 -0
- package/lib/ruby/gems/3.4.0/specifications/default/resolv-0.7.2.gemspec +24 -0
- package/lib/ruby/gems/3.4.0/specifications/default/ruby2_keywords-0.0.5.gemspec +20 -0
- package/lib/ruby/gems/3.4.0/specifications/default/securerandom-0.4.1.gemspec +22 -0
- package/lib/ruby/gems/3.4.0/specifications/default/set-1.1.1.gemspec +21 -0
- package/lib/ruby/gems/3.4.0/specifications/default/shellwords-0.2.2.gemspec +22 -0
- package/lib/ruby/gems/3.4.0/specifications/default/singleton-0.3.0.gemspec +21 -0
- package/lib/ruby/gems/3.4.0/specifications/default/stringio-3.1.2.gemspec +23 -0
- package/lib/ruby/gems/3.4.0/specifications/default/strscan-3.1.2.gemspec +24 -0
- package/lib/ruby/gems/3.4.0/specifications/default/syntax_suggest-2.0.3.gemspec +23 -0
- package/lib/ruby/gems/3.4.0/specifications/default/tempfile-0.3.1.gemspec +21 -0
- package/lib/ruby/gems/3.4.0/specifications/default/time-0.4.1.gemspec +26 -0
- package/lib/ruby/gems/3.4.0/specifications/default/timeout-0.4.3.gemspec +21 -0
- package/lib/ruby/gems/3.4.0/specifications/default/tmpdir-0.3.1.gemspec +26 -0
- package/lib/ruby/gems/3.4.0/specifications/default/tsort-0.2.0.gemspec +22 -0
- package/lib/ruby/gems/3.4.0/specifications/default/un-0.3.0.gemspec +22 -0
- package/lib/ruby/gems/3.4.0/specifications/default/uri-1.0.4.gemspec +22 -0
- package/lib/ruby/gems/3.4.0/specifications/default/weakref-0.1.3.gemspec +25 -0
- package/lib/ruby/gems/3.4.0/specifications/default/yaml-0.4.0.gemspec +21 -0
- package/lib/ruby/gems/3.4.0/specifications/default/zlib-3.2.3.gemspec +23 -0
- package/lib/ruby/gems/3.4.0/specifications/drb-2.2.1.gemspec +5 -4
- package/lib/ruby/gems/3.4.0/specifications/getoptlong-0.2.1.gemspec +5 -4
- package/lib/ruby/gems/3.4.0/specifications/matrix-0.4.2.gemspec +5 -4
- package/lib/ruby/gems/3.4.0/specifications/minitest-5.25.4.gemspec +7 -5
- package/lib/ruby/gems/3.4.0/specifications/mutex_m-0.3.0.gemspec +4 -3
- package/lib/ruby/gems/3.4.0/specifications/net-ftp-0.3.8.gemspec +10 -4
- package/lib/ruby/gems/3.4.0/specifications/net-imap-0.5.15.gemspec +7 -5
- package/lib/ruby/gems/3.4.0/specifications/net-pop-0.1.2.gemspec +9 -4
- package/lib/ruby/gems/3.4.0/specifications/net-smtp-0.5.1.gemspec +9 -4
- package/lib/ruby/gems/3.4.0/specifications/observer-0.1.2.gemspec +5 -4
- package/lib/ruby/gems/3.4.0/specifications/power_assert-2.0.5.gemspec +6 -4
- package/lib/ruby/gems/3.4.0/specifications/prime-0.1.3.gemspec +10 -4
- package/lib/ruby/gems/3.4.0/specifications/rake-13.2.1.gemspec +6 -4
- package/lib/ruby/gems/3.4.0/specifications/repl_type_completor-0.1.9.gemspec +6 -5
- package/lib/ruby/gems/3.4.0/specifications/resolv-replace-0.1.1.gemspec +6 -5
- package/lib/ruby/gems/3.4.0/specifications/rexml-3.4.4.gemspec +5 -3
- package/lib/ruby/gems/3.4.0/specifications/rinda-0.2.0.gemspec +8 -5
- package/lib/ruby/gems/3.4.0/specifications/rss-0.3.1.gemspec +5 -4
- package/lib/ruby/gems/3.4.0/specifications/test-unit-3.6.7.gemspec +5 -4
- package/lib/ruby/gems/3.4.0/specifications/typeprof-0.30.1.gemspec +7 -5
- package/package.json +17 -13
- package/lib/ruby/3.4.0/expect.rb +0 -71
- package/lib/ruby/gems/3.4.0/gems/abbrev-0.1.2/abbrev.gemspec +0 -29
- package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/.bundled.bigdecimal-3.1.8.gemspec +0 -23
- package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/LICENSE +0 -56
- package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/bigdecimal-3.1.8.gemspec +0 -23
- package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/bigdecimal.gemspec +0 -50
- package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/lib/bigdecimal/jacobian.rb +0 -90
- package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/lib/bigdecimal/ludcmp.rb +0 -89
- package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/lib/bigdecimal/math.rb +0 -232
- package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/lib/bigdecimal/newton.rb +0 -80
- package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/lib/bigdecimal/util.rb +0 -185
- package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/lib/bigdecimal.rb +0 -5
- package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/sample/linear.rb +0 -74
- package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/sample/nlsolve.rb +0 -40
- package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/sample/pi.rb +0 -21
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/.bundled.debug-1.11.0.gemspec +0 -25
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/CONTRIBUTING.md +0 -573
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/Gemfile +0 -10
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/LICENSE.txt +0 -22
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/README.md +0 -996
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/Rakefile +0 -57
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/TODO.md +0 -23
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/debug-1.11.0.gemspec +0 -30
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/debug.gemspec +0 -33
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/exe/rdbg +0 -53
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/abbrev_command.rb +0 -77
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/breakpoint.rb +0 -556
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/client.rb +0 -263
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/color.rb +0 -123
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/config.rb +0 -592
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/console.rb +0 -224
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/dap_custom/traceInspector.rb +0 -336
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/frame_info.rb +0 -190
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/irb_integration.rb +0 -37
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/local.rb +0 -115
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/open.rb +0 -13
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/open_nonstop.rb +0 -15
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/prelude.rb +0 -50
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/server.rb +0 -534
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/server_cdp.rb +0 -1348
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/server_dap.rb +0 -1108
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/session.rb +0 -2667
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/source_repository.rb +0 -150
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/start.rb +0 -5
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/thread_client.rb +0 -1457
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/tracer.rb +0 -241
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug/version.rb +0 -5
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/lib/debug.rb +0 -9
- package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/misc/README.md.erb +0 -660
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/drb.gemspec +0 -41
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/getoptlong.gemspec +0 -30
- package/lib/ruby/gems/3.4.0/gems/matrix-0.4.2/matrix.gemspec +0 -26
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/.autotest +0 -34
- package/lib/ruby/gems/3.4.0/gems/net-ftp-0.3.8/net-ftp.gemspec +0 -34
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/net-imap.gemspec +0 -38
- package/lib/ruby/gems/3.4.0/gems/net-pop-0.1.2/net-pop.gemspec +0 -32
- package/lib/ruby/gems/3.4.0/gems/net-smtp-0.5.1/net-smtp.gemspec +0 -31
- package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/.bundled.nkf-0.2.0.gemspec +0 -24
- package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/Gemfile +0 -5
- package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/LICENSE.txt +0 -22
- package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/README.md +0 -38
- package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/Rakefile +0 -24
- package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/bin/console +0 -14
- package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/lib/kconv.rb +0 -283
- package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/lib/nkf.rb +0 -6
- package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/nkf-0.2.0.gemspec +0 -24
- package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/nkf.gemspec +0 -43
- package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/observer.gemspec +0 -32
- package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/power_assert.gemspec +0 -24
- package/lib/ruby/gems/3.4.0/gems/prime-0.1.3/prime.gemspec +0 -28
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/.bundled.racc-1.8.1.gemspec +0 -26
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/BSDL +0 -22
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/COPYING +0 -56
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/ChangeLog +0 -846
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/README.ja.rdoc +0 -58
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/README.rdoc +0 -60
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/TODO +0 -5
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/bin/racc +0 -320
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/en/grammar.en.rdoc +0 -218
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/en/grammar2.en.rdoc +0 -219
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/ja/command.ja.html +0 -99
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/ja/debug.ja.rdoc +0 -36
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/ja/grammar.ja.rdoc +0 -348
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/ja/index.ja.html +0 -10
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/ja/parser.ja.rdoc +0 -125
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/doc/ja/usage.ja.html +0 -414
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/compat.rb +0 -33
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/debugflags.rb +0 -60
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/exception.rb +0 -16
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/grammar.rb +0 -1191
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/grammarfileparser.rb +0 -667
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/info.rb +0 -18
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/iset.rb +0 -92
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/logfilegenerator.rb +0 -212
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/parser-text.rb +0 -644
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/parser.rb +0 -630
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/parserfilegenerator.rb +0 -473
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/sourcetext.rb +0 -35
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/state.rb +0 -976
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/statetransitiontable.rb +0 -311
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc/static.rb +0 -5
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/lib/racc.rb +0 -6
- package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/racc-1.8.1.gemspec +0 -26
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/rake.gemspec +0 -101
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/.bundled.rbs-3.8.0.gemspec +0 -25
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/.rubocop.yml +0 -53
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/BSDL +0 -22
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/CHANGELOG.md +0 -1854
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/COPYING +0 -56
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/README.md +0 -203
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/Rakefile +0 -415
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/Steepfile +0 -44
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/config.yml +0 -311
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/array.rbs +0 -4062
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/basic_object.rbs +0 -375
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/binding.rbs +0 -150
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/builtin.rbs +0 -277
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/class.rbs +0 -220
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/comparable.rbs +0 -171
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/complex.rbs +0 -786
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/constants.rbs +0 -96
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/data.rbs +0 -415
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/dir.rbs +0 -981
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/encoding.rbs +0 -1371
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/enumerable.rbs +0 -2405
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/enumerator/product.rbs +0 -92
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/enumerator.rbs +0 -630
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/env.rbs +0 -6
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/errno.rbs +0 -673
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/errors.rbs +0 -760
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/exception.rbs +0 -376
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/false_class.rbs +0 -82
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/fiber.rbs +0 -550
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/fiber_error.rbs +0 -11
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/file.rbs +0 -2936
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/file_test.rbs +0 -331
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/float.rbs +0 -1151
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/gc.rbs +0 -644
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/global_variables.rbs +0 -184
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/hash.rbs +0 -1861
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/integer.rbs +0 -1413
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/io/buffer.rbs +0 -984
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/io/wait.rbs +0 -70
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/io.rbs +0 -3402
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/kernel.rbs +0 -3054
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/marshal.rbs +0 -207
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/match_data.rbs +0 -635
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/math.rbs +0 -729
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/method.rbs +0 -386
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/module.rbs +0 -1704
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/nil_class.rbs +0 -209
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/numeric.rbs +0 -818
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/object.rbs +0 -110
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/object_space/weak_key_map.rbs +0 -166
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/object_space.rbs +0 -190
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/proc.rbs +0 -868
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/process.rbs +0 -2296
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/ractor.rbs +0 -1065
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/random.rbs +0 -237
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/range.rbs +0 -1107
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rational.rbs +0 -531
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rb_config.rbs +0 -88
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rbs/unnamed/argf.rbs +0 -1229
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rbs/unnamed/env_class.rbs +0 -1209
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rbs/unnamed/random.rbs +0 -293
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/refinement.rbs +0 -59
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/regexp.rbs +0 -1928
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/ruby_vm.rbs +0 -765
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/basic_specification.rbs +0 -6
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/config_file.rbs +0 -38
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/dependency_installer.rbs +0 -6
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/errors.rbs +0 -176
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/installer.rbs +0 -15
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/path_support.rbs +0 -6
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/platform.rbs +0 -7
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/request_set.rbs +0 -49
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/requirement.rbs +0 -148
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/rubygems.rbs +0 -1171
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/source_list.rbs +0 -15
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/specification.rbs +0 -23
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/stream_ui.rbs +0 -5
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/uninstaller.rbs +0 -10
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/rubygems/version.rbs +0 -294
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/set.rbs +0 -621
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/signal.rbs +0 -100
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/string.rbs +0 -3583
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/struct.rbs +0 -667
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/symbol.rbs +0 -475
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/thread.rbs +0 -1765
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/thread_group.rbs +0 -79
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/time.rbs +0 -1762
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/trace_point.rbs +0 -477
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/true_class.rbs +0 -98
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/unbound_method.rbs +0 -329
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/core/warning.rbs +0 -87
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/CONTRIBUTING.md +0 -106
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/architecture.md +0 -110
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/collection.md +0 -192
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/data_and_struct.md +0 -86
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/gem.md +0 -57
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/rbs_by_example.md +0 -309
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/repo.md +0 -125
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/sigs.md +0 -167
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/stdlib.md +0 -147
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/syntax.md +0 -905
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/docs/tools.md +0 -17
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/exe/rbs +0 -7
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/goodcheck.yml +0 -91
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/include/rbs/constants.h +0 -82
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/include/rbs/ruby_objs.h +0 -72
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/include/rbs.h +0 -7
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ancestor_graph.rb +0 -92
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/annotate/annotations.rb +0 -199
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/annotate/formatter.rb +0 -92
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/annotate/rdoc_annotator.rb +0 -400
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/annotate/rdoc_source.rb +0 -131
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/annotate.rb +0 -8
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ast/annotation.rb +0 -29
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ast/comment.rb +0 -29
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ast/declarations.rb +0 -467
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ast/directives.rb +0 -39
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ast/members.rb +0 -449
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ast/type_param.rb +0 -225
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/ast/visitor.rb +0 -137
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/buffer.rb +0 -67
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/builtin_names.rb +0 -58
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/cli/colored_io.rb +0 -48
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/cli/diff.rb +0 -83
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/cli/validate.rb +0 -356
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/cli.rb +0 -1223
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/cleaner.rb +0 -38
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/config/lockfile.rb +0 -92
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/config/lockfile_generator.rb +0 -223
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/config.rb +0 -81
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/installer.rb +0 -32
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/sources/base.rb +0 -14
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/sources/git.rb +0 -258
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/sources/local.rb +0 -81
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/sources/rubygems.rb +0 -48
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/sources/stdlib.rb +0 -50
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection/sources.rb +0 -38
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/collection.rb +0 -16
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/constant.rb +0 -28
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/definition.rb +0 -395
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/definition_builder/ancestor_builder.rb +0 -620
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/definition_builder/method_builder.rb +0 -254
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/definition_builder.rb +0 -841
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/diff.rb +0 -125
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/environment/use_map.rb +0 -77
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/environment.rb +0 -818
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/environment_loader.rb +0 -173
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/environment_walker.rb +0 -155
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/errors.rb +0 -600
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/factory.rb +0 -18
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/file_finder.rb +0 -28
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/location_aux.rb +0 -138
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/locator.rb +0 -241
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/method_type.rb +0 -141
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/namespace.rb +0 -125
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/parser/lex_result.rb +0 -15
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/parser/token.rb +0 -23
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/parser_aux.rb +0 -77
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/helpers.rb +0 -140
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/node_usage.rb +0 -99
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/rb.rb +0 -840
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/rbi.rb +0 -641
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/runtime/helpers.rb +0 -59
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/runtime/reflection.rb +0 -19
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/runtime/value_object_generator.rb +0 -279
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/prototype/runtime.rb +0 -667
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/repository.rb +0 -127
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/resolver/constant_resolver.rb +0 -219
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/resolver/type_name_resolver.rb +0 -91
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/sorter.rb +0 -198
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/substitution.rb +0 -83
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/subtractor.rb +0 -201
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/errors.rb +0 -80
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/guaranteed.rb +0 -30
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/hook.rb +0 -212
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/observer.rb +0 -19
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/setup.rb +0 -84
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/setup_helper.rb +0 -50
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/tester.rb +0 -167
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test/type_check.rb +0 -433
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/test.rb +0 -112
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/type_alias_dependency.rb +0 -100
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/type_alias_regularity.rb +0 -126
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/type_name.rb +0 -109
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/types.rb +0 -1557
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/unit_test/convertibles.rb +0 -176
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/unit_test/spy.rb +0 -136
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/unit_test/type_assertions.rb +0 -341
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/unit_test/with_aliases.rb +0 -143
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/unit_test.rb +0 -6
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/validator.rb +0 -182
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/variance_calculator.rb +0 -189
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/vendorer.rb +0 -71
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/version.rb +0 -5
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs/writer.rb +0 -419
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rbs.rb +0 -93
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rdoc/discover.rb +0 -20
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/lib/rdoc_plugin/parser.rb +0 -163
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/rbs-3.8.0.gemspec +0 -29
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/rbs.gemspec +0 -49
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/annotation.json +0 -14
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/comment.json +0 -26
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/decls.json +0 -326
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/function.json +0 -87
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/location.json +0 -56
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/members.json +0 -266
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/methodType.json +0 -50
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/typeParam.json +0 -36
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/schema/types.json +0 -317
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/ancestor_builder.rbs +0 -163
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/ancestor_graph.rbs +0 -60
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/annotate/annotations.rbs +0 -102
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/annotate/formatter.rbs +0 -24
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/annotate/rdoc_annotater.rbs +0 -82
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/annotate/rdoc_source.rbs +0 -30
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/annotation.rbs +0 -27
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/buffer.rbs +0 -32
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/builtin_names.rbs +0 -44
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/cli/colored_io.rbs +0 -15
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/cli/diff.rbs +0 -21
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/cli/validate.rbs +0 -43
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/cli.rbs +0 -87
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/collection/cleaner.rbs +0 -13
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/collection/config/lockfile.rbs +0 -74
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/collection/config/lockfile_generator.rbs +0 -66
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/collection/config.rbs +0 -46
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/collection/installer.rbs +0 -17
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/collection/sources.rbs +0 -214
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/collection.rbs +0 -4
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/comment.rbs +0 -26
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/constant.rbs +0 -21
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/declarations.rbs +0 -267
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/definition.rbs +0 -173
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/definition_builder.rbs +0 -165
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/diff.rbs +0 -28
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/directives.rbs +0 -61
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/environment.rbs +0 -277
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/environment_loader.rbs +0 -111
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/environment_walker.rbs +0 -65
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/errors.rbs +0 -383
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/factory.rbs +0 -5
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/file_finder.rbs +0 -28
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/location.rbs +0 -110
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/locator.rbs +0 -58
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/manifest.yaml +0 -7
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/members.rbs +0 -258
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/method_builder.rbs +0 -84
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/method_types.rbs +0 -58
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/namespace.rbs +0 -146
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/parser.rbs +0 -96
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/prototype/helpers.rbs +0 -27
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/prototype/node_usage.rbs +0 -20
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/prototype/rb.rbs +0 -96
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/prototype/rbi.rbs +0 -75
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/prototype/runtime.rbs +0 -182
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/rbs.rbs +0 -21
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/rdoc/rbs.rbs +0 -67
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/repository.rbs +0 -85
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/resolver/constant_resolver.rbs +0 -92
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/resolver/context.rbs +0 -34
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/resolver/type_name_resolver.rbs +0 -35
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/shims/bundler.rbs +0 -38
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/shims/enumerable.rbs +0 -5
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/shims/rubygems.rbs +0 -19
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/sorter.rbs +0 -41
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/substitution.rbs +0 -48
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/subtractor.rbs +0 -37
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/test/errors.rbs +0 -52
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/test/guranteed.rbs +0 -9
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/test/type_check.rbs +0 -19
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/test.rbs +0 -82
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/type_alias_dependency.rbs +0 -53
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/type_alias_regularity.rbs +0 -98
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/type_param.rbs +0 -110
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/typename.rbs +0 -79
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/types.rbs +0 -576
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/unit_test/convertibles.rbs +0 -154
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/unit_test/spy.rbs +0 -28
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/unit_test/type_assertions.rbs +0 -194
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/unit_test/with_aliases.rbs +0 -136
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/use_map.rbs +0 -35
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/util.rbs +0 -9
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/validator.rbs +0 -59
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/variance_calculator.rbs +0 -87
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/vendorer.rbs +0 -51
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/version.rbs +0 -3
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/visitor.rbs +0 -47
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/sig/writer.rbs +0 -127
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/src/constants.c +0 -153
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/src/ruby_objs.c +0 -793
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/abbrev/0/abbrev.rbs +0 -66
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/abbrev/0/array.rbs +0 -26
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/base64/0/base64.rbs +0 -355
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/benchmark/0/benchmark.rbs +0 -452
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/bigdecimal/0/big_decimal.rbs +0 -1629
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/bigdecimal-math/0/big_math.rbs +0 -119
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/bigdecimal-math/0/manifest.yaml +0 -2
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/cgi/0/core.rbs +0 -1285
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/cgi/0/manifest.yaml +0 -3
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/coverage/0/coverage.rbs +0 -263
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/csv/0/csv.rbs +0 -3776
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/csv/0/manifest.yaml +0 -3
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/date/0/date.rbs +0 -1585
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/date/0/date_time.rbs +0 -616
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/date/0/time.rbs +0 -26
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/dbm/0/dbm.rbs +0 -421
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/delegate/0/delegator.rbs +0 -184
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/delegate/0/kernel.rbs +0 -47
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/delegate/0/simple_delegator.rbs +0 -96
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/did_you_mean/0/did_you_mean.rbs +0 -343
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/digest/0/digest.rbs +0 -577
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/erb/0/erb.rbs +0 -532
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/etc/0/etc.rbs +0 -865
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/fileutils/0/fileutils.rbs +0 -1734
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/find/0/find.rbs +0 -49
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/forwardable/0/forwardable.rbs +0 -268
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/io-console/0/io-console.rbs +0 -414
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/ipaddr/0/ipaddr.rbs +0 -428
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/json/0/json.rbs +0 -1914
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/kconv/0/kconv.rbs +0 -166
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/logger/0/formatter.rbs +0 -45
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/logger/0/log_device.rbs +0 -100
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/logger/0/logger.rbs +0 -796
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/logger/0/manifest.yaml +0 -2
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/logger/0/period.rbs +0 -17
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/logger/0/severity.rbs +0 -34
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/kernel.rbs +0 -42
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/abstract_reporter.rbs +0 -52
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/assertion.rbs +0 -17
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/assertions.rbs +0 -590
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/backtrace_filter.rbs +0 -23
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/bench_spec.rbs +0 -102
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/benchmark.rbs +0 -259
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/composite_reporter.rbs +0 -25
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/compress.rbs +0 -13
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/error_on_warning.rbs +0 -3
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/expectation.rbs +0 -2
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/expectations.rbs +0 -21
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/guard.rbs +0 -64
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/mock.rbs +0 -64
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/parallel/executor.rbs +0 -46
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/parallel/test/class_methods.rbs +0 -5
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/parallel/test.rbs +0 -3
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/parallel.rbs +0 -2
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/pride_io.rbs +0 -62
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/pride_lol.rbs +0 -19
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/progress_reporter.rbs +0 -11
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/reportable.rbs +0 -53
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/reporter.rbs +0 -5
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/result.rbs +0 -28
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/runnable.rbs +0 -163
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/skip.rbs +0 -6
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs +0 -48
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/spec/dsl.rbs +0 -129
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/spec.rbs +0 -11
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/statistics_reporter.rbs +0 -81
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/summary_reporter.rbs +0 -18
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/test/lifecycle_hooks.rbs +0 -92
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/test.rbs +0 -69
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/unexpected_error.rbs +0 -12
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/unexpected_warning.rbs +0 -6
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/unit/test_case.rbs +0 -3
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest/unit.rbs +0 -4
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/minitest/0/minitest.rbs +0 -115
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/monitor/0/monitor.rbs +0 -354
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/mutex_m/0/mutex_m.rbs +0 -104
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/net-http/0/manifest.yaml +0 -3
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/net-http/0/net-http.rbs +0 -5552
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/net-protocol/0/manifest.yaml +0 -2
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/net-protocol/0/net-protocol.rbs +0 -56
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/net-smtp/0/manifest.yaml +0 -2
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/net-smtp/0/net-smtp.rbs +0 -55
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/nkf/0/nkf.rbs +0 -402
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/objspace/0/objspace.rbs +0 -487
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/observable/0/observable.rbs +0 -217
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/open-uri/0/manifest.yaml +0 -4
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/open-uri/0/open-uri.rbs +0 -393
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/open3/0/open3.rbs +0 -147
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/openssl/0/manifest.yaml +0 -3
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/openssl/0/openssl.rbs +0 -12113
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/optparse/0/optparse.rbs +0 -1725
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/pathname/0/pathname.rbs +0 -1406
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/pp/0/manifest.yaml +0 -2
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/pp/0/pp.rbs +0 -300
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/prettyprint/0/prettyprint.rbs +0 -383
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/pstore/0/pstore.rbs +0 -603
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/psych/0/core_ext.rbs +0 -12
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/psych/0/dbm.rbs +0 -237
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/psych/0/manifest.yaml +0 -3
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/psych/0/psych.rbs +0 -402
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/psych/0/store.rbs +0 -59
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/pty/0/pty.rbs +0 -237
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/code_object.rbs +0 -51
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/comment.rbs +0 -59
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/context.rbs +0 -153
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/markup.rbs +0 -117
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/parser.rbs +0 -56
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/rdoc.rbs +0 -391
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/ri.rbs +0 -17
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/store.rbs +0 -48
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/rdoc/0/top_level.rbs +0 -97
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/resolv/0/manifest.yaml +0 -3
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/resolv/0/resolv.rbs +0 -1830
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/ripper/0/ripper.rbs +0 -1648
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/securerandom/0/securerandom.rbs +0 -62
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/shellwords/0/shellwords.rbs +0 -229
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/singleton/0/singleton.rbs +0 -131
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/addrinfo.rbs +0 -666
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/basic_socket.rbs +0 -590
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/constants.rbs +0 -2295
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/ip_socket.rbs +0 -92
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/socket.rbs +0 -4157
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/socket_error.rbs +0 -5
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/tcp_server.rbs +0 -192
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/tcp_socket.rbs +0 -79
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/udp_socket.rbs +0 -133
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/unix_server.rbs +0 -169
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/socket/0/unix_socket.rbs +0 -170
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/stringio/0/stringio.rbs +0 -567
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/strscan/0/string_scanner.rbs +0 -1627
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/tempfile/0/tempfile.rbs +0 -479
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/time/0/time.rbs +0 -432
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/timeout/0/timeout.rbs +0 -81
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/tmpdir/0/tmpdir.rbs +0 -69
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/tsort/0/cyclic.rbs +0 -5
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/tsort/0/interfaces.rbs +0 -20
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/tsort/0/tsort.rbs +0 -409
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/common.rbs +0 -582
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/file.rbs +0 -118
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/ftp.rbs +0 -13
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/generic.rbs +0 -1108
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/http.rbs +0 -104
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/https.rbs +0 -14
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/ldap.rbs +0 -230
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/ldaps.rbs +0 -14
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/mailto.rbs +0 -92
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/rfc2396_parser.rbs +0 -189
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/rfc3986_parser.rbs +0 -2
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/ws.rbs +0 -13
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/uri/0/wss.rbs +0 -9
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/yaml/0/manifest.yaml +0 -2
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/yaml/0/yaml.rbs +0 -1
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/buf_error.rbs +0 -10
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/data_error.rbs +0 -10
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/deflate.rbs +0 -210
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/error.rbs +0 -20
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/gzip_file/crc_error.rbs +0 -12
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/gzip_file/error.rbs +0 -23
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/gzip_file/length_error.rbs +0 -12
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/gzip_file/no_footer.rbs +0 -11
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/gzip_file.rbs +0 -156
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/gzip_reader.rbs +0 -293
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/gzip_writer.rbs +0 -166
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/inflate.rbs +0 -180
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/mem_error.rbs +0 -10
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/need_dict.rbs +0 -13
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/stream_end.rbs +0 -11
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/stream_error.rbs +0 -11
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/version_error.rbs +0 -11
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/zlib.rbs +0 -449
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/stdlib/zlib/0/zstream.rbs +0 -200
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/templates/include/rbs/constants.h.erb +0 -20
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/templates/include/rbs/ruby_objs.h.erb +0 -10
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/templates/src/constants.c.erb +0 -36
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/templates/src/ruby_objs.c.erb +0 -27
- package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/templates/template.rb +0 -122
- package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/resolv-replace.gemspec +0 -22
- package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/rinda.gemspec +0 -35
- package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/.bundled.syslog-0.2.0.gemspec +0 -23
- package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/Gemfile +0 -5
- package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/LICENSE.txt +0 -22
- package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/README.md +0 -41
- package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/Rakefile +0 -20
- package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/bin/console +0 -14
- package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/bin/setup +0 -8
- package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/lib/syslog/logger.rb +0 -209
- package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/lib/syslog.rb +0 -10
- package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/syslog-0.2.0.gemspec +0 -23
- package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/syslog.gemspec +0 -26
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/typeprof.gemspec +0 -32
- package/lib/ruby/gems/3.4.0/specifications/bigdecimal-3.1.8.gemspec +0 -50
- package/lib/ruby/gems/3.4.0/specifications/debug-1.11.0.gemspec +0 -33
- package/lib/ruby/gems/3.4.0/specifications/nkf-0.2.0.gemspec +0 -43
- package/lib/ruby/gems/3.4.0/specifications/racc-1.8.1.gemspec +0 -26
- package/lib/ruby/gems/3.4.0/specifications/rbs-3.8.0.gemspec +0 -49
- package/lib/ruby/gems/3.4.0/specifications/syslog-0.2.0.gemspec +0 -26
|
@@ -0,0 +1,2429 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
#
|
|
3
|
+
# optparse.rb - command-line option analysis with the OptionParser class.
|
|
4
|
+
#
|
|
5
|
+
# Author:: Nobu Nakada
|
|
6
|
+
# Documentation:: Nobu Nakada and Gavin Sinclair.
|
|
7
|
+
#
|
|
8
|
+
# See OptionParser for documentation.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
#--
|
|
12
|
+
# == Developer Documentation (not for RDoc output)
|
|
13
|
+
#
|
|
14
|
+
# === Class tree
|
|
15
|
+
#
|
|
16
|
+
# - OptionParser:: front end
|
|
17
|
+
# - OptionParser::Switch:: each switches
|
|
18
|
+
# - OptionParser::List:: options list
|
|
19
|
+
# - OptionParser::ParseError:: errors on parsing
|
|
20
|
+
# - OptionParser::AmbiguousOption
|
|
21
|
+
# - OptionParser::NeedlessArgument
|
|
22
|
+
# - OptionParser::MissingArgument
|
|
23
|
+
# - OptionParser::InvalidOption
|
|
24
|
+
# - OptionParser::InvalidArgument
|
|
25
|
+
# - OptionParser::AmbiguousArgument
|
|
26
|
+
#
|
|
27
|
+
# === Object relationship diagram
|
|
28
|
+
#
|
|
29
|
+
# +--------------+
|
|
30
|
+
# | OptionParser |<>-----+
|
|
31
|
+
# +--------------+ | +--------+
|
|
32
|
+
# | ,-| Switch |
|
|
33
|
+
# on_head -------->+---------------+ / +--------+
|
|
34
|
+
# accept/reject -->| List |<|>-
|
|
35
|
+
# | |<|>- +----------+
|
|
36
|
+
# on ------------->+---------------+ `-| argument |
|
|
37
|
+
# : : | class |
|
|
38
|
+
# +---------------+ |==========|
|
|
39
|
+
# on_tail -------->| | |pattern |
|
|
40
|
+
# +---------------+ |----------|
|
|
41
|
+
# OptionParser.accept ->| DefaultList | |converter |
|
|
42
|
+
# reject |(shared between| +----------+
|
|
43
|
+
# | all instances)|
|
|
44
|
+
# +---------------+
|
|
45
|
+
#
|
|
46
|
+
#++
|
|
47
|
+
#
|
|
48
|
+
# == OptionParser
|
|
49
|
+
#
|
|
50
|
+
# === New to +OptionParser+?
|
|
51
|
+
#
|
|
52
|
+
# See the {Tutorial}[optparse/tutorial.rdoc].
|
|
53
|
+
#
|
|
54
|
+
# === Introduction
|
|
55
|
+
#
|
|
56
|
+
# OptionParser is a class for command-line option analysis. It is much more
|
|
57
|
+
# advanced, yet also easier to use, than GetoptLong, and is a more Ruby-oriented
|
|
58
|
+
# solution.
|
|
59
|
+
#
|
|
60
|
+
# === Features
|
|
61
|
+
#
|
|
62
|
+
# 1. The argument specification and the code to handle it are written in the
|
|
63
|
+
# same place.
|
|
64
|
+
# 2. It can output an option summary; you don't need to maintain this string
|
|
65
|
+
# separately.
|
|
66
|
+
# 3. Optional and mandatory arguments are specified very gracefully.
|
|
67
|
+
# 4. Arguments can be automatically converted to a specified class.
|
|
68
|
+
# 5. Arguments can be restricted to a certain set.
|
|
69
|
+
#
|
|
70
|
+
# All of these features are demonstrated in the examples below. See
|
|
71
|
+
# #make_switch for full documentation.
|
|
72
|
+
#
|
|
73
|
+
# === Minimal example
|
|
74
|
+
#
|
|
75
|
+
# require 'optparse'
|
|
76
|
+
#
|
|
77
|
+
# options = {}
|
|
78
|
+
# OptionParser.new do |parser|
|
|
79
|
+
# parser.banner = "Usage: example.rb [options]"
|
|
80
|
+
#
|
|
81
|
+
# parser.on("-v", "--[no-]verbose", "Run verbosely") do |v|
|
|
82
|
+
# options[:verbose] = v
|
|
83
|
+
# end
|
|
84
|
+
# end.parse!
|
|
85
|
+
#
|
|
86
|
+
# p options
|
|
87
|
+
# p ARGV
|
|
88
|
+
#
|
|
89
|
+
# === Generating Help
|
|
90
|
+
#
|
|
91
|
+
# OptionParser can be used to automatically generate help for the commands you
|
|
92
|
+
# write:
|
|
93
|
+
#
|
|
94
|
+
# require 'optparse'
|
|
95
|
+
#
|
|
96
|
+
# Options = Struct.new(:name)
|
|
97
|
+
#
|
|
98
|
+
# class Parser
|
|
99
|
+
# def self.parse(options)
|
|
100
|
+
# args = Options.new("world")
|
|
101
|
+
#
|
|
102
|
+
# opt_parser = OptionParser.new do |parser|
|
|
103
|
+
# parser.banner = "Usage: example.rb [options]"
|
|
104
|
+
#
|
|
105
|
+
# parser.on("-nNAME", "--name=NAME", "Name to say hello to") do |n|
|
|
106
|
+
# args.name = n
|
|
107
|
+
# end
|
|
108
|
+
#
|
|
109
|
+
# parser.on("-h", "--help", "Prints this help") do
|
|
110
|
+
# puts parser
|
|
111
|
+
# exit
|
|
112
|
+
# end
|
|
113
|
+
# end
|
|
114
|
+
#
|
|
115
|
+
# opt_parser.parse!(options)
|
|
116
|
+
# return args
|
|
117
|
+
# end
|
|
118
|
+
# end
|
|
119
|
+
# options = Parser.parse %w[--help]
|
|
120
|
+
#
|
|
121
|
+
# #=>
|
|
122
|
+
# # Usage: example.rb [options]
|
|
123
|
+
# # -n, --name=NAME Name to say hello to
|
|
124
|
+
# # -h, --help Prints this help
|
|
125
|
+
#
|
|
126
|
+
# === Required Arguments
|
|
127
|
+
#
|
|
128
|
+
# For options that require an argument, option specification strings may include an
|
|
129
|
+
# option name in all caps. If an option is used without the required argument,
|
|
130
|
+
# an exception will be raised.
|
|
131
|
+
#
|
|
132
|
+
# require 'optparse'
|
|
133
|
+
#
|
|
134
|
+
# options = {}
|
|
135
|
+
# OptionParser.new do |parser|
|
|
136
|
+
# parser.on("-r", "--require LIBRARY",
|
|
137
|
+
# "Require the LIBRARY before executing your script") do |lib|
|
|
138
|
+
# puts "You required #{lib}!"
|
|
139
|
+
# end
|
|
140
|
+
# end.parse!
|
|
141
|
+
#
|
|
142
|
+
# Used:
|
|
143
|
+
#
|
|
144
|
+
# $ ruby optparse-test.rb -r
|
|
145
|
+
# optparse-test.rb:9:in `<main>': missing argument: -r (OptionParser::MissingArgument)
|
|
146
|
+
# $ ruby optparse-test.rb -r my-library
|
|
147
|
+
# You required my-library!
|
|
148
|
+
#
|
|
149
|
+
# === Type Coercion
|
|
150
|
+
#
|
|
151
|
+
# OptionParser supports the ability to coerce command line arguments
|
|
152
|
+
# into objects for us.
|
|
153
|
+
#
|
|
154
|
+
# OptionParser comes with a few ready-to-use kinds of type
|
|
155
|
+
# coercion. They are:
|
|
156
|
+
#
|
|
157
|
+
# - Date -- Anything accepted by +Date.parse+ (need to require +optparse/date+)
|
|
158
|
+
# - DateTime -- Anything accepted by +DateTime.parse+ (need to require +optparse/date+)
|
|
159
|
+
# - Time -- Anything accepted by +Time.httpdate+ or +Time.parse+ (need to require +optparse/time+)
|
|
160
|
+
# - URI -- Anything accepted by +URI.parse+ (need to require +optparse/uri+)
|
|
161
|
+
# - Shellwords -- Anything accepted by +Shellwords.shellwords+ (need to require +optparse/shellwords+)
|
|
162
|
+
# - String -- Any non-empty string
|
|
163
|
+
# - Integer -- Any integer. Will convert octal. (e.g. 124, -3, 040)
|
|
164
|
+
# - Float -- Any float. (e.g. 10, 3.14, -100E+13)
|
|
165
|
+
# - Numeric -- Any integer, float, or rational (1, 3.4, 1/3)
|
|
166
|
+
# - DecimalInteger -- Like +Integer+, but no octal format.
|
|
167
|
+
# - OctalInteger -- Like +Integer+, but no decimal format.
|
|
168
|
+
# - DecimalNumeric -- Decimal integer or float.
|
|
169
|
+
# - TrueClass -- Accepts '+, yes, true, -, no, false' and
|
|
170
|
+
# defaults as +true+
|
|
171
|
+
# - FalseClass -- Same as +TrueClass+, but defaults to +false+
|
|
172
|
+
# - Array -- Strings separated by ',' (e.g. 1,2,3)
|
|
173
|
+
# - Regexp -- Regular expressions. Also includes options.
|
|
174
|
+
#
|
|
175
|
+
# We can also add our own coercions, which we will cover below.
|
|
176
|
+
#
|
|
177
|
+
# ==== Using Built-in Conversions
|
|
178
|
+
#
|
|
179
|
+
# As an example, the built-in +Time+ conversion is used. The other built-in
|
|
180
|
+
# conversions behave in the same way.
|
|
181
|
+
# OptionParser will attempt to parse the argument
|
|
182
|
+
# as a +Time+. If it succeeds, that time will be passed to the
|
|
183
|
+
# handler block. Otherwise, an exception will be raised.
|
|
184
|
+
#
|
|
185
|
+
# require 'optparse'
|
|
186
|
+
# require 'optparse/time'
|
|
187
|
+
# OptionParser.new do |parser|
|
|
188
|
+
# parser.on("-t", "--time [TIME]", Time, "Begin execution at given time") do |time|
|
|
189
|
+
# p time
|
|
190
|
+
# end
|
|
191
|
+
# end.parse!
|
|
192
|
+
#
|
|
193
|
+
# Used:
|
|
194
|
+
#
|
|
195
|
+
# $ ruby optparse-test.rb -t nonsense
|
|
196
|
+
# ... invalid argument: -t nonsense (OptionParser::InvalidArgument)
|
|
197
|
+
# $ ruby optparse-test.rb -t 10-11-12
|
|
198
|
+
# 2010-11-12 00:00:00 -0500
|
|
199
|
+
# $ ruby optparse-test.rb -t 9:30
|
|
200
|
+
# 2014-08-13 09:30:00 -0400
|
|
201
|
+
#
|
|
202
|
+
# ==== Creating Custom Conversions
|
|
203
|
+
#
|
|
204
|
+
# The +accept+ method on OptionParser may be used to create converters.
|
|
205
|
+
# It specifies which conversion block to call whenever a class is specified.
|
|
206
|
+
# The example below uses it to fetch a +User+ object before the +on+ handler receives it.
|
|
207
|
+
#
|
|
208
|
+
# require 'optparse'
|
|
209
|
+
#
|
|
210
|
+
# User = Struct.new(:id, :name)
|
|
211
|
+
#
|
|
212
|
+
# def find_user id
|
|
213
|
+
# not_found = ->{ raise "No User Found for id #{id}" }
|
|
214
|
+
# [ User.new(1, "Sam"),
|
|
215
|
+
# User.new(2, "Gandalf") ].find(not_found) do |u|
|
|
216
|
+
# u.id == id
|
|
217
|
+
# end
|
|
218
|
+
# end
|
|
219
|
+
#
|
|
220
|
+
# op = OptionParser.new
|
|
221
|
+
# op.accept(User) do |user_id|
|
|
222
|
+
# find_user user_id.to_i
|
|
223
|
+
# end
|
|
224
|
+
#
|
|
225
|
+
# op.on("--user ID", User) do |user|
|
|
226
|
+
# puts user
|
|
227
|
+
# end
|
|
228
|
+
#
|
|
229
|
+
# op.parse!
|
|
230
|
+
#
|
|
231
|
+
# Used:
|
|
232
|
+
#
|
|
233
|
+
# $ ruby optparse-test.rb --user 1
|
|
234
|
+
# #<struct User id=1, name="Sam">
|
|
235
|
+
# $ ruby optparse-test.rb --user 2
|
|
236
|
+
# #<struct User id=2, name="Gandalf">
|
|
237
|
+
# $ ruby optparse-test.rb --user 3
|
|
238
|
+
# optparse-test.rb:15:in `block in find_user': No User Found for id 3 (RuntimeError)
|
|
239
|
+
#
|
|
240
|
+
# === Store options to a Hash
|
|
241
|
+
#
|
|
242
|
+
# The +into+ option of +order+, +parse+ and so on methods stores command line options into a Hash.
|
|
243
|
+
#
|
|
244
|
+
# require 'optparse'
|
|
245
|
+
#
|
|
246
|
+
# options = {}
|
|
247
|
+
# OptionParser.new do |parser|
|
|
248
|
+
# parser.on('-a')
|
|
249
|
+
# parser.on('-b NUM', Integer)
|
|
250
|
+
# parser.on('-v', '--verbose')
|
|
251
|
+
# end.parse!(into: options)
|
|
252
|
+
#
|
|
253
|
+
# p options
|
|
254
|
+
#
|
|
255
|
+
# Used:
|
|
256
|
+
#
|
|
257
|
+
# $ ruby optparse-test.rb -a
|
|
258
|
+
# {:a=>true}
|
|
259
|
+
# $ ruby optparse-test.rb -a -v
|
|
260
|
+
# {:a=>true, :verbose=>true}
|
|
261
|
+
# $ ruby optparse-test.rb -a -b 100
|
|
262
|
+
# {:a=>true, :b=>100}
|
|
263
|
+
#
|
|
264
|
+
# === Complete example
|
|
265
|
+
#
|
|
266
|
+
# The following example is a complete Ruby program. You can run it and see the
|
|
267
|
+
# effect of specifying various options. This is probably the best way to learn
|
|
268
|
+
# the features of +optparse+.
|
|
269
|
+
#
|
|
270
|
+
# require 'optparse'
|
|
271
|
+
# require 'optparse/time'
|
|
272
|
+
# require 'ostruct'
|
|
273
|
+
# require 'pp'
|
|
274
|
+
#
|
|
275
|
+
# class OptparseExample
|
|
276
|
+
# Version = '1.0.0'
|
|
277
|
+
#
|
|
278
|
+
# CODES = %w[iso-2022-jp shift_jis euc-jp utf8 binary]
|
|
279
|
+
# CODE_ALIASES = { "jis" => "iso-2022-jp", "sjis" => "shift_jis" }
|
|
280
|
+
#
|
|
281
|
+
# class ScriptOptions
|
|
282
|
+
# attr_accessor :library, :inplace, :encoding, :transfer_type,
|
|
283
|
+
# :verbose, :extension, :delay, :time, :record_separator,
|
|
284
|
+
# :list
|
|
285
|
+
#
|
|
286
|
+
# def initialize
|
|
287
|
+
# self.library = []
|
|
288
|
+
# self.inplace = false
|
|
289
|
+
# self.encoding = "utf8"
|
|
290
|
+
# self.transfer_type = :auto
|
|
291
|
+
# self.verbose = false
|
|
292
|
+
# end
|
|
293
|
+
#
|
|
294
|
+
# def define_options(parser)
|
|
295
|
+
# parser.banner = "Usage: example.rb [options]"
|
|
296
|
+
# parser.separator ""
|
|
297
|
+
# parser.separator "Specific options:"
|
|
298
|
+
#
|
|
299
|
+
# # add additional options
|
|
300
|
+
# perform_inplace_option(parser)
|
|
301
|
+
# delay_execution_option(parser)
|
|
302
|
+
# execute_at_time_option(parser)
|
|
303
|
+
# specify_record_separator_option(parser)
|
|
304
|
+
# list_example_option(parser)
|
|
305
|
+
# specify_encoding_option(parser)
|
|
306
|
+
# optional_option_argument_with_keyword_completion_option(parser)
|
|
307
|
+
# boolean_verbose_option(parser)
|
|
308
|
+
#
|
|
309
|
+
# parser.separator ""
|
|
310
|
+
# parser.separator "Common options:"
|
|
311
|
+
# # No argument, shows at tail. This will print an options summary.
|
|
312
|
+
# # Try it and see!
|
|
313
|
+
# parser.on_tail("-h", "--help", "Show this message") do
|
|
314
|
+
# puts parser
|
|
315
|
+
# exit
|
|
316
|
+
# end
|
|
317
|
+
# # Another typical switch to print the version.
|
|
318
|
+
# parser.on_tail("--version", "Show version") do
|
|
319
|
+
# puts Version
|
|
320
|
+
# exit
|
|
321
|
+
# end
|
|
322
|
+
# end
|
|
323
|
+
#
|
|
324
|
+
# def perform_inplace_option(parser)
|
|
325
|
+
# # Specifies an optional option argument
|
|
326
|
+
# parser.on("-i", "--inplace [EXTENSION]",
|
|
327
|
+
# "Edit ARGV files in place",
|
|
328
|
+
# "(make backup if EXTENSION supplied)") do |ext|
|
|
329
|
+
# self.inplace = true
|
|
330
|
+
# self.extension = ext || ''
|
|
331
|
+
# self.extension.sub!(/\A\.?(?=.)/, ".") # Ensure extension begins with dot.
|
|
332
|
+
# end
|
|
333
|
+
# end
|
|
334
|
+
#
|
|
335
|
+
# def delay_execution_option(parser)
|
|
336
|
+
# # Cast 'delay' argument to a Float.
|
|
337
|
+
# parser.on("--delay N", Float, "Delay N seconds before executing") do |n|
|
|
338
|
+
# self.delay = n
|
|
339
|
+
# end
|
|
340
|
+
# end
|
|
341
|
+
#
|
|
342
|
+
# def execute_at_time_option(parser)
|
|
343
|
+
# # Cast 'time' argument to a Time object.
|
|
344
|
+
# parser.on("-t", "--time [TIME]", Time, "Begin execution at given time") do |time|
|
|
345
|
+
# self.time = time
|
|
346
|
+
# end
|
|
347
|
+
# end
|
|
348
|
+
#
|
|
349
|
+
# def specify_record_separator_option(parser)
|
|
350
|
+
# # Cast to octal integer.
|
|
351
|
+
# parser.on("-F", "--irs [OCTAL]", OptionParser::OctalInteger,
|
|
352
|
+
# "Specify record separator (default \\0)") do |rs|
|
|
353
|
+
# self.record_separator = rs
|
|
354
|
+
# end
|
|
355
|
+
# end
|
|
356
|
+
#
|
|
357
|
+
# def list_example_option(parser)
|
|
358
|
+
# # List of arguments.
|
|
359
|
+
# parser.on("--list x,y,z", Array, "Example 'list' of arguments") do |list|
|
|
360
|
+
# self.list = list
|
|
361
|
+
# end
|
|
362
|
+
# end
|
|
363
|
+
#
|
|
364
|
+
# def specify_encoding_option(parser)
|
|
365
|
+
# # Keyword completion. We are specifying a specific set of arguments (CODES
|
|
366
|
+
# # and CODE_ALIASES - notice the latter is a Hash), and the user may provide
|
|
367
|
+
# # the shortest unambiguous text.
|
|
368
|
+
# code_list = (CODE_ALIASES.keys + CODES).join(', ')
|
|
369
|
+
# parser.on("--code CODE", CODES, CODE_ALIASES, "Select encoding",
|
|
370
|
+
# "(#{code_list})") do |encoding|
|
|
371
|
+
# self.encoding = encoding
|
|
372
|
+
# end
|
|
373
|
+
# end
|
|
374
|
+
#
|
|
375
|
+
# def optional_option_argument_with_keyword_completion_option(parser)
|
|
376
|
+
# # Optional '--type' option argument with keyword completion.
|
|
377
|
+
# parser.on("--type [TYPE]", [:text, :binary, :auto],
|
|
378
|
+
# "Select transfer type (text, binary, auto)") do |t|
|
|
379
|
+
# self.transfer_type = t
|
|
380
|
+
# end
|
|
381
|
+
# end
|
|
382
|
+
#
|
|
383
|
+
# def boolean_verbose_option(parser)
|
|
384
|
+
# # Boolean switch.
|
|
385
|
+
# parser.on("-v", "--[no-]verbose", "Run verbosely") do |v|
|
|
386
|
+
# self.verbose = v
|
|
387
|
+
# end
|
|
388
|
+
# end
|
|
389
|
+
# end
|
|
390
|
+
#
|
|
391
|
+
# #
|
|
392
|
+
# # Return a structure describing the options.
|
|
393
|
+
# #
|
|
394
|
+
# def parse(args)
|
|
395
|
+
# # The options specified on the command line will be collected in
|
|
396
|
+
# # *options*.
|
|
397
|
+
#
|
|
398
|
+
# @options = ScriptOptions.new
|
|
399
|
+
# @args = OptionParser.new do |parser|
|
|
400
|
+
# @options.define_options(parser)
|
|
401
|
+
# parser.parse!(args)
|
|
402
|
+
# end
|
|
403
|
+
# @options
|
|
404
|
+
# end
|
|
405
|
+
#
|
|
406
|
+
# attr_reader :parser, :options
|
|
407
|
+
# end # class OptparseExample
|
|
408
|
+
#
|
|
409
|
+
# example = OptparseExample.new
|
|
410
|
+
# options = example.parse(ARGV)
|
|
411
|
+
# pp options # example.options
|
|
412
|
+
# pp ARGV
|
|
413
|
+
#
|
|
414
|
+
# === Shell Completion
|
|
415
|
+
#
|
|
416
|
+
# For modern shells (e.g. bash, zsh, etc.), you can use shell
|
|
417
|
+
# completion for command line options.
|
|
418
|
+
#
|
|
419
|
+
# === Further documentation
|
|
420
|
+
#
|
|
421
|
+
# The above examples, along with the accompanying
|
|
422
|
+
# {Tutorial}[optparse/tutorial.rdoc],
|
|
423
|
+
# should be enough to learn how to use this class.
|
|
424
|
+
# If you have any questions, file a ticket at http://bugs.ruby-lang.org.
|
|
425
|
+
#
|
|
426
|
+
class OptionParser
|
|
427
|
+
# The version string
|
|
428
|
+
OptionParser::Version = "0.6.0"
|
|
429
|
+
|
|
430
|
+
# :stopdoc:
|
|
431
|
+
NoArgument = [NO_ARGUMENT = :NONE, nil].freeze
|
|
432
|
+
RequiredArgument = [REQUIRED_ARGUMENT = :REQUIRED, true].freeze
|
|
433
|
+
OptionalArgument = [OPTIONAL_ARGUMENT = :OPTIONAL, false].freeze
|
|
434
|
+
# :startdoc:
|
|
435
|
+
|
|
436
|
+
#
|
|
437
|
+
# Keyword completion module. This allows partial arguments to be specified
|
|
438
|
+
# and resolved against a list of acceptable values.
|
|
439
|
+
#
|
|
440
|
+
module Completion
|
|
441
|
+
# :nodoc:
|
|
442
|
+
|
|
443
|
+
def self.regexp(key, icase)
|
|
444
|
+
Regexp.new('\A' + Regexp.quote(key).gsub(/\w+\b/, '\&\w*'), icase)
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
def self.candidate(key, icase = false, pat = nil, &block)
|
|
448
|
+
pat ||= Completion.regexp(key, icase)
|
|
449
|
+
candidates = []
|
|
450
|
+
block.call do |k, *v|
|
|
451
|
+
(if Regexp === k
|
|
452
|
+
kn = ""
|
|
453
|
+
k === key
|
|
454
|
+
else
|
|
455
|
+
kn = defined?(k.id2name) ? k.id2name : k
|
|
456
|
+
pat === kn
|
|
457
|
+
end) or next
|
|
458
|
+
v << k if v.empty?
|
|
459
|
+
candidates << [k, v, kn]
|
|
460
|
+
end
|
|
461
|
+
candidates
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
def candidate(key, icase = false, pat = nil, &_)
|
|
465
|
+
Completion.candidate(key, icase, pat, &method(:each))
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
public
|
|
469
|
+
def complete(key, icase = false, pat = nil)
|
|
470
|
+
candidates = candidate(key, icase, pat, &method(:each)).sort_by {|k, v, kn| kn.size}
|
|
471
|
+
if candidates.size == 1
|
|
472
|
+
canon, sw, * = candidates[0]
|
|
473
|
+
elsif candidates.size > 1
|
|
474
|
+
canon, sw, cn = candidates.shift
|
|
475
|
+
candidates.each do |k, v, kn|
|
|
476
|
+
next if sw == v
|
|
477
|
+
if String === cn and String === kn
|
|
478
|
+
if cn.rindex(kn, 0)
|
|
479
|
+
canon, sw, cn = k, v, kn
|
|
480
|
+
next
|
|
481
|
+
elsif kn.rindex(cn, 0)
|
|
482
|
+
next
|
|
483
|
+
end
|
|
484
|
+
end
|
|
485
|
+
throw :ambiguous, key
|
|
486
|
+
end
|
|
487
|
+
end
|
|
488
|
+
if canon
|
|
489
|
+
block_given? or return key, *sw
|
|
490
|
+
yield(key, *sw)
|
|
491
|
+
end
|
|
492
|
+
end
|
|
493
|
+
|
|
494
|
+
def convert(opt = nil, val = nil, *)
|
|
495
|
+
val
|
|
496
|
+
end
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
#
|
|
501
|
+
# Map from option/keyword string to object with completion.
|
|
502
|
+
#
|
|
503
|
+
class OptionMap < Hash
|
|
504
|
+
include Completion
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
#
|
|
509
|
+
# Individual switch class. Not important to the user.
|
|
510
|
+
#
|
|
511
|
+
# Defined within Switch are several Switch-derived classes: NoArgument,
|
|
512
|
+
# RequiredArgument, etc.
|
|
513
|
+
#
|
|
514
|
+
class Switch
|
|
515
|
+
# :nodoc:
|
|
516
|
+
|
|
517
|
+
attr_reader :pattern, :conv, :short, :long, :arg, :desc, :block
|
|
518
|
+
|
|
519
|
+
#
|
|
520
|
+
# Guesses argument style from +arg+. Returns corresponding
|
|
521
|
+
# OptionParser::Switch class (OptionalArgument, etc.).
|
|
522
|
+
#
|
|
523
|
+
def self.guess(arg)
|
|
524
|
+
case arg
|
|
525
|
+
when ""
|
|
526
|
+
t = self
|
|
527
|
+
when /\A=?\[/
|
|
528
|
+
t = Switch::OptionalArgument
|
|
529
|
+
when /\A\s+\[/
|
|
530
|
+
t = Switch::PlacedArgument
|
|
531
|
+
else
|
|
532
|
+
t = Switch::RequiredArgument
|
|
533
|
+
end
|
|
534
|
+
self >= t or incompatible_argument_styles(arg, t)
|
|
535
|
+
t
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
def self.incompatible_argument_styles(arg, t)
|
|
539
|
+
raise(ArgumentError, "#{arg}: incompatible argument styles\n #{self}, #{t}",
|
|
540
|
+
ParseError.filter_backtrace(caller(2)))
|
|
541
|
+
end
|
|
542
|
+
|
|
543
|
+
def self.pattern
|
|
544
|
+
NilClass
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
def initialize(pattern = nil, conv = nil,
|
|
548
|
+
short = nil, long = nil, arg = nil,
|
|
549
|
+
desc = ([] if short or long), block = nil, &_block)
|
|
550
|
+
raise if Array === pattern
|
|
551
|
+
block ||= _block
|
|
552
|
+
@pattern, @conv, @short, @long, @arg, @desc, @block =
|
|
553
|
+
pattern, conv, short, long, arg, desc, block
|
|
554
|
+
end
|
|
555
|
+
|
|
556
|
+
#
|
|
557
|
+
# Parses +arg+ and returns rest of +arg+ and matched portion to the
|
|
558
|
+
# argument pattern. Yields when the pattern doesn't match substring.
|
|
559
|
+
#
|
|
560
|
+
def parse_arg(arg) # :nodoc:
|
|
561
|
+
pattern or return nil, [arg]
|
|
562
|
+
unless m = pattern.match(arg)
|
|
563
|
+
yield(InvalidArgument, arg)
|
|
564
|
+
return arg, []
|
|
565
|
+
end
|
|
566
|
+
if String === m
|
|
567
|
+
m = [s = m]
|
|
568
|
+
else
|
|
569
|
+
m = m.to_a
|
|
570
|
+
s = m[0]
|
|
571
|
+
return nil, m unless String === s
|
|
572
|
+
end
|
|
573
|
+
raise InvalidArgument, arg unless arg.rindex(s, 0)
|
|
574
|
+
return nil, m if s.length == arg.length
|
|
575
|
+
yield(InvalidArgument, arg) # didn't match whole arg
|
|
576
|
+
return arg[s.length..-1], m
|
|
577
|
+
end
|
|
578
|
+
private :parse_arg
|
|
579
|
+
|
|
580
|
+
#
|
|
581
|
+
# Parses argument, converts and returns +arg+, +block+ and result of
|
|
582
|
+
# conversion. Yields at semi-error condition instead of raising an
|
|
583
|
+
# exception.
|
|
584
|
+
#
|
|
585
|
+
def conv_arg(arg, val = []) # :nodoc:
|
|
586
|
+
if conv
|
|
587
|
+
val = conv.call(*val)
|
|
588
|
+
else
|
|
589
|
+
val = proc {|v| v}.call(*val)
|
|
590
|
+
end
|
|
591
|
+
return arg, block, val
|
|
592
|
+
end
|
|
593
|
+
private :conv_arg
|
|
594
|
+
|
|
595
|
+
#
|
|
596
|
+
# Produces the summary text. Each line of the summary is yielded to the
|
|
597
|
+
# block (without newline).
|
|
598
|
+
#
|
|
599
|
+
# +sdone+:: Already summarized short style options keyed hash.
|
|
600
|
+
# +ldone+:: Already summarized long style options keyed hash.
|
|
601
|
+
# +width+:: Width of left side (option part). In other words, the right
|
|
602
|
+
# side (description part) starts after +width+ columns.
|
|
603
|
+
# +max+:: Maximum width of left side -> the options are filled within
|
|
604
|
+
# +max+ columns.
|
|
605
|
+
# +indent+:: Prefix string indents all summarized lines.
|
|
606
|
+
#
|
|
607
|
+
def summarize(sdone = {}, ldone = {}, width = 1, max = width - 1, indent = "")
|
|
608
|
+
sopts, lopts = [], [], nil
|
|
609
|
+
@short.each {|s| sdone.fetch(s) {sopts << s}; sdone[s] = true} if @short
|
|
610
|
+
@long.each {|s| ldone.fetch(s) {lopts << s}; ldone[s] = true} if @long
|
|
611
|
+
return if sopts.empty? and lopts.empty? # completely hidden
|
|
612
|
+
|
|
613
|
+
left = [sopts.join(', ')]
|
|
614
|
+
right = desc.dup
|
|
615
|
+
|
|
616
|
+
while s = lopts.shift
|
|
617
|
+
l = left[-1].length + s.length
|
|
618
|
+
l += arg.length if left.size == 1 && arg
|
|
619
|
+
l < max or sopts.empty? or left << +''
|
|
620
|
+
left[-1] << (left[-1].empty? ? ' ' * 4 : ', ') << s
|
|
621
|
+
end
|
|
622
|
+
|
|
623
|
+
if arg
|
|
624
|
+
left[0] << (left[1] ? arg.sub(/\A(\[?)=/, '\1') + ',' : arg)
|
|
625
|
+
end
|
|
626
|
+
mlen = left.collect {|ss| ss.length}.max.to_i
|
|
627
|
+
while mlen > width and l = left.shift
|
|
628
|
+
mlen = left.collect {|ss| ss.length}.max.to_i if l.length == mlen
|
|
629
|
+
if l.length < width and (r = right[0]) and !r.empty?
|
|
630
|
+
l = l.to_s.ljust(width) + ' ' + r
|
|
631
|
+
right.shift
|
|
632
|
+
end
|
|
633
|
+
yield(indent + l)
|
|
634
|
+
end
|
|
635
|
+
|
|
636
|
+
while begin l = left.shift; r = right.shift; l or r end
|
|
637
|
+
l = l.to_s.ljust(width) + ' ' + r if r and !r.empty?
|
|
638
|
+
yield(indent + l)
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
self
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
def add_banner(to) # :nodoc:
|
|
645
|
+
unless @short or @long
|
|
646
|
+
s = desc.join
|
|
647
|
+
to << " [" + s + "]..." unless s.empty?
|
|
648
|
+
end
|
|
649
|
+
to
|
|
650
|
+
end
|
|
651
|
+
|
|
652
|
+
def match_nonswitch?(str) # :nodoc:
|
|
653
|
+
@pattern =~ str unless @short or @long
|
|
654
|
+
end
|
|
655
|
+
|
|
656
|
+
#
|
|
657
|
+
# Main name of the switch.
|
|
658
|
+
#
|
|
659
|
+
def switch_name
|
|
660
|
+
(long.first || short.first).sub(/\A-+(?:\[no-\])?/, '')
|
|
661
|
+
end
|
|
662
|
+
|
|
663
|
+
def compsys(sdone, ldone) # :nodoc:
|
|
664
|
+
sopts, lopts = [], []
|
|
665
|
+
@short.each {|s| sdone.fetch(s) {sopts << s}; sdone[s] = true} if @short
|
|
666
|
+
@long.each {|s| ldone.fetch(s) {lopts << s}; ldone[s] = true} if @long
|
|
667
|
+
return if sopts.empty? and lopts.empty? # completely hidden
|
|
668
|
+
|
|
669
|
+
(sopts+lopts).each do |opt|
|
|
670
|
+
# "(-x -c -r)-l[left justify]"
|
|
671
|
+
if /^--\[no-\](.+)$/ =~ opt
|
|
672
|
+
o = $1
|
|
673
|
+
yield("--#{o}", desc.join(""))
|
|
674
|
+
yield("--no-#{o}", desc.join(""))
|
|
675
|
+
else
|
|
676
|
+
yield("#{opt}", desc.join(""))
|
|
677
|
+
end
|
|
678
|
+
end
|
|
679
|
+
end
|
|
680
|
+
|
|
681
|
+
def pretty_print_contents(q) # :nodoc:
|
|
682
|
+
if @block
|
|
683
|
+
q.text ":" + @block.source_location.join(":") + ":"
|
|
684
|
+
first = false
|
|
685
|
+
else
|
|
686
|
+
first = true
|
|
687
|
+
end
|
|
688
|
+
[@short, @long].each do |list|
|
|
689
|
+
list.each do |opt|
|
|
690
|
+
if first
|
|
691
|
+
q.text ":"
|
|
692
|
+
first = false
|
|
693
|
+
end
|
|
694
|
+
q.breakable
|
|
695
|
+
q.text opt
|
|
696
|
+
end
|
|
697
|
+
end
|
|
698
|
+
end
|
|
699
|
+
|
|
700
|
+
def pretty_print(q) # :nodoc:
|
|
701
|
+
q.object_group(self) {pretty_print_contents(q)}
|
|
702
|
+
end
|
|
703
|
+
|
|
704
|
+
def omitted_argument(val) # :nodoc:
|
|
705
|
+
val.pop if val.size == 3 and val.last.nil?
|
|
706
|
+
val
|
|
707
|
+
end
|
|
708
|
+
|
|
709
|
+
#
|
|
710
|
+
# Switch that takes no arguments.
|
|
711
|
+
#
|
|
712
|
+
class NoArgument < self
|
|
713
|
+
|
|
714
|
+
#
|
|
715
|
+
# Raises an exception if any arguments given.
|
|
716
|
+
#
|
|
717
|
+
def parse(arg, argv)
|
|
718
|
+
yield(NeedlessArgument, arg) if arg
|
|
719
|
+
conv_arg(arg)
|
|
720
|
+
end
|
|
721
|
+
|
|
722
|
+
def self.incompatible_argument_styles(*) # :nodoc:
|
|
723
|
+
end
|
|
724
|
+
|
|
725
|
+
def self.pattern # :nodoc:
|
|
726
|
+
Object
|
|
727
|
+
end
|
|
728
|
+
|
|
729
|
+
def pretty_head # :nodoc:
|
|
730
|
+
"NoArgument"
|
|
731
|
+
end
|
|
732
|
+
end
|
|
733
|
+
|
|
734
|
+
#
|
|
735
|
+
# Switch that takes an argument.
|
|
736
|
+
#
|
|
737
|
+
class RequiredArgument < self
|
|
738
|
+
|
|
739
|
+
#
|
|
740
|
+
# Raises an exception if argument is not present.
|
|
741
|
+
#
|
|
742
|
+
def parse(arg, argv, &_)
|
|
743
|
+
unless arg
|
|
744
|
+
raise MissingArgument if argv.empty?
|
|
745
|
+
arg = argv.shift
|
|
746
|
+
end
|
|
747
|
+
conv_arg(*parse_arg(arg, &method(:raise)))
|
|
748
|
+
end
|
|
749
|
+
|
|
750
|
+
def pretty_head # :nodoc:
|
|
751
|
+
"Required"
|
|
752
|
+
end
|
|
753
|
+
end
|
|
754
|
+
|
|
755
|
+
#
|
|
756
|
+
# Switch that can omit argument.
|
|
757
|
+
#
|
|
758
|
+
class OptionalArgument < self
|
|
759
|
+
|
|
760
|
+
#
|
|
761
|
+
# Parses argument if given, or uses default value.
|
|
762
|
+
#
|
|
763
|
+
def parse(arg, argv, &error)
|
|
764
|
+
if arg
|
|
765
|
+
conv_arg(*parse_arg(arg, &error))
|
|
766
|
+
else
|
|
767
|
+
omitted_argument conv_arg(arg)
|
|
768
|
+
end
|
|
769
|
+
end
|
|
770
|
+
|
|
771
|
+
def pretty_head # :nodoc:
|
|
772
|
+
"Optional"
|
|
773
|
+
end
|
|
774
|
+
end
|
|
775
|
+
|
|
776
|
+
#
|
|
777
|
+
# Switch that takes an argument, which does not begin with '-' or is '-'.
|
|
778
|
+
#
|
|
779
|
+
class PlacedArgument < self
|
|
780
|
+
|
|
781
|
+
#
|
|
782
|
+
# Returns nil if argument is not present or begins with '-' and is not '-'.
|
|
783
|
+
#
|
|
784
|
+
def parse(arg, argv, &error)
|
|
785
|
+
if !(val = arg) and (argv.empty? or /\A-./ =~ (val = argv[0]))
|
|
786
|
+
return nil, block
|
|
787
|
+
end
|
|
788
|
+
opt = (val = parse_arg(val, &error))[1]
|
|
789
|
+
val = conv_arg(*val)
|
|
790
|
+
if opt and !arg
|
|
791
|
+
argv.shift
|
|
792
|
+
else
|
|
793
|
+
omitted_argument val
|
|
794
|
+
val[0] = nil
|
|
795
|
+
end
|
|
796
|
+
val
|
|
797
|
+
end
|
|
798
|
+
|
|
799
|
+
def pretty_head # :nodoc:
|
|
800
|
+
"Placed"
|
|
801
|
+
end
|
|
802
|
+
end
|
|
803
|
+
end
|
|
804
|
+
|
|
805
|
+
#
|
|
806
|
+
# Simple option list providing mapping from short and/or long option
|
|
807
|
+
# string to OptionParser::Switch and mapping from acceptable argument to
|
|
808
|
+
# matching pattern and converter pair. Also provides summary feature.
|
|
809
|
+
#
|
|
810
|
+
class List
|
|
811
|
+
# :nodoc:
|
|
812
|
+
|
|
813
|
+
# Map from acceptable argument types to pattern and converter pairs.
|
|
814
|
+
attr_reader :atype
|
|
815
|
+
|
|
816
|
+
# Map from short style option switches to actual switch objects.
|
|
817
|
+
attr_reader :short
|
|
818
|
+
|
|
819
|
+
# Map from long style option switches to actual switch objects.
|
|
820
|
+
attr_reader :long
|
|
821
|
+
|
|
822
|
+
# List of all switches and summary string.
|
|
823
|
+
attr_reader :list
|
|
824
|
+
|
|
825
|
+
#
|
|
826
|
+
# Just initializes all instance variables.
|
|
827
|
+
#
|
|
828
|
+
def initialize
|
|
829
|
+
@atype = {}
|
|
830
|
+
@short = OptionMap.new
|
|
831
|
+
@long = OptionMap.new
|
|
832
|
+
@list = []
|
|
833
|
+
end
|
|
834
|
+
|
|
835
|
+
def pretty_print(q) # :nodoc:
|
|
836
|
+
q.group(1, "(", ")") do
|
|
837
|
+
@list.each do |sw|
|
|
838
|
+
next unless Switch === sw
|
|
839
|
+
q.group(1, "(" + sw.pretty_head, ")") do
|
|
840
|
+
sw.pretty_print_contents(q)
|
|
841
|
+
end
|
|
842
|
+
end
|
|
843
|
+
end
|
|
844
|
+
end
|
|
845
|
+
|
|
846
|
+
#
|
|
847
|
+
# See OptionParser.accept.
|
|
848
|
+
#
|
|
849
|
+
def accept(t, pat = /.*/m, &block)
|
|
850
|
+
if pat
|
|
851
|
+
pat.respond_to?(:match) or
|
|
852
|
+
raise TypeError, "has no 'match'", ParseError.filter_backtrace(caller(2))
|
|
853
|
+
else
|
|
854
|
+
pat = t if t.respond_to?(:match)
|
|
855
|
+
end
|
|
856
|
+
unless block
|
|
857
|
+
block = pat.method(:convert).to_proc if pat.respond_to?(:convert)
|
|
858
|
+
end
|
|
859
|
+
@atype[t] = [pat, block]
|
|
860
|
+
end
|
|
861
|
+
|
|
862
|
+
#
|
|
863
|
+
# See OptionParser.reject.
|
|
864
|
+
#
|
|
865
|
+
def reject(t)
|
|
866
|
+
@atype.delete(t)
|
|
867
|
+
end
|
|
868
|
+
|
|
869
|
+
#
|
|
870
|
+
# Adds +sw+ according to +sopts+, +lopts+ and +nlopts+.
|
|
871
|
+
#
|
|
872
|
+
# +sw+:: OptionParser::Switch instance to be added.
|
|
873
|
+
# +sopts+:: Short style option list.
|
|
874
|
+
# +lopts+:: Long style option list.
|
|
875
|
+
# +nlopts+:: Negated long style options list.
|
|
876
|
+
#
|
|
877
|
+
def update(sw, sopts, lopts, nsw = nil, nlopts = nil) # :nodoc:
|
|
878
|
+
sopts.each {|o| @short[o] = sw} if sopts
|
|
879
|
+
lopts.each {|o| @long[o] = sw} if lopts
|
|
880
|
+
nlopts.each {|o| @long[o] = nsw} if nsw and nlopts
|
|
881
|
+
used = @short.invert.update(@long.invert)
|
|
882
|
+
@list.delete_if {|o| Switch === o and !used[o]}
|
|
883
|
+
end
|
|
884
|
+
private :update
|
|
885
|
+
|
|
886
|
+
#
|
|
887
|
+
# Inserts +switch+ at the head of the list, and associates short, long
|
|
888
|
+
# and negated long options. Arguments are:
|
|
889
|
+
#
|
|
890
|
+
# +switch+:: OptionParser::Switch instance to be inserted.
|
|
891
|
+
# +short_opts+:: List of short style options.
|
|
892
|
+
# +long_opts+:: List of long style options.
|
|
893
|
+
# +nolong_opts+:: List of long style options with "no-" prefix.
|
|
894
|
+
#
|
|
895
|
+
# prepend(switch, short_opts, long_opts, nolong_opts)
|
|
896
|
+
#
|
|
897
|
+
def prepend(*args)
|
|
898
|
+
update(*args)
|
|
899
|
+
@list.unshift(args[0])
|
|
900
|
+
end
|
|
901
|
+
|
|
902
|
+
#
|
|
903
|
+
# Appends +switch+ at the tail of the list, and associates short, long
|
|
904
|
+
# and negated long options. Arguments are:
|
|
905
|
+
#
|
|
906
|
+
# +switch+:: OptionParser::Switch instance to be inserted.
|
|
907
|
+
# +short_opts+:: List of short style options.
|
|
908
|
+
# +long_opts+:: List of long style options.
|
|
909
|
+
# +nolong_opts+:: List of long style options with "no-" prefix.
|
|
910
|
+
#
|
|
911
|
+
# append(switch, short_opts, long_opts, nolong_opts)
|
|
912
|
+
#
|
|
913
|
+
def append(*args)
|
|
914
|
+
update(*args)
|
|
915
|
+
@list.push(args[0])
|
|
916
|
+
end
|
|
917
|
+
|
|
918
|
+
#
|
|
919
|
+
# Searches +key+ in +id+ list. The result is returned or yielded if a
|
|
920
|
+
# block is given. If it isn't found, nil is returned.
|
|
921
|
+
#
|
|
922
|
+
def search(id, key)
|
|
923
|
+
if list = __send__(id)
|
|
924
|
+
val = list.fetch(key) {return nil}
|
|
925
|
+
block_given? ? yield(val) : val
|
|
926
|
+
end
|
|
927
|
+
end
|
|
928
|
+
|
|
929
|
+
#
|
|
930
|
+
# Searches list +id+ for +opt+ and the optional patterns for completion
|
|
931
|
+
# +pat+. If +icase+ is true, the search is case insensitive. The result
|
|
932
|
+
# is returned or yielded if a block is given. If it isn't found, nil is
|
|
933
|
+
# returned.
|
|
934
|
+
#
|
|
935
|
+
def complete(id, opt, icase = false, *pat, &block)
|
|
936
|
+
__send__(id).complete(opt, icase, *pat, &block)
|
|
937
|
+
end
|
|
938
|
+
|
|
939
|
+
def get_candidates(id)
|
|
940
|
+
yield __send__(id).keys
|
|
941
|
+
end
|
|
942
|
+
|
|
943
|
+
#
|
|
944
|
+
# Iterates over each option, passing the option to the +block+.
|
|
945
|
+
#
|
|
946
|
+
def each_option(&block)
|
|
947
|
+
list.each(&block)
|
|
948
|
+
end
|
|
949
|
+
|
|
950
|
+
#
|
|
951
|
+
# Creates the summary table, passing each line to the +block+ (without
|
|
952
|
+
# newline). The arguments +args+ are passed along to the summarize
|
|
953
|
+
# method which is called on every option.
|
|
954
|
+
#
|
|
955
|
+
def summarize(*args, &block)
|
|
956
|
+
sum = []
|
|
957
|
+
list.reverse_each do |opt|
|
|
958
|
+
if opt.respond_to?(:summarize) # perhaps OptionParser::Switch
|
|
959
|
+
s = []
|
|
960
|
+
opt.summarize(*args) {|l| s << l}
|
|
961
|
+
sum.concat(s.reverse)
|
|
962
|
+
elsif !opt or opt.empty?
|
|
963
|
+
sum << ""
|
|
964
|
+
elsif opt.respond_to?(:each_line)
|
|
965
|
+
sum.concat([*opt.each_line].reverse)
|
|
966
|
+
else
|
|
967
|
+
sum.concat([*opt.each].reverse)
|
|
968
|
+
end
|
|
969
|
+
end
|
|
970
|
+
sum.reverse_each(&block)
|
|
971
|
+
end
|
|
972
|
+
|
|
973
|
+
def add_banner(to) # :nodoc:
|
|
974
|
+
list.each do |opt|
|
|
975
|
+
if opt.respond_to?(:add_banner)
|
|
976
|
+
opt.add_banner(to)
|
|
977
|
+
end
|
|
978
|
+
end
|
|
979
|
+
to
|
|
980
|
+
end
|
|
981
|
+
|
|
982
|
+
def compsys(*args, &block) # :nodoc:
|
|
983
|
+
list.each do |opt|
|
|
984
|
+
if opt.respond_to?(:compsys)
|
|
985
|
+
opt.compsys(*args, &block)
|
|
986
|
+
end
|
|
987
|
+
end
|
|
988
|
+
end
|
|
989
|
+
end
|
|
990
|
+
|
|
991
|
+
#
|
|
992
|
+
# Hash with completion search feature. See OptionParser::Completion.
|
|
993
|
+
#
|
|
994
|
+
class CompletingHash < Hash
|
|
995
|
+
include Completion
|
|
996
|
+
|
|
997
|
+
#
|
|
998
|
+
# Completion for hash key.
|
|
999
|
+
#
|
|
1000
|
+
def match(key)
|
|
1001
|
+
*values = fetch(key) {
|
|
1002
|
+
raise AmbiguousArgument, catch(:ambiguous) {return complete(key)}
|
|
1003
|
+
}
|
|
1004
|
+
return key, *values
|
|
1005
|
+
end
|
|
1006
|
+
end
|
|
1007
|
+
|
|
1008
|
+
# :stopdoc:
|
|
1009
|
+
|
|
1010
|
+
#
|
|
1011
|
+
# Enumeration of acceptable argument styles. Possible values are:
|
|
1012
|
+
#
|
|
1013
|
+
# NO_ARGUMENT:: The switch takes no arguments. (:NONE)
|
|
1014
|
+
# REQUIRED_ARGUMENT:: The switch requires an argument. (:REQUIRED)
|
|
1015
|
+
# OPTIONAL_ARGUMENT:: The switch requires an optional argument. (:OPTIONAL)
|
|
1016
|
+
#
|
|
1017
|
+
# Use like --switch=argument (long style) or -Xargument (short style). For
|
|
1018
|
+
# short style, only portion matched to argument pattern is treated as
|
|
1019
|
+
# argument.
|
|
1020
|
+
#
|
|
1021
|
+
ArgumentStyle = {}
|
|
1022
|
+
NoArgument.each {|el| ArgumentStyle[el] = Switch::NoArgument}
|
|
1023
|
+
RequiredArgument.each {|el| ArgumentStyle[el] = Switch::RequiredArgument}
|
|
1024
|
+
OptionalArgument.each {|el| ArgumentStyle[el] = Switch::OptionalArgument}
|
|
1025
|
+
ArgumentStyle.freeze
|
|
1026
|
+
|
|
1027
|
+
#
|
|
1028
|
+
# Switches common used such as '--', and also provides default
|
|
1029
|
+
# argument classes
|
|
1030
|
+
#
|
|
1031
|
+
DefaultList = List.new
|
|
1032
|
+
DefaultList.short['-'] = Switch::NoArgument.new {}
|
|
1033
|
+
DefaultList.long[''] = Switch::NoArgument.new {throw :terminate}
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
COMPSYS_HEADER = <<'XXX' # :nodoc:
|
|
1037
|
+
|
|
1038
|
+
typeset -A opt_args
|
|
1039
|
+
local context state line
|
|
1040
|
+
|
|
1041
|
+
_arguments -s -S \
|
|
1042
|
+
XXX
|
|
1043
|
+
|
|
1044
|
+
def compsys(to, name = File.basename($0)) # :nodoc:
|
|
1045
|
+
to << "#compdef #{name}\n"
|
|
1046
|
+
to << COMPSYS_HEADER
|
|
1047
|
+
visit(:compsys, {}, {}) {|o, d|
|
|
1048
|
+
to << %Q[ "#{o}[#{d.gsub(/[\\\"\[\]]/, '\\\\\&')}]" \\\n]
|
|
1049
|
+
}
|
|
1050
|
+
to << " '*:file:_files' && return 0\n"
|
|
1051
|
+
end
|
|
1052
|
+
|
|
1053
|
+
def help_exit
|
|
1054
|
+
if STDOUT.tty? && (pager = ENV.values_at(*%w[RUBY_PAGER PAGER]).find {|e| e && !e.empty?})
|
|
1055
|
+
less = ENV["LESS"]
|
|
1056
|
+
args = [{"LESS" => "#{!less || less.empty? ? '-' : less}Fe"}, pager, "w"]
|
|
1057
|
+
print = proc do |f|
|
|
1058
|
+
f.puts help
|
|
1059
|
+
rescue Errno::EPIPE
|
|
1060
|
+
# pager terminated
|
|
1061
|
+
end
|
|
1062
|
+
if Process.respond_to?(:fork) and false
|
|
1063
|
+
IO.popen("-") {|f| f ? Process.exec(*args, in: f) : print.call(STDOUT)}
|
|
1064
|
+
# unreachable
|
|
1065
|
+
end
|
|
1066
|
+
IO.popen(*args, &print)
|
|
1067
|
+
else
|
|
1068
|
+
puts help
|
|
1069
|
+
end
|
|
1070
|
+
exit
|
|
1071
|
+
end
|
|
1072
|
+
|
|
1073
|
+
#
|
|
1074
|
+
# Default options for ARGV, which never appear in option summary.
|
|
1075
|
+
#
|
|
1076
|
+
Officious = {}
|
|
1077
|
+
|
|
1078
|
+
#
|
|
1079
|
+
# --help
|
|
1080
|
+
# Shows option summary.
|
|
1081
|
+
#
|
|
1082
|
+
Officious['help'] = proc do |parser|
|
|
1083
|
+
Switch::NoArgument.new do |arg|
|
|
1084
|
+
parser.help_exit
|
|
1085
|
+
end
|
|
1086
|
+
end
|
|
1087
|
+
|
|
1088
|
+
#
|
|
1089
|
+
# --*-completion-bash=WORD
|
|
1090
|
+
# Shows candidates for command line completion.
|
|
1091
|
+
#
|
|
1092
|
+
Officious['*-completion-bash'] = proc do |parser|
|
|
1093
|
+
Switch::RequiredArgument.new do |arg|
|
|
1094
|
+
puts parser.candidate(arg)
|
|
1095
|
+
exit
|
|
1096
|
+
end
|
|
1097
|
+
end
|
|
1098
|
+
|
|
1099
|
+
#
|
|
1100
|
+
# --*-completion-zsh[=NAME:FILE]
|
|
1101
|
+
# Creates zsh completion file.
|
|
1102
|
+
#
|
|
1103
|
+
Officious['*-completion-zsh'] = proc do |parser|
|
|
1104
|
+
Switch::OptionalArgument.new do |arg|
|
|
1105
|
+
parser.compsys(STDOUT, arg)
|
|
1106
|
+
exit
|
|
1107
|
+
end
|
|
1108
|
+
end
|
|
1109
|
+
|
|
1110
|
+
#
|
|
1111
|
+
# --version
|
|
1112
|
+
# Shows version string if Version is defined.
|
|
1113
|
+
#
|
|
1114
|
+
Officious['version'] = proc do |parser|
|
|
1115
|
+
Switch::OptionalArgument.new do |pkg|
|
|
1116
|
+
if pkg
|
|
1117
|
+
begin
|
|
1118
|
+
require_relative 'optparse/version'
|
|
1119
|
+
rescue LoadError
|
|
1120
|
+
else
|
|
1121
|
+
show_version(*pkg.split(/,/)) or
|
|
1122
|
+
abort("#{parser.program_name}: no version found in package #{pkg}")
|
|
1123
|
+
exit
|
|
1124
|
+
end
|
|
1125
|
+
end
|
|
1126
|
+
v = parser.ver or abort("#{parser.program_name}: version unknown")
|
|
1127
|
+
puts v
|
|
1128
|
+
exit
|
|
1129
|
+
end
|
|
1130
|
+
end
|
|
1131
|
+
|
|
1132
|
+
# :startdoc:
|
|
1133
|
+
|
|
1134
|
+
#
|
|
1135
|
+
# Class methods
|
|
1136
|
+
#
|
|
1137
|
+
|
|
1138
|
+
#
|
|
1139
|
+
# Initializes a new instance and evaluates the optional block in context
|
|
1140
|
+
# of the instance. Arguments +args+ are passed to #new, see there for
|
|
1141
|
+
# description of parameters.
|
|
1142
|
+
#
|
|
1143
|
+
# This method is *deprecated*, its behavior corresponds to the older #new
|
|
1144
|
+
# method.
|
|
1145
|
+
#
|
|
1146
|
+
def self.with(*args, &block)
|
|
1147
|
+
opts = new(*args)
|
|
1148
|
+
opts.instance_eval(&block)
|
|
1149
|
+
opts
|
|
1150
|
+
end
|
|
1151
|
+
|
|
1152
|
+
#
|
|
1153
|
+
# Returns an incremented value of +default+ according to +arg+.
|
|
1154
|
+
#
|
|
1155
|
+
def self.inc(arg, default = nil)
|
|
1156
|
+
case arg
|
|
1157
|
+
when Integer
|
|
1158
|
+
arg.nonzero?
|
|
1159
|
+
when nil
|
|
1160
|
+
default.to_i + 1
|
|
1161
|
+
end
|
|
1162
|
+
end
|
|
1163
|
+
|
|
1164
|
+
#
|
|
1165
|
+
# See self.inc
|
|
1166
|
+
#
|
|
1167
|
+
def inc(*args)
|
|
1168
|
+
self.class.inc(*args)
|
|
1169
|
+
end
|
|
1170
|
+
|
|
1171
|
+
#
|
|
1172
|
+
# Initializes the instance and yields itself if called with a block.
|
|
1173
|
+
#
|
|
1174
|
+
# +banner+:: Banner message.
|
|
1175
|
+
# +width+:: Summary width.
|
|
1176
|
+
# +indent+:: Summary indent.
|
|
1177
|
+
#
|
|
1178
|
+
def initialize(banner = nil, width = 32, indent = ' ' * 4)
|
|
1179
|
+
@stack = [DefaultList, List.new, List.new]
|
|
1180
|
+
@program_name = nil
|
|
1181
|
+
@banner = banner
|
|
1182
|
+
@summary_width = width
|
|
1183
|
+
@summary_indent = indent
|
|
1184
|
+
@default_argv = ARGV
|
|
1185
|
+
@require_exact = false
|
|
1186
|
+
@raise_unknown = true
|
|
1187
|
+
add_officious
|
|
1188
|
+
yield self if block_given?
|
|
1189
|
+
end
|
|
1190
|
+
|
|
1191
|
+
def add_officious # :nodoc:
|
|
1192
|
+
list = base()
|
|
1193
|
+
Officious.each do |opt, block|
|
|
1194
|
+
list.long[opt] ||= block.call(self)
|
|
1195
|
+
end
|
|
1196
|
+
end
|
|
1197
|
+
|
|
1198
|
+
#
|
|
1199
|
+
# Terminates option parsing. Optional parameter +arg+ is a string pushed
|
|
1200
|
+
# back to be the first non-option argument.
|
|
1201
|
+
#
|
|
1202
|
+
def terminate(arg = nil)
|
|
1203
|
+
self.class.terminate(arg)
|
|
1204
|
+
end
|
|
1205
|
+
#
|
|
1206
|
+
# See #terminate.
|
|
1207
|
+
#
|
|
1208
|
+
def self.terminate(arg = nil)
|
|
1209
|
+
throw :terminate, arg
|
|
1210
|
+
end
|
|
1211
|
+
|
|
1212
|
+
@stack = [DefaultList]
|
|
1213
|
+
#
|
|
1214
|
+
# Returns the global top option list.
|
|
1215
|
+
#
|
|
1216
|
+
# Do not use directly.
|
|
1217
|
+
#
|
|
1218
|
+
def self.top() DefaultList end
|
|
1219
|
+
|
|
1220
|
+
#
|
|
1221
|
+
# Directs to accept specified class +t+. The argument string is passed to
|
|
1222
|
+
# the block in which it should be converted to the desired class.
|
|
1223
|
+
#
|
|
1224
|
+
# +t+:: Argument class specifier, any object including Class.
|
|
1225
|
+
# +pat+:: Pattern for argument, defaults to +t+ if it responds to match.
|
|
1226
|
+
#
|
|
1227
|
+
# accept(t, pat, &block)
|
|
1228
|
+
#
|
|
1229
|
+
def accept(*args, &blk) top.accept(*args, &blk) end
|
|
1230
|
+
#
|
|
1231
|
+
# See #accept.
|
|
1232
|
+
#
|
|
1233
|
+
def self.accept(*args, &blk) top.accept(*args, &blk) end
|
|
1234
|
+
|
|
1235
|
+
#
|
|
1236
|
+
# Directs to reject specified class argument.
|
|
1237
|
+
#
|
|
1238
|
+
# +type+:: Argument class specifier, any object including Class.
|
|
1239
|
+
#
|
|
1240
|
+
# reject(type)
|
|
1241
|
+
#
|
|
1242
|
+
def reject(*args, &blk) top.reject(*args, &blk) end
|
|
1243
|
+
#
|
|
1244
|
+
# See #reject.
|
|
1245
|
+
#
|
|
1246
|
+
def self.reject(*args, &blk) top.reject(*args, &blk) end
|
|
1247
|
+
|
|
1248
|
+
#
|
|
1249
|
+
# Instance methods
|
|
1250
|
+
#
|
|
1251
|
+
|
|
1252
|
+
# Heading banner preceding summary.
|
|
1253
|
+
attr_writer :banner
|
|
1254
|
+
|
|
1255
|
+
# Program name to be emitted in error message and default banner,
|
|
1256
|
+
# defaults to $0.
|
|
1257
|
+
attr_writer :program_name
|
|
1258
|
+
|
|
1259
|
+
# Width for option list portion of summary. Must be Numeric.
|
|
1260
|
+
attr_accessor :summary_width
|
|
1261
|
+
|
|
1262
|
+
# Indentation for summary. Must be String (or have + String method).
|
|
1263
|
+
attr_accessor :summary_indent
|
|
1264
|
+
|
|
1265
|
+
# Strings to be parsed in default.
|
|
1266
|
+
attr_accessor :default_argv
|
|
1267
|
+
|
|
1268
|
+
# Whether to require that options match exactly (disallows providing
|
|
1269
|
+
# abbreviated long option as short option).
|
|
1270
|
+
attr_accessor :require_exact
|
|
1271
|
+
|
|
1272
|
+
# Whether to raise at unknown option.
|
|
1273
|
+
attr_accessor :raise_unknown
|
|
1274
|
+
|
|
1275
|
+
#
|
|
1276
|
+
# Heading banner preceding summary.
|
|
1277
|
+
#
|
|
1278
|
+
def banner
|
|
1279
|
+
unless @banner
|
|
1280
|
+
@banner = +"Usage: #{program_name} [options]"
|
|
1281
|
+
visit(:add_banner, @banner)
|
|
1282
|
+
end
|
|
1283
|
+
@banner
|
|
1284
|
+
end
|
|
1285
|
+
|
|
1286
|
+
#
|
|
1287
|
+
# Program name to be emitted in error message and default banner, defaults
|
|
1288
|
+
# to $0.
|
|
1289
|
+
#
|
|
1290
|
+
def program_name
|
|
1291
|
+
@program_name || File.basename($0, '.*')
|
|
1292
|
+
end
|
|
1293
|
+
|
|
1294
|
+
# for experimental cascading :-)
|
|
1295
|
+
alias set_banner banner=
|
|
1296
|
+
alias set_program_name program_name=
|
|
1297
|
+
alias set_summary_width summary_width=
|
|
1298
|
+
alias set_summary_indent summary_indent=
|
|
1299
|
+
|
|
1300
|
+
# Version
|
|
1301
|
+
attr_writer :version
|
|
1302
|
+
# Release code
|
|
1303
|
+
attr_writer :release
|
|
1304
|
+
|
|
1305
|
+
#
|
|
1306
|
+
# Version
|
|
1307
|
+
#
|
|
1308
|
+
def version
|
|
1309
|
+
(defined?(@version) && @version) || (defined?(::Version) && ::Version)
|
|
1310
|
+
end
|
|
1311
|
+
|
|
1312
|
+
#
|
|
1313
|
+
# Release code
|
|
1314
|
+
#
|
|
1315
|
+
def release
|
|
1316
|
+
(defined?(@release) && @release) || (defined?(::Release) && ::Release) || (defined?(::RELEASE) && ::RELEASE)
|
|
1317
|
+
end
|
|
1318
|
+
|
|
1319
|
+
#
|
|
1320
|
+
# Returns version string from program_name, version and release.
|
|
1321
|
+
#
|
|
1322
|
+
def ver
|
|
1323
|
+
if v = version
|
|
1324
|
+
str = +"#{program_name} #{[v].join('.')}"
|
|
1325
|
+
str << " (#{v})" if v = release
|
|
1326
|
+
str
|
|
1327
|
+
end
|
|
1328
|
+
end
|
|
1329
|
+
|
|
1330
|
+
#
|
|
1331
|
+
# Shows warning message with the program name
|
|
1332
|
+
#
|
|
1333
|
+
# +mesg+:: Message, defaulted to +$!+.
|
|
1334
|
+
#
|
|
1335
|
+
# See Kernel#warn.
|
|
1336
|
+
#
|
|
1337
|
+
def warn(mesg = $!)
|
|
1338
|
+
super("#{program_name}: #{mesg}")
|
|
1339
|
+
end
|
|
1340
|
+
|
|
1341
|
+
#
|
|
1342
|
+
# Shows message with the program name then aborts.
|
|
1343
|
+
#
|
|
1344
|
+
# +mesg+:: Message, defaulted to +$!+.
|
|
1345
|
+
#
|
|
1346
|
+
# See Kernel#abort.
|
|
1347
|
+
#
|
|
1348
|
+
def abort(mesg = $!)
|
|
1349
|
+
super("#{program_name}: #{mesg}")
|
|
1350
|
+
end
|
|
1351
|
+
|
|
1352
|
+
#
|
|
1353
|
+
# Subject of #on / #on_head, #accept / #reject
|
|
1354
|
+
#
|
|
1355
|
+
def top
|
|
1356
|
+
@stack[-1]
|
|
1357
|
+
end
|
|
1358
|
+
|
|
1359
|
+
#
|
|
1360
|
+
# Subject of #on_tail.
|
|
1361
|
+
#
|
|
1362
|
+
def base
|
|
1363
|
+
@stack[1]
|
|
1364
|
+
end
|
|
1365
|
+
|
|
1366
|
+
#
|
|
1367
|
+
# Pushes a new List.
|
|
1368
|
+
#
|
|
1369
|
+
# If a block is given, yields +self+ and returns the result of the
|
|
1370
|
+
# block, otherwise returns +self+.
|
|
1371
|
+
#
|
|
1372
|
+
def new
|
|
1373
|
+
@stack.push(List.new)
|
|
1374
|
+
if block_given?
|
|
1375
|
+
yield self
|
|
1376
|
+
else
|
|
1377
|
+
self
|
|
1378
|
+
end
|
|
1379
|
+
end
|
|
1380
|
+
|
|
1381
|
+
#
|
|
1382
|
+
# Removes the last List.
|
|
1383
|
+
#
|
|
1384
|
+
def remove
|
|
1385
|
+
@stack.pop
|
|
1386
|
+
end
|
|
1387
|
+
|
|
1388
|
+
#
|
|
1389
|
+
# Puts option summary into +to+ and returns +to+. Yields each line if
|
|
1390
|
+
# a block is given.
|
|
1391
|
+
#
|
|
1392
|
+
# +to+:: Output destination, which must have method <<. Defaults to [].
|
|
1393
|
+
# +width+:: Width of left side, defaults to @summary_width.
|
|
1394
|
+
# +max+:: Maximum length allowed for left side, defaults to +width+ - 1.
|
|
1395
|
+
# +indent+:: Indentation, defaults to @summary_indent.
|
|
1396
|
+
#
|
|
1397
|
+
def summarize(to = [], width = @summary_width, max = width - 1, indent = @summary_indent, &blk)
|
|
1398
|
+
nl = "\n"
|
|
1399
|
+
blk ||= proc {|l| to << (l.index(nl, -1) ? l : l + nl)}
|
|
1400
|
+
visit(:summarize, {}, {}, width, max, indent, &blk)
|
|
1401
|
+
to
|
|
1402
|
+
end
|
|
1403
|
+
|
|
1404
|
+
#
|
|
1405
|
+
# Returns option summary string.
|
|
1406
|
+
#
|
|
1407
|
+
def help; summarize("#{banner}".sub(/\n?\z/, "\n")) end
|
|
1408
|
+
alias to_s help
|
|
1409
|
+
|
|
1410
|
+
def pretty_print(q) # :nodoc:
|
|
1411
|
+
q.object_group(self) do
|
|
1412
|
+
first = true
|
|
1413
|
+
if @stack.size > 2
|
|
1414
|
+
@stack.each_with_index do |s, i|
|
|
1415
|
+
next if i < 2
|
|
1416
|
+
next if s.list.empty?
|
|
1417
|
+
if first
|
|
1418
|
+
first = false
|
|
1419
|
+
q.text ":"
|
|
1420
|
+
end
|
|
1421
|
+
q.breakable
|
|
1422
|
+
s.pretty_print(q)
|
|
1423
|
+
end
|
|
1424
|
+
end
|
|
1425
|
+
end
|
|
1426
|
+
end
|
|
1427
|
+
|
|
1428
|
+
def inspect # :nodoc:
|
|
1429
|
+
require 'pp'
|
|
1430
|
+
pretty_print_inspect
|
|
1431
|
+
end
|
|
1432
|
+
|
|
1433
|
+
#
|
|
1434
|
+
# Returns option summary list.
|
|
1435
|
+
#
|
|
1436
|
+
def to_a; summarize("#{banner}".split(/^/)) end
|
|
1437
|
+
|
|
1438
|
+
#
|
|
1439
|
+
# Checks if an argument is given twice, in which case an ArgumentError is
|
|
1440
|
+
# raised. Called from OptionParser#switch only.
|
|
1441
|
+
#
|
|
1442
|
+
# +obj+:: New argument.
|
|
1443
|
+
# +prv+:: Previously specified argument.
|
|
1444
|
+
# +msg+:: Exception message.
|
|
1445
|
+
#
|
|
1446
|
+
def notwice(obj, prv, msg) # :nodoc:
|
|
1447
|
+
unless !prv or prv == obj
|
|
1448
|
+
raise(ArgumentError, "argument #{msg} given twice: #{obj}",
|
|
1449
|
+
ParseError.filter_backtrace(caller(2)))
|
|
1450
|
+
end
|
|
1451
|
+
obj
|
|
1452
|
+
end
|
|
1453
|
+
private :notwice
|
|
1454
|
+
|
|
1455
|
+
SPLAT_PROC = proc {|*a| a.length <= 1 ? a.first : a} # :nodoc:
|
|
1456
|
+
|
|
1457
|
+
# :call-seq:
|
|
1458
|
+
# make_switch(params, block = nil)
|
|
1459
|
+
#
|
|
1460
|
+
# :include: ../doc/optparse/creates_option.rdoc
|
|
1461
|
+
#
|
|
1462
|
+
def make_switch(opts, block = nil)
|
|
1463
|
+
short, long, nolong, style, pattern, conv, not_pattern, not_conv, not_style = [], [], []
|
|
1464
|
+
ldesc, sdesc, desc, arg = [], [], []
|
|
1465
|
+
default_style = Switch::NoArgument
|
|
1466
|
+
default_pattern = nil
|
|
1467
|
+
klass = nil
|
|
1468
|
+
q, a = nil
|
|
1469
|
+
has_arg = false
|
|
1470
|
+
|
|
1471
|
+
opts.each do |o|
|
|
1472
|
+
# argument class
|
|
1473
|
+
next if search(:atype, o) do |pat, c|
|
|
1474
|
+
klass = notwice(o, klass, 'type')
|
|
1475
|
+
if not_style and not_style != Switch::NoArgument
|
|
1476
|
+
not_pattern, not_conv = pat, c
|
|
1477
|
+
else
|
|
1478
|
+
default_pattern, conv = pat, c
|
|
1479
|
+
end
|
|
1480
|
+
end
|
|
1481
|
+
|
|
1482
|
+
# directly specified pattern(any object possible to match)
|
|
1483
|
+
if (!(String === o || Symbol === o)) and o.respond_to?(:match)
|
|
1484
|
+
pattern = notwice(o, pattern, 'pattern')
|
|
1485
|
+
if pattern.respond_to?(:convert)
|
|
1486
|
+
conv = pattern.method(:convert).to_proc
|
|
1487
|
+
else
|
|
1488
|
+
conv = SPLAT_PROC
|
|
1489
|
+
end
|
|
1490
|
+
next
|
|
1491
|
+
end
|
|
1492
|
+
|
|
1493
|
+
# anything others
|
|
1494
|
+
case o
|
|
1495
|
+
when Proc, Method
|
|
1496
|
+
block = notwice(o, block, 'block')
|
|
1497
|
+
when Array, Hash
|
|
1498
|
+
case pattern
|
|
1499
|
+
when CompletingHash
|
|
1500
|
+
when nil
|
|
1501
|
+
pattern = CompletingHash.new
|
|
1502
|
+
conv = pattern.method(:convert).to_proc if pattern.respond_to?(:convert)
|
|
1503
|
+
else
|
|
1504
|
+
raise ArgumentError, "argument pattern given twice"
|
|
1505
|
+
end
|
|
1506
|
+
o.each {|pat, *v| pattern[pat] = v.fetch(0) {pat}}
|
|
1507
|
+
when Module
|
|
1508
|
+
raise ArgumentError, "unsupported argument type: #{o}", ParseError.filter_backtrace(caller(4))
|
|
1509
|
+
when *ArgumentStyle.keys
|
|
1510
|
+
style = notwice(ArgumentStyle[o], style, 'style')
|
|
1511
|
+
when /^--no-([^\[\]=\s]*)(.+)?/
|
|
1512
|
+
q, a = $1, $2
|
|
1513
|
+
o = notwice(a ? Object : TrueClass, klass, 'type')
|
|
1514
|
+
not_pattern, not_conv = search(:atype, o) unless not_style
|
|
1515
|
+
not_style = (not_style || default_style).guess(arg = a) if a
|
|
1516
|
+
default_style = Switch::NoArgument
|
|
1517
|
+
default_pattern, conv = search(:atype, FalseClass) unless default_pattern
|
|
1518
|
+
ldesc << "--no-#{q}"
|
|
1519
|
+
(q = q.downcase).tr!('_', '-')
|
|
1520
|
+
long << "no-#{q}"
|
|
1521
|
+
nolong << q
|
|
1522
|
+
when /^--\[no-\]([^\[\]=\s]*)(.+)?/
|
|
1523
|
+
q, a = $1, $2
|
|
1524
|
+
o = notwice(a ? Object : TrueClass, klass, 'type')
|
|
1525
|
+
if a
|
|
1526
|
+
default_style = default_style.guess(arg = a)
|
|
1527
|
+
default_pattern, conv = search(:atype, o) unless default_pattern
|
|
1528
|
+
end
|
|
1529
|
+
ldesc << "--[no-]#{q}"
|
|
1530
|
+
(o = q.downcase).tr!('_', '-')
|
|
1531
|
+
long << o
|
|
1532
|
+
not_pattern, not_conv = search(:atype, FalseClass) unless not_style
|
|
1533
|
+
not_style = Switch::NoArgument
|
|
1534
|
+
nolong << "no-#{o}"
|
|
1535
|
+
when /^--([^\[\]=\s]*)(.+)?/
|
|
1536
|
+
q, a = $1, $2
|
|
1537
|
+
if a
|
|
1538
|
+
o = notwice(NilClass, klass, 'type')
|
|
1539
|
+
default_style = default_style.guess(arg = a)
|
|
1540
|
+
default_pattern, conv = search(:atype, o) unless default_pattern
|
|
1541
|
+
end
|
|
1542
|
+
ldesc << "--#{q}"
|
|
1543
|
+
(o = q.downcase).tr!('_', '-')
|
|
1544
|
+
long << o
|
|
1545
|
+
when /^-(\[\^?\]?(?:[^\\\]]|\\.)*\])(.+)?/
|
|
1546
|
+
q, a = $1, $2
|
|
1547
|
+
o = notwice(Object, klass, 'type')
|
|
1548
|
+
if a
|
|
1549
|
+
default_style = default_style.guess(arg = a)
|
|
1550
|
+
default_pattern, conv = search(:atype, o) unless default_pattern
|
|
1551
|
+
else
|
|
1552
|
+
has_arg = true
|
|
1553
|
+
end
|
|
1554
|
+
sdesc << "-#{q}"
|
|
1555
|
+
short << Regexp.new(q)
|
|
1556
|
+
when /^-(.)(.+)?/
|
|
1557
|
+
q, a = $1, $2
|
|
1558
|
+
if a
|
|
1559
|
+
o = notwice(NilClass, klass, 'type')
|
|
1560
|
+
default_style = default_style.guess(arg = a)
|
|
1561
|
+
default_pattern, conv = search(:atype, o) unless default_pattern
|
|
1562
|
+
end
|
|
1563
|
+
sdesc << "-#{q}"
|
|
1564
|
+
short << q
|
|
1565
|
+
when /^=/
|
|
1566
|
+
style = notwice(default_style.guess(arg = o), style, 'style')
|
|
1567
|
+
default_pattern, conv = search(:atype, Object) unless default_pattern
|
|
1568
|
+
else
|
|
1569
|
+
desc.push(o) if o && !o.empty?
|
|
1570
|
+
end
|
|
1571
|
+
end
|
|
1572
|
+
|
|
1573
|
+
default_pattern, conv = search(:atype, default_style.pattern) unless default_pattern
|
|
1574
|
+
if !(short.empty? and long.empty?)
|
|
1575
|
+
if has_arg and default_style == Switch::NoArgument
|
|
1576
|
+
default_style = Switch::RequiredArgument
|
|
1577
|
+
end
|
|
1578
|
+
s = (style || default_style).new(pattern || default_pattern,
|
|
1579
|
+
conv, sdesc, ldesc, arg, desc, block)
|
|
1580
|
+
elsif !block
|
|
1581
|
+
if style or pattern
|
|
1582
|
+
raise ArgumentError, "no switch given", ParseError.filter_backtrace(caller)
|
|
1583
|
+
end
|
|
1584
|
+
s = desc
|
|
1585
|
+
else
|
|
1586
|
+
short << pattern
|
|
1587
|
+
s = (style || default_style).new(pattern,
|
|
1588
|
+
conv, nil, nil, arg, desc, block)
|
|
1589
|
+
end
|
|
1590
|
+
return s, short, long,
|
|
1591
|
+
(not_style.new(not_pattern, not_conv, sdesc, ldesc, nil, desc, block) if not_style),
|
|
1592
|
+
nolong
|
|
1593
|
+
end
|
|
1594
|
+
|
|
1595
|
+
# ----
|
|
1596
|
+
# Option definition phase methods
|
|
1597
|
+
#
|
|
1598
|
+
# These methods are used to define options, or to construct an
|
|
1599
|
+
# OptionParser instance in other words.
|
|
1600
|
+
|
|
1601
|
+
# :call-seq:
|
|
1602
|
+
# define(*params, &block)
|
|
1603
|
+
#
|
|
1604
|
+
# :include: ../doc/optparse/creates_option.rdoc
|
|
1605
|
+
#
|
|
1606
|
+
def define(*opts, &block)
|
|
1607
|
+
top.append(*(sw = make_switch(opts, block)))
|
|
1608
|
+
sw[0]
|
|
1609
|
+
end
|
|
1610
|
+
|
|
1611
|
+
# :call-seq:
|
|
1612
|
+
# on(*params, &block)
|
|
1613
|
+
#
|
|
1614
|
+
# :include: ../doc/optparse/creates_option.rdoc
|
|
1615
|
+
#
|
|
1616
|
+
def on(*opts, &block)
|
|
1617
|
+
define(*opts, &block)
|
|
1618
|
+
self
|
|
1619
|
+
end
|
|
1620
|
+
alias def_option define
|
|
1621
|
+
|
|
1622
|
+
# :call-seq:
|
|
1623
|
+
# define_head(*params, &block)
|
|
1624
|
+
#
|
|
1625
|
+
# :include: ../doc/optparse/creates_option.rdoc
|
|
1626
|
+
#
|
|
1627
|
+
def define_head(*opts, &block)
|
|
1628
|
+
top.prepend(*(sw = make_switch(opts, block)))
|
|
1629
|
+
sw[0]
|
|
1630
|
+
end
|
|
1631
|
+
|
|
1632
|
+
# :call-seq:
|
|
1633
|
+
# on_head(*params, &block)
|
|
1634
|
+
#
|
|
1635
|
+
# :include: ../doc/optparse/creates_option.rdoc
|
|
1636
|
+
#
|
|
1637
|
+
# The new option is added at the head of the summary.
|
|
1638
|
+
#
|
|
1639
|
+
def on_head(*opts, &block)
|
|
1640
|
+
define_head(*opts, &block)
|
|
1641
|
+
self
|
|
1642
|
+
end
|
|
1643
|
+
alias def_head_option define_head
|
|
1644
|
+
|
|
1645
|
+
# :call-seq:
|
|
1646
|
+
# define_tail(*params, &block)
|
|
1647
|
+
#
|
|
1648
|
+
# :include: ../doc/optparse/creates_option.rdoc
|
|
1649
|
+
#
|
|
1650
|
+
def define_tail(*opts, &block)
|
|
1651
|
+
base.append(*(sw = make_switch(opts, block)))
|
|
1652
|
+
sw[0]
|
|
1653
|
+
end
|
|
1654
|
+
|
|
1655
|
+
#
|
|
1656
|
+
# :call-seq:
|
|
1657
|
+
# on_tail(*params, &block)
|
|
1658
|
+
#
|
|
1659
|
+
# :include: ../doc/optparse/creates_option.rdoc
|
|
1660
|
+
#
|
|
1661
|
+
# The new option is added at the tail of the summary.
|
|
1662
|
+
#
|
|
1663
|
+
def on_tail(*opts, &block)
|
|
1664
|
+
define_tail(*opts, &block)
|
|
1665
|
+
self
|
|
1666
|
+
end
|
|
1667
|
+
alias def_tail_option define_tail
|
|
1668
|
+
|
|
1669
|
+
#
|
|
1670
|
+
# Add separator in summary.
|
|
1671
|
+
#
|
|
1672
|
+
def separator(string)
|
|
1673
|
+
top.append(string, nil, nil)
|
|
1674
|
+
end
|
|
1675
|
+
|
|
1676
|
+
# ----
|
|
1677
|
+
# Arguments parse phase methods
|
|
1678
|
+
#
|
|
1679
|
+
# These methods parse +argv+, convert, and store the results by
|
|
1680
|
+
# calling handlers. As these methods do not modify +self+, +self+
|
|
1681
|
+
# can be frozen.
|
|
1682
|
+
|
|
1683
|
+
#
|
|
1684
|
+
# Parses command line arguments +argv+ in order. When a block is given,
|
|
1685
|
+
# each non-option argument is yielded. When optional +into+ keyword
|
|
1686
|
+
# argument is provided, the parsed option values are stored there via
|
|
1687
|
+
# <code>[]=</code> method (so it can be Hash, or OpenStruct, or other
|
|
1688
|
+
# similar object).
|
|
1689
|
+
#
|
|
1690
|
+
# Returns the rest of +argv+ left unparsed.
|
|
1691
|
+
#
|
|
1692
|
+
def order(*argv, **keywords, &nonopt)
|
|
1693
|
+
argv = argv[0].dup if argv.size == 1 and Array === argv[0]
|
|
1694
|
+
order!(argv, **keywords, &nonopt)
|
|
1695
|
+
end
|
|
1696
|
+
|
|
1697
|
+
#
|
|
1698
|
+
# Same as #order, but removes switches destructively.
|
|
1699
|
+
# Non-option arguments remain in +argv+.
|
|
1700
|
+
#
|
|
1701
|
+
def order!(argv = default_argv, into: nil, **keywords, &nonopt)
|
|
1702
|
+
setter = ->(name, val) {into[name.to_sym] = val} if into
|
|
1703
|
+
parse_in_order(argv, setter, **keywords, &nonopt)
|
|
1704
|
+
end
|
|
1705
|
+
|
|
1706
|
+
def parse_in_order(argv = default_argv, setter = nil, exact: require_exact, **, &nonopt) # :nodoc:
|
|
1707
|
+
opt, arg, val, rest = nil
|
|
1708
|
+
nonopt ||= proc {|a| throw :terminate, a}
|
|
1709
|
+
argv.unshift(arg) if arg = catch(:terminate) {
|
|
1710
|
+
while arg = argv.shift
|
|
1711
|
+
case arg
|
|
1712
|
+
# long option
|
|
1713
|
+
when /\A--([^=]*)(?:=(.*))?/m
|
|
1714
|
+
opt, rest = $1, $2
|
|
1715
|
+
opt.tr!('_', '-')
|
|
1716
|
+
begin
|
|
1717
|
+
if exact
|
|
1718
|
+
sw, = search(:long, opt)
|
|
1719
|
+
else
|
|
1720
|
+
sw, = complete(:long, opt, true)
|
|
1721
|
+
end
|
|
1722
|
+
rescue ParseError
|
|
1723
|
+
throw :terminate, arg unless raise_unknown
|
|
1724
|
+
raise $!.set_option(arg, true)
|
|
1725
|
+
else
|
|
1726
|
+
unless sw
|
|
1727
|
+
throw :terminate, arg unless raise_unknown
|
|
1728
|
+
raise InvalidOption, arg
|
|
1729
|
+
end
|
|
1730
|
+
end
|
|
1731
|
+
begin
|
|
1732
|
+
opt, cb, val = sw.parse(rest, argv) {|*exc| raise(*exc)}
|
|
1733
|
+
val = callback!(cb, 1, val) if cb
|
|
1734
|
+
callback!(setter, 2, sw.switch_name, val) if setter
|
|
1735
|
+
rescue ParseError
|
|
1736
|
+
raise $!.set_option(arg, rest)
|
|
1737
|
+
end
|
|
1738
|
+
|
|
1739
|
+
# short option
|
|
1740
|
+
when /\A-(.)((=).*|.+)?/m
|
|
1741
|
+
eq, rest, opt = $3, $2, $1
|
|
1742
|
+
has_arg, val = eq, rest
|
|
1743
|
+
begin
|
|
1744
|
+
sw, = search(:short, opt)
|
|
1745
|
+
unless sw
|
|
1746
|
+
begin
|
|
1747
|
+
sw, = complete(:short, opt)
|
|
1748
|
+
# short option matched.
|
|
1749
|
+
val = arg.delete_prefix('-')
|
|
1750
|
+
has_arg = true
|
|
1751
|
+
rescue InvalidOption
|
|
1752
|
+
raise if exact
|
|
1753
|
+
# if no short options match, try completion with long
|
|
1754
|
+
# options.
|
|
1755
|
+
sw, = complete(:long, opt)
|
|
1756
|
+
eq ||= !rest
|
|
1757
|
+
end
|
|
1758
|
+
end
|
|
1759
|
+
rescue ParseError
|
|
1760
|
+
throw :terminate, arg unless raise_unknown
|
|
1761
|
+
raise $!.set_option(arg, true)
|
|
1762
|
+
end
|
|
1763
|
+
begin
|
|
1764
|
+
opt, cb, val = sw.parse(val, argv) {|*exc| raise(*exc) if eq}
|
|
1765
|
+
rescue ParseError
|
|
1766
|
+
raise $!.set_option(arg, arg.length > 2)
|
|
1767
|
+
else
|
|
1768
|
+
raise InvalidOption, arg if has_arg and !eq and arg == "-#{opt}"
|
|
1769
|
+
end
|
|
1770
|
+
begin
|
|
1771
|
+
argv.unshift(opt) if opt and (!rest or (opt = opt.sub(/\A-*/, '-')) != '-')
|
|
1772
|
+
val = callback!(cb, 1, val) if cb
|
|
1773
|
+
callback!(setter, 2, sw.switch_name, val) if setter
|
|
1774
|
+
rescue ParseError
|
|
1775
|
+
raise $!.set_option(arg, arg.length > 2)
|
|
1776
|
+
end
|
|
1777
|
+
|
|
1778
|
+
# non-option argument
|
|
1779
|
+
else
|
|
1780
|
+
catch(:prune) do
|
|
1781
|
+
visit(:each_option) do |sw0|
|
|
1782
|
+
sw = sw0
|
|
1783
|
+
sw.block.call(arg) if Switch === sw and sw.match_nonswitch?(arg)
|
|
1784
|
+
end
|
|
1785
|
+
nonopt.call(arg)
|
|
1786
|
+
end
|
|
1787
|
+
end
|
|
1788
|
+
end
|
|
1789
|
+
|
|
1790
|
+
nil
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
visit(:search, :short, nil) {|sw| sw.block.call(*argv) if !sw.pattern}
|
|
1794
|
+
|
|
1795
|
+
argv
|
|
1796
|
+
end
|
|
1797
|
+
private :parse_in_order
|
|
1798
|
+
|
|
1799
|
+
# Calls callback with _val_.
|
|
1800
|
+
def callback!(cb, max_arity, *args) # :nodoc:
|
|
1801
|
+
args.compact!
|
|
1802
|
+
|
|
1803
|
+
if (size = args.size) < max_arity and cb.to_proc.lambda?
|
|
1804
|
+
(arity = cb.arity) < 0 and arity = (1-arity)
|
|
1805
|
+
arity = max_arity if arity > max_arity
|
|
1806
|
+
args[arity - 1] = nil if arity > size
|
|
1807
|
+
end
|
|
1808
|
+
cb.call(*args)
|
|
1809
|
+
end
|
|
1810
|
+
private :callback!
|
|
1811
|
+
|
|
1812
|
+
#
|
|
1813
|
+
# Parses command line arguments +argv+ in permutation mode and returns
|
|
1814
|
+
# list of non-option arguments. When optional +into+ keyword
|
|
1815
|
+
# argument is provided, the parsed option values are stored there via
|
|
1816
|
+
# <code>[]=</code> method (so it can be Hash, or OpenStruct, or other
|
|
1817
|
+
# similar object).
|
|
1818
|
+
#
|
|
1819
|
+
def permute(*argv, **keywords)
|
|
1820
|
+
argv = argv[0].dup if argv.size == 1 and Array === argv[0]
|
|
1821
|
+
permute!(argv, **keywords)
|
|
1822
|
+
end
|
|
1823
|
+
|
|
1824
|
+
#
|
|
1825
|
+
# Same as #permute, but removes switches destructively.
|
|
1826
|
+
# Non-option arguments remain in +argv+.
|
|
1827
|
+
#
|
|
1828
|
+
def permute!(argv = default_argv, **keywords)
|
|
1829
|
+
nonopts = []
|
|
1830
|
+
order!(argv, **keywords, &nonopts.method(:<<))
|
|
1831
|
+
argv[0, 0] = nonopts
|
|
1832
|
+
argv
|
|
1833
|
+
end
|
|
1834
|
+
|
|
1835
|
+
#
|
|
1836
|
+
# Parses command line arguments +argv+ in order when environment variable
|
|
1837
|
+
# POSIXLY_CORRECT is set, and in permutation mode otherwise.
|
|
1838
|
+
# When optional +into+ keyword argument is provided, the parsed option
|
|
1839
|
+
# values are stored there via <code>[]=</code> method (so it can be Hash,
|
|
1840
|
+
# or OpenStruct, or other similar object).
|
|
1841
|
+
#
|
|
1842
|
+
def parse(*argv, **keywords)
|
|
1843
|
+
argv = argv[0].dup if argv.size == 1 and Array === argv[0]
|
|
1844
|
+
parse!(argv, **keywords)
|
|
1845
|
+
end
|
|
1846
|
+
|
|
1847
|
+
#
|
|
1848
|
+
# Same as #parse, but removes switches destructively.
|
|
1849
|
+
# Non-option arguments remain in +argv+.
|
|
1850
|
+
#
|
|
1851
|
+
def parse!(argv = default_argv, **keywords)
|
|
1852
|
+
if ENV.include?('POSIXLY_CORRECT')
|
|
1853
|
+
order!(argv, **keywords)
|
|
1854
|
+
else
|
|
1855
|
+
permute!(argv, **keywords)
|
|
1856
|
+
end
|
|
1857
|
+
end
|
|
1858
|
+
|
|
1859
|
+
#
|
|
1860
|
+
# Wrapper method for getopts.rb.
|
|
1861
|
+
#
|
|
1862
|
+
# params = ARGV.getopts("ab:", "foo", "bar:", "zot:Z;zot option")
|
|
1863
|
+
# # params["a"] = true # -a
|
|
1864
|
+
# # params["b"] = "1" # -b1
|
|
1865
|
+
# # params["foo"] = "1" # --foo
|
|
1866
|
+
# # params["bar"] = "x" # --bar x
|
|
1867
|
+
# # params["zot"] = "z" # --zot Z
|
|
1868
|
+
#
|
|
1869
|
+
# Option +symbolize_names+ (boolean) specifies whether returned Hash keys should be Symbols; defaults to +false+ (use Strings).
|
|
1870
|
+
#
|
|
1871
|
+
# params = ARGV.getopts("ab:", "foo", "bar:", "zot:Z;zot option", symbolize_names: true)
|
|
1872
|
+
# # params[:a] = true # -a
|
|
1873
|
+
# # params[:b] = "1" # -b1
|
|
1874
|
+
# # params[:foo] = "1" # --foo
|
|
1875
|
+
# # params[:bar] = "x" # --bar x
|
|
1876
|
+
# # params[:zot] = "z" # --zot Z
|
|
1877
|
+
#
|
|
1878
|
+
def getopts(*args, symbolize_names: false, **keywords)
|
|
1879
|
+
argv = Array === args.first ? args.shift : default_argv
|
|
1880
|
+
single_options, *long_options = *args
|
|
1881
|
+
|
|
1882
|
+
result = {}
|
|
1883
|
+
|
|
1884
|
+
single_options.scan(/(.)(:)?/) do |opt, val|
|
|
1885
|
+
if val
|
|
1886
|
+
result[opt] = nil
|
|
1887
|
+
define("-#{opt} VAL")
|
|
1888
|
+
else
|
|
1889
|
+
result[opt] = false
|
|
1890
|
+
define("-#{opt}")
|
|
1891
|
+
end
|
|
1892
|
+
end if single_options
|
|
1893
|
+
|
|
1894
|
+
long_options.each do |arg|
|
|
1895
|
+
arg, desc = arg.split(';', 2)
|
|
1896
|
+
opt, val = arg.split(':', 2)
|
|
1897
|
+
if val
|
|
1898
|
+
result[opt] = val.empty? ? nil : val
|
|
1899
|
+
define("--#{opt}=#{result[opt] || "VAL"}", *[desc].compact)
|
|
1900
|
+
else
|
|
1901
|
+
result[opt] = false
|
|
1902
|
+
define("--#{opt}", *[desc].compact)
|
|
1903
|
+
end
|
|
1904
|
+
end
|
|
1905
|
+
|
|
1906
|
+
parse_in_order(argv, result.method(:[]=), **keywords)
|
|
1907
|
+
symbolize_names ? result.transform_keys(&:to_sym) : result
|
|
1908
|
+
end
|
|
1909
|
+
|
|
1910
|
+
#
|
|
1911
|
+
# See #getopts.
|
|
1912
|
+
#
|
|
1913
|
+
def self.getopts(*args, symbolize_names: false)
|
|
1914
|
+
new.getopts(*args, symbolize_names: symbolize_names)
|
|
1915
|
+
end
|
|
1916
|
+
|
|
1917
|
+
#
|
|
1918
|
+
# Traverses @stack, sending each element method +id+ with +args+ and
|
|
1919
|
+
# +block+.
|
|
1920
|
+
#
|
|
1921
|
+
def visit(id, *args, &block) # :nodoc:
|
|
1922
|
+
@stack.reverse_each do |el|
|
|
1923
|
+
el.__send__(id, *args, &block)
|
|
1924
|
+
end
|
|
1925
|
+
nil
|
|
1926
|
+
end
|
|
1927
|
+
private :visit
|
|
1928
|
+
|
|
1929
|
+
#
|
|
1930
|
+
# Searches +key+ in @stack for +id+ hash and returns or yields the result.
|
|
1931
|
+
#
|
|
1932
|
+
def search(id, key) # :nodoc:
|
|
1933
|
+
block_given = block_given?
|
|
1934
|
+
visit(:search, id, key) do |k|
|
|
1935
|
+
return block_given ? yield(k) : k
|
|
1936
|
+
end
|
|
1937
|
+
end
|
|
1938
|
+
private :search
|
|
1939
|
+
|
|
1940
|
+
#
|
|
1941
|
+
# Completes shortened long style option switch and returns pair of
|
|
1942
|
+
# canonical switch and switch descriptor OptionParser::Switch.
|
|
1943
|
+
#
|
|
1944
|
+
# +typ+:: Searching table.
|
|
1945
|
+
# +opt+:: Searching key.
|
|
1946
|
+
# +icase+:: Search case insensitive if true.
|
|
1947
|
+
# +pat+:: Optional pattern for completion.
|
|
1948
|
+
#
|
|
1949
|
+
def complete(typ, opt, icase = false, *pat) # :nodoc:
|
|
1950
|
+
if pat.empty?
|
|
1951
|
+
search(typ, opt) {|sw| return [sw, opt]} # exact match or...
|
|
1952
|
+
end
|
|
1953
|
+
ambiguous = catch(:ambiguous) {
|
|
1954
|
+
visit(:complete, typ, opt, icase, *pat) {|o, *sw| return sw}
|
|
1955
|
+
}
|
|
1956
|
+
exc = ambiguous ? AmbiguousOption : InvalidOption
|
|
1957
|
+
raise exc.new(opt, additional: self.method(:additional_message).curry[typ])
|
|
1958
|
+
end
|
|
1959
|
+
private :complete
|
|
1960
|
+
|
|
1961
|
+
#
|
|
1962
|
+
# Returns additional info.
|
|
1963
|
+
#
|
|
1964
|
+
def additional_message(typ, opt)
|
|
1965
|
+
return unless typ and opt and defined?(DidYouMean::SpellChecker)
|
|
1966
|
+
all_candidates = []
|
|
1967
|
+
visit(:get_candidates, typ) do |candidates|
|
|
1968
|
+
all_candidates.concat(candidates)
|
|
1969
|
+
end
|
|
1970
|
+
all_candidates.select! {|cand| cand.is_a?(String) }
|
|
1971
|
+
checker = DidYouMean::SpellChecker.new(dictionary: all_candidates)
|
|
1972
|
+
DidYouMean.formatter.message_for(all_candidates & checker.correct(opt))
|
|
1973
|
+
end
|
|
1974
|
+
|
|
1975
|
+
#
|
|
1976
|
+
# Return candidates for +word+.
|
|
1977
|
+
#
|
|
1978
|
+
def candidate(word)
|
|
1979
|
+
list = []
|
|
1980
|
+
case word
|
|
1981
|
+
when '-'
|
|
1982
|
+
long = short = true
|
|
1983
|
+
when /\A--/
|
|
1984
|
+
word, arg = word.split(/=/, 2)
|
|
1985
|
+
argpat = Completion.regexp(arg, false) if arg and !arg.empty?
|
|
1986
|
+
long = true
|
|
1987
|
+
when /\A-/
|
|
1988
|
+
short = true
|
|
1989
|
+
end
|
|
1990
|
+
pat = Completion.regexp(word, long)
|
|
1991
|
+
visit(:each_option) do |opt|
|
|
1992
|
+
next unless Switch === opt
|
|
1993
|
+
opts = (long ? opt.long : []) + (short ? opt.short : [])
|
|
1994
|
+
opts = Completion.candidate(word, true, pat, &opts.method(:each)).map(&:first) if pat
|
|
1995
|
+
if /\A=/ =~ opt.arg
|
|
1996
|
+
opts.map! {|sw| sw + "="}
|
|
1997
|
+
if arg and CompletingHash === opt.pattern
|
|
1998
|
+
if opts = opt.pattern.candidate(arg, false, argpat)
|
|
1999
|
+
opts.map!(&:last)
|
|
2000
|
+
end
|
|
2001
|
+
end
|
|
2002
|
+
end
|
|
2003
|
+
list.concat(opts)
|
|
2004
|
+
end
|
|
2005
|
+
list
|
|
2006
|
+
end
|
|
2007
|
+
|
|
2008
|
+
#
|
|
2009
|
+
# Loads options from file names as +filename+. Does nothing when the file
|
|
2010
|
+
# is not present. Returns whether successfully loaded.
|
|
2011
|
+
#
|
|
2012
|
+
# +filename+ defaults to basename of the program without suffix in a
|
|
2013
|
+
# directory ~/.options, then the basename with '.options' suffix
|
|
2014
|
+
# under XDG and Haiku standard places.
|
|
2015
|
+
#
|
|
2016
|
+
# The optional +into+ keyword argument works exactly like that accepted in
|
|
2017
|
+
# method #parse.
|
|
2018
|
+
#
|
|
2019
|
+
def load(filename = nil, **keywords)
|
|
2020
|
+
unless filename
|
|
2021
|
+
basename = File.basename($0, '.*')
|
|
2022
|
+
return true if load(File.expand_path(basename, '~/.options'), **keywords) rescue nil
|
|
2023
|
+
basename << ".options"
|
|
2024
|
+
return [
|
|
2025
|
+
# XDG
|
|
2026
|
+
ENV['XDG_CONFIG_HOME'],
|
|
2027
|
+
'~/.config',
|
|
2028
|
+
*ENV['XDG_CONFIG_DIRS']&.split(File::PATH_SEPARATOR),
|
|
2029
|
+
|
|
2030
|
+
# Haiku
|
|
2031
|
+
'~/config/settings',
|
|
2032
|
+
].any? {|dir|
|
|
2033
|
+
next if !dir or dir.empty?
|
|
2034
|
+
load(File.expand_path(basename, dir), **keywords) rescue nil
|
|
2035
|
+
}
|
|
2036
|
+
end
|
|
2037
|
+
begin
|
|
2038
|
+
parse(*File.readlines(filename, chomp: true), **keywords)
|
|
2039
|
+
true
|
|
2040
|
+
rescue Errno::ENOENT, Errno::ENOTDIR
|
|
2041
|
+
false
|
|
2042
|
+
end
|
|
2043
|
+
end
|
|
2044
|
+
|
|
2045
|
+
#
|
|
2046
|
+
# Parses environment variable +env+ or its uppercase with splitting like a
|
|
2047
|
+
# shell.
|
|
2048
|
+
#
|
|
2049
|
+
# +env+ defaults to the basename of the program.
|
|
2050
|
+
#
|
|
2051
|
+
def environment(env = File.basename($0, '.*'), **keywords)
|
|
2052
|
+
env = ENV[env] || ENV[env.upcase] or return
|
|
2053
|
+
require 'shellwords'
|
|
2054
|
+
parse(*Shellwords.shellwords(env), **keywords)
|
|
2055
|
+
end
|
|
2056
|
+
|
|
2057
|
+
#
|
|
2058
|
+
# Acceptable argument classes
|
|
2059
|
+
#
|
|
2060
|
+
|
|
2061
|
+
#
|
|
2062
|
+
# Any string and no conversion. This is fall-back.
|
|
2063
|
+
#
|
|
2064
|
+
accept(Object) {|s,|s or s.nil?}
|
|
2065
|
+
|
|
2066
|
+
accept(NilClass) {|s,|s}
|
|
2067
|
+
|
|
2068
|
+
#
|
|
2069
|
+
# Any non-empty string, and no conversion.
|
|
2070
|
+
#
|
|
2071
|
+
accept(String, /.+/m) {|s,*|s}
|
|
2072
|
+
|
|
2073
|
+
#
|
|
2074
|
+
# Ruby/C-like integer, octal for 0-7 sequence, binary for 0b, hexadecimal
|
|
2075
|
+
# for 0x, and decimal for others; with optional sign prefix. Converts to
|
|
2076
|
+
# Integer.
|
|
2077
|
+
#
|
|
2078
|
+
decimal = '\d+(?:_\d+)*'
|
|
2079
|
+
binary = 'b[01]+(?:_[01]+)*'
|
|
2080
|
+
hex = 'x[\da-f]+(?:_[\da-f]+)*'
|
|
2081
|
+
octal = "0(?:[0-7]+(?:_[0-7]+)*|#{binary}|#{hex})?"
|
|
2082
|
+
integer = "#{octal}|#{decimal}"
|
|
2083
|
+
|
|
2084
|
+
accept(Integer, %r"\A[-+]?(?:#{integer})\z"io) {|s,|
|
|
2085
|
+
begin
|
|
2086
|
+
Integer(s)
|
|
2087
|
+
rescue ArgumentError
|
|
2088
|
+
raise OptionParser::InvalidArgument, s
|
|
2089
|
+
end if s
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
#
|
|
2093
|
+
# Float number format, and converts to Float.
|
|
2094
|
+
#
|
|
2095
|
+
float = "(?:#{decimal}(?=(.)?)(?:\\.(?:#{decimal})?)?|\\.#{decimal})(?:E[-+]?#{decimal})?"
|
|
2096
|
+
floatpat = %r"\A[-+]?#{float}\z"io
|
|
2097
|
+
accept(Float, floatpat) {|s,| s.to_f if s}
|
|
2098
|
+
|
|
2099
|
+
#
|
|
2100
|
+
# Generic numeric format, converts to Integer for integer format, Float
|
|
2101
|
+
# for float format, and Rational for rational format.
|
|
2102
|
+
#
|
|
2103
|
+
real = "[-+]?(?:#{octal}|#{float})"
|
|
2104
|
+
accept(Numeric, /\A(#{real})(?:\/(#{real}))?\z/io) {|s, d, f, n,|
|
|
2105
|
+
if n
|
|
2106
|
+
Rational(d, n)
|
|
2107
|
+
elsif f
|
|
2108
|
+
Float(s)
|
|
2109
|
+
else
|
|
2110
|
+
Integer(s)
|
|
2111
|
+
end
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
#
|
|
2115
|
+
# Decimal integer format, to be converted to Integer.
|
|
2116
|
+
#
|
|
2117
|
+
DecimalInteger = /\A[-+]?#{decimal}\z/io
|
|
2118
|
+
accept(DecimalInteger, DecimalInteger) {|s,|
|
|
2119
|
+
begin
|
|
2120
|
+
Integer(s, 10)
|
|
2121
|
+
rescue ArgumentError
|
|
2122
|
+
raise OptionParser::InvalidArgument, s
|
|
2123
|
+
end if s
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
#
|
|
2127
|
+
# Ruby/C like octal/hexadecimal/binary integer format, to be converted to
|
|
2128
|
+
# Integer.
|
|
2129
|
+
#
|
|
2130
|
+
OctalInteger = /\A[-+]?(?:[0-7]+(?:_[0-7]+)*|0(?:#{binary}|#{hex}))\z/io
|
|
2131
|
+
accept(OctalInteger, OctalInteger) {|s,|
|
|
2132
|
+
begin
|
|
2133
|
+
Integer(s, 8)
|
|
2134
|
+
rescue ArgumentError
|
|
2135
|
+
raise OptionParser::InvalidArgument, s
|
|
2136
|
+
end if s
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
#
|
|
2140
|
+
# Decimal integer/float number format, to be converted to Integer for
|
|
2141
|
+
# integer format, Float for float format.
|
|
2142
|
+
#
|
|
2143
|
+
DecimalNumeric = floatpat # decimal integer is allowed as float also.
|
|
2144
|
+
accept(DecimalNumeric, floatpat) {|s, f|
|
|
2145
|
+
begin
|
|
2146
|
+
if f
|
|
2147
|
+
Float(s)
|
|
2148
|
+
else
|
|
2149
|
+
Integer(s)
|
|
2150
|
+
end
|
|
2151
|
+
rescue ArgumentError
|
|
2152
|
+
raise OptionParser::InvalidArgument, s
|
|
2153
|
+
end if s
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
#
|
|
2157
|
+
# Boolean switch, which means whether it is present or not, whether it is
|
|
2158
|
+
# absent or not with prefix no-, or it takes an argument
|
|
2159
|
+
# yes/no/true/false/+/-.
|
|
2160
|
+
#
|
|
2161
|
+
yesno = CompletingHash.new
|
|
2162
|
+
%w[- no false].each {|el| yesno[el] = false}
|
|
2163
|
+
%w[+ yes true].each {|el| yesno[el] = true}
|
|
2164
|
+
yesno['nil'] = false # should be nil?
|
|
2165
|
+
accept(TrueClass, yesno) {|arg, val| val == nil or val}
|
|
2166
|
+
#
|
|
2167
|
+
# Similar to TrueClass, but defaults to false.
|
|
2168
|
+
#
|
|
2169
|
+
accept(FalseClass, yesno) {|arg, val| val != nil and val}
|
|
2170
|
+
|
|
2171
|
+
#
|
|
2172
|
+
# List of strings separated by ",".
|
|
2173
|
+
#
|
|
2174
|
+
accept(Array) do |s, |
|
|
2175
|
+
if s
|
|
2176
|
+
s = s.split(',').collect {|ss| ss unless ss.empty?}
|
|
2177
|
+
end
|
|
2178
|
+
s
|
|
2179
|
+
end
|
|
2180
|
+
|
|
2181
|
+
#
|
|
2182
|
+
# Regular expression with options.
|
|
2183
|
+
#
|
|
2184
|
+
accept(Regexp, %r"\A/((?:\\.|[^\\])*)/([[:alpha:]]+)?\z|.*") do |all, s, o|
|
|
2185
|
+
f = 0
|
|
2186
|
+
if o
|
|
2187
|
+
f |= Regexp::IGNORECASE if /i/ =~ o
|
|
2188
|
+
f |= Regexp::MULTILINE if /m/ =~ o
|
|
2189
|
+
f |= Regexp::EXTENDED if /x/ =~ o
|
|
2190
|
+
case o = o.delete("imx")
|
|
2191
|
+
when ""
|
|
2192
|
+
when "u"
|
|
2193
|
+
s = s.encode(Encoding::UTF_8)
|
|
2194
|
+
when "e"
|
|
2195
|
+
s = s.encode(Encoding::EUC_JP)
|
|
2196
|
+
when "s"
|
|
2197
|
+
s = s.encode(Encoding::SJIS)
|
|
2198
|
+
when "n"
|
|
2199
|
+
f |= Regexp::NOENCODING
|
|
2200
|
+
else
|
|
2201
|
+
raise OptionParser::InvalidArgument, "unknown regexp option - #{o}"
|
|
2202
|
+
end
|
|
2203
|
+
else
|
|
2204
|
+
s ||= all
|
|
2205
|
+
end
|
|
2206
|
+
Regexp.new(s, f)
|
|
2207
|
+
end
|
|
2208
|
+
|
|
2209
|
+
#
|
|
2210
|
+
# Exceptions
|
|
2211
|
+
#
|
|
2212
|
+
|
|
2213
|
+
#
|
|
2214
|
+
# Base class of exceptions from OptionParser.
|
|
2215
|
+
#
|
|
2216
|
+
class ParseError < RuntimeError
|
|
2217
|
+
# Reason which caused the error.
|
|
2218
|
+
Reason = 'parse error'
|
|
2219
|
+
|
|
2220
|
+
# :nodoc:
|
|
2221
|
+
def initialize(*args, additional: nil)
|
|
2222
|
+
@additional = additional
|
|
2223
|
+
@arg0, = args
|
|
2224
|
+
@args = args
|
|
2225
|
+
@reason = nil
|
|
2226
|
+
end
|
|
2227
|
+
|
|
2228
|
+
attr_reader :args
|
|
2229
|
+
attr_writer :reason
|
|
2230
|
+
attr_accessor :additional
|
|
2231
|
+
|
|
2232
|
+
#
|
|
2233
|
+
# Pushes back erred argument(s) to +argv+.
|
|
2234
|
+
#
|
|
2235
|
+
def recover(argv)
|
|
2236
|
+
argv[0, 0] = @args
|
|
2237
|
+
argv
|
|
2238
|
+
end
|
|
2239
|
+
|
|
2240
|
+
def self.filter_backtrace(array)
|
|
2241
|
+
unless $DEBUG
|
|
2242
|
+
array.delete_if(&%r"\A#{Regexp.quote(__FILE__)}:"o.method(:=~))
|
|
2243
|
+
end
|
|
2244
|
+
array
|
|
2245
|
+
end
|
|
2246
|
+
|
|
2247
|
+
def set_backtrace(array)
|
|
2248
|
+
super(self.class.filter_backtrace(array))
|
|
2249
|
+
end
|
|
2250
|
+
|
|
2251
|
+
def set_option(opt, eq)
|
|
2252
|
+
if eq
|
|
2253
|
+
@args[0] = opt
|
|
2254
|
+
else
|
|
2255
|
+
@args.unshift(opt)
|
|
2256
|
+
end
|
|
2257
|
+
self
|
|
2258
|
+
end
|
|
2259
|
+
|
|
2260
|
+
#
|
|
2261
|
+
# Returns error reason. Override this for I18N.
|
|
2262
|
+
#
|
|
2263
|
+
def reason
|
|
2264
|
+
@reason || self.class::Reason
|
|
2265
|
+
end
|
|
2266
|
+
|
|
2267
|
+
def inspect
|
|
2268
|
+
"#<#{self.class}: #{args.join(' ')}>"
|
|
2269
|
+
end
|
|
2270
|
+
|
|
2271
|
+
#
|
|
2272
|
+
# Default stringizing method to emit standard error message.
|
|
2273
|
+
#
|
|
2274
|
+
def message
|
|
2275
|
+
"#{reason}: #{args.join(' ')}#{additional[@arg0] if additional}"
|
|
2276
|
+
end
|
|
2277
|
+
|
|
2278
|
+
alias to_s message
|
|
2279
|
+
end
|
|
2280
|
+
|
|
2281
|
+
#
|
|
2282
|
+
# Raises when ambiguously completable string is encountered.
|
|
2283
|
+
#
|
|
2284
|
+
class AmbiguousOption < ParseError
|
|
2285
|
+
const_set(:Reason, 'ambiguous option')
|
|
2286
|
+
end
|
|
2287
|
+
|
|
2288
|
+
#
|
|
2289
|
+
# Raises when there is an argument for a switch which takes no argument.
|
|
2290
|
+
#
|
|
2291
|
+
class NeedlessArgument < ParseError
|
|
2292
|
+
const_set(:Reason, 'needless argument')
|
|
2293
|
+
end
|
|
2294
|
+
|
|
2295
|
+
#
|
|
2296
|
+
# Raises when a switch with mandatory argument has no argument.
|
|
2297
|
+
#
|
|
2298
|
+
class MissingArgument < ParseError
|
|
2299
|
+
const_set(:Reason, 'missing argument')
|
|
2300
|
+
end
|
|
2301
|
+
|
|
2302
|
+
#
|
|
2303
|
+
# Raises when switch is undefined.
|
|
2304
|
+
#
|
|
2305
|
+
class InvalidOption < ParseError
|
|
2306
|
+
const_set(:Reason, 'invalid option')
|
|
2307
|
+
end
|
|
2308
|
+
|
|
2309
|
+
#
|
|
2310
|
+
# Raises when the given argument does not match required format.
|
|
2311
|
+
#
|
|
2312
|
+
class InvalidArgument < ParseError
|
|
2313
|
+
const_set(:Reason, 'invalid argument')
|
|
2314
|
+
end
|
|
2315
|
+
|
|
2316
|
+
#
|
|
2317
|
+
# Raises when the given argument word can't be completed uniquely.
|
|
2318
|
+
#
|
|
2319
|
+
class AmbiguousArgument < InvalidArgument
|
|
2320
|
+
const_set(:Reason, 'ambiguous argument')
|
|
2321
|
+
end
|
|
2322
|
+
|
|
2323
|
+
#
|
|
2324
|
+
# Miscellaneous
|
|
2325
|
+
#
|
|
2326
|
+
|
|
2327
|
+
#
|
|
2328
|
+
# Extends command line arguments array (ARGV) to parse itself.
|
|
2329
|
+
#
|
|
2330
|
+
module Arguable
|
|
2331
|
+
|
|
2332
|
+
#
|
|
2333
|
+
# Sets OptionParser object, when +opt+ is +false+ or +nil+, methods
|
|
2334
|
+
# OptionParser::Arguable#options and OptionParser::Arguable#options= are
|
|
2335
|
+
# undefined. Thus, there is no ways to access the OptionParser object
|
|
2336
|
+
# via the receiver object.
|
|
2337
|
+
#
|
|
2338
|
+
def options=(opt)
|
|
2339
|
+
unless @optparse = opt
|
|
2340
|
+
class << self
|
|
2341
|
+
undef_method(:options)
|
|
2342
|
+
undef_method(:options=)
|
|
2343
|
+
end
|
|
2344
|
+
end
|
|
2345
|
+
end
|
|
2346
|
+
|
|
2347
|
+
#
|
|
2348
|
+
# Actual OptionParser object, automatically created if nonexistent.
|
|
2349
|
+
#
|
|
2350
|
+
# If called with a block, yields the OptionParser object and returns the
|
|
2351
|
+
# result of the block. If an OptionParser::ParseError exception occurs
|
|
2352
|
+
# in the block, it is rescued, a error message printed to STDERR and
|
|
2353
|
+
# +nil+ returned.
|
|
2354
|
+
#
|
|
2355
|
+
def options
|
|
2356
|
+
@optparse ||= OptionParser.new
|
|
2357
|
+
@optparse.default_argv = self
|
|
2358
|
+
block_given? or return @optparse
|
|
2359
|
+
begin
|
|
2360
|
+
yield @optparse
|
|
2361
|
+
rescue ParseError
|
|
2362
|
+
@optparse.warn $!
|
|
2363
|
+
nil
|
|
2364
|
+
end
|
|
2365
|
+
end
|
|
2366
|
+
|
|
2367
|
+
#
|
|
2368
|
+
# Parses +self+ destructively in order and returns +self+ containing the
|
|
2369
|
+
# rest arguments left unparsed.
|
|
2370
|
+
#
|
|
2371
|
+
def order!(**keywords, &blk) options.order!(self, **keywords, &blk) end
|
|
2372
|
+
|
|
2373
|
+
#
|
|
2374
|
+
# Parses +self+ destructively in permutation mode and returns +self+
|
|
2375
|
+
# containing the rest arguments left unparsed.
|
|
2376
|
+
#
|
|
2377
|
+
def permute!(**keywords) options.permute!(self, **keywords) end
|
|
2378
|
+
|
|
2379
|
+
#
|
|
2380
|
+
# Parses +self+ destructively and returns +self+ containing the
|
|
2381
|
+
# rest arguments left unparsed.
|
|
2382
|
+
#
|
|
2383
|
+
def parse!(**keywords) options.parse!(self, **keywords) end
|
|
2384
|
+
|
|
2385
|
+
#
|
|
2386
|
+
# Substitution of getopts is possible as follows. Also see
|
|
2387
|
+
# OptionParser#getopts.
|
|
2388
|
+
#
|
|
2389
|
+
# def getopts(*args)
|
|
2390
|
+
# ($OPT = ARGV.getopts(*args)).each do |opt, val|
|
|
2391
|
+
# eval "$OPT_#{opt.gsub(/[^A-Za-z0-9_]/, '_')} = val"
|
|
2392
|
+
# end
|
|
2393
|
+
# rescue OptionParser::ParseError
|
|
2394
|
+
# end
|
|
2395
|
+
#
|
|
2396
|
+
def getopts(*args, symbolize_names: false, **keywords)
|
|
2397
|
+
options.getopts(self, *args, symbolize_names: symbolize_names, **keywords)
|
|
2398
|
+
end
|
|
2399
|
+
|
|
2400
|
+
#
|
|
2401
|
+
# Initializes instance variable.
|
|
2402
|
+
#
|
|
2403
|
+
def self.extend_object(obj)
|
|
2404
|
+
super
|
|
2405
|
+
obj.instance_eval {@optparse = nil}
|
|
2406
|
+
end
|
|
2407
|
+
|
|
2408
|
+
def initialize(*args) # :nodoc:
|
|
2409
|
+
super
|
|
2410
|
+
@optparse = nil
|
|
2411
|
+
end
|
|
2412
|
+
end
|
|
2413
|
+
|
|
2414
|
+
#
|
|
2415
|
+
# Acceptable argument classes. Now contains DecimalInteger, OctalInteger
|
|
2416
|
+
# and DecimalNumeric. See Acceptable argument classes (in source code).
|
|
2417
|
+
#
|
|
2418
|
+
module Acceptables
|
|
2419
|
+
const_set(:DecimalInteger, OptionParser::DecimalInteger)
|
|
2420
|
+
const_set(:OctalInteger, OptionParser::OctalInteger)
|
|
2421
|
+
const_set(:DecimalNumeric, OptionParser::DecimalNumeric)
|
|
2422
|
+
end
|
|
2423
|
+
end
|
|
2424
|
+
|
|
2425
|
+
# ARGV is arguable by OptionParser
|
|
2426
|
+
ARGV.extend(OptionParser::Arguable)
|
|
2427
|
+
|
|
2428
|
+
# An alias for OptionParser.
|
|
2429
|
+
OptParse = OptionParser # :nodoc:
|