@ai-ecoverse/wasix-ruby 3.4.11-1 → 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 +61 -27
- package/README.md +2 -2
- package/bin/bundle +29 -0
- package/bin/bundler +29 -0
- package/bin/erb +29 -0
- package/bin/gem +12 -0
- package/bin/irb +29 -0
- package/bin/rake +29 -0
- package/bin/ruby +1 -0
- package/bin/ruby.wasm +0 -0
- package/lib/ruby/3.4.0/English.rb +164 -0
- package/lib/ruby/3.4.0/benchmark.rb +594 -0
- package/lib/ruby/3.4.0/bundled_gems.rb +248 -0
- package/lib/ruby/3.4.0/bundler/build_metadata.rb +43 -0
- package/lib/ruby/3.4.0/bundler/capistrano.rb +22 -0
- package/lib/ruby/3.4.0/bundler/checksum.rb +264 -0
- package/lib/ruby/3.4.0/bundler/ci_detector.rb +75 -0
- package/lib/ruby/3.4.0/bundler/cli/add.rb +49 -0
- package/lib/ruby/3.4.0/bundler/cli/binstubs.rb +57 -0
- package/lib/ruby/3.4.0/bundler/cli/cache.rb +43 -0
- package/lib/ruby/3.4.0/bundler/cli/check.rb +40 -0
- package/lib/ruby/3.4.0/bundler/cli/clean.rb +25 -0
- package/lib/ruby/3.4.0/bundler/cli/common.rb +138 -0
- package/lib/ruby/3.4.0/bundler/cli/config.rb +204 -0
- package/lib/ruby/3.4.0/bundler/cli/console.rb +42 -0
- package/lib/ruby/3.4.0/bundler/cli/doctor/diagnose.rb +167 -0
- package/lib/ruby/3.4.0/bundler/cli/doctor/ssl.rb +249 -0
- package/lib/ruby/3.4.0/bundler/cli/doctor.rb +33 -0
- package/lib/ruby/3.4.0/bundler/cli/exec.rb +89 -0
- package/lib/ruby/3.4.0/bundler/cli/fund.rb +36 -0
- package/lib/ruby/3.4.0/bundler/cli/gem.rb +467 -0
- package/lib/ruby/3.4.0/bundler/cli/info.rb +83 -0
- package/lib/ruby/3.4.0/bundler/cli/init.rb +51 -0
- package/lib/ruby/3.4.0/bundler/cli/inject.rb +60 -0
- package/lib/ruby/3.4.0/bundler/cli/install.rb +199 -0
- package/lib/ruby/3.4.0/bundler/cli/issue.rb +41 -0
- package/lib/ruby/3.4.0/bundler/cli/list.rb +66 -0
- package/lib/ruby/3.4.0/bundler/cli/lock.rb +94 -0
- package/lib/ruby/3.4.0/bundler/cli/open.rb +29 -0
- package/lib/ruby/3.4.0/bundler/cli/outdated.rb +297 -0
- package/lib/ruby/3.4.0/bundler/cli/platform.rb +48 -0
- package/lib/ruby/3.4.0/bundler/cli/plugin.rb +35 -0
- package/lib/ruby/3.4.0/bundler/cli/pristine.rb +60 -0
- package/lib/ruby/3.4.0/bundler/cli/remove.rb +17 -0
- package/lib/ruby/3.4.0/bundler/cli/show.rb +75 -0
- package/lib/ruby/3.4.0/bundler/cli/update.rb +123 -0
- package/lib/ruby/3.4.0/bundler/cli/viz.rb +31 -0
- package/lib/ruby/3.4.0/bundler/cli.rb +790 -0
- package/lib/ruby/3.4.0/bundler/compact_index_client/cache.rb +96 -0
- package/lib/ruby/3.4.0/bundler/compact_index_client/cache_file.rb +148 -0
- package/lib/ruby/3.4.0/bundler/compact_index_client/parser.rb +84 -0
- package/lib/ruby/3.4.0/bundler/compact_index_client/updater.rb +105 -0
- package/lib/ruby/3.4.0/bundler/compact_index_client.rb +97 -0
- package/lib/ruby/3.4.0/bundler/constants.rb +14 -0
- package/lib/ruby/3.4.0/bundler/current_ruby.rb +82 -0
- package/lib/ruby/3.4.0/bundler/definition.rb +1187 -0
- package/lib/ruby/3.4.0/bundler/dependency.rb +151 -0
- package/lib/ruby/3.4.0/bundler/deployment.rb +69 -0
- package/lib/ruby/3.4.0/bundler/deprecate.rb +44 -0
- package/lib/ruby/3.4.0/bundler/digest.rb +71 -0
- package/lib/ruby/3.4.0/bundler/dsl.rb +638 -0
- package/lib/ruby/3.4.0/bundler/endpoint_specification.rb +174 -0
- package/lib/ruby/3.4.0/bundler/env.rb +148 -0
- package/lib/ruby/3.4.0/bundler/environment_preserver.rb +68 -0
- package/lib/ruby/3.4.0/bundler/errors.rb +281 -0
- package/lib/ruby/3.4.0/bundler/feature_flag.rb +50 -0
- package/lib/ruby/3.4.0/bundler/fetcher/base.rb +52 -0
- package/lib/ruby/3.4.0/bundler/fetcher/compact_index.rb +120 -0
- package/lib/ruby/3.4.0/bundler/fetcher/dependency.rb +78 -0
- package/lib/ruby/3.4.0/bundler/fetcher/downloader.rb +91 -0
- package/lib/ruby/3.4.0/bundler/fetcher/gem_remote_fetcher.rb +16 -0
- package/lib/ruby/3.4.0/bundler/fetcher/index.rb +25 -0
- package/lib/ruby/3.4.0/bundler/fetcher.rb +331 -0
- package/lib/ruby/3.4.0/bundler/force_platform.rb +16 -0
- package/lib/ruby/3.4.0/bundler/friendly_errors.rb +126 -0
- package/lib/ruby/3.4.0/bundler/gem_helper.rb +237 -0
- package/lib/ruby/3.4.0/bundler/gem_helpers.rb +144 -0
- package/lib/ruby/3.4.0/bundler/gem_tasks.rb +7 -0
- package/lib/ruby/3.4.0/bundler/gem_version_promoter.rb +147 -0
- package/lib/ruby/3.4.0/bundler/graph.rb +152 -0
- package/lib/ruby/3.4.0/bundler/index.rb +205 -0
- package/lib/ruby/3.4.0/bundler/injector.rb +285 -0
- package/lib/ruby/3.4.0/bundler/inline.rb +98 -0
- package/lib/ruby/3.4.0/bundler/installer/gem_installer.rb +85 -0
- package/lib/ruby/3.4.0/bundler/installer/parallel_installer.rb +203 -0
- package/lib/ruby/3.4.0/bundler/installer/standalone.rb +113 -0
- package/lib/ruby/3.4.0/bundler/installer.rb +243 -0
- package/lib/ruby/3.4.0/bundler/lazy_specification.rb +243 -0
- package/lib/ruby/3.4.0/bundler/lockfile_generator.rb +104 -0
- package/lib/ruby/3.4.0/bundler/lockfile_parser.rb +300 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-add.1 +76 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-add.1.ronn +87 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-binstubs.1 +33 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-binstubs.1.ronn +44 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-cache.1 +68 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-cache.1.ronn +108 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-check.1 +24 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-check.1.ronn +31 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-clean.1 +17 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-clean.1.ronn +18 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-config.1 +317 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-config.1.ronn +408 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-console.1 +33 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-console.1.ronn +39 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-doctor.1 +30 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-doctor.1.ronn +33 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-env.1 +9 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-env.1.ronn +10 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-exec.1 +107 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-exec.1.ronn +154 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-fund.1 +22 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-fund.1.ronn +25 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-gem.1 +87 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-gem.1.ronn +149 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-help.1 +9 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-help.1.ronn +12 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-info.1 +17 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-info.1.ronn +21 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-init.1 +20 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-init.1.ronn +32 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-inject.1 +31 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-inject.1.ronn +32 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-install.1 +218 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-install.1.ronn +387 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-issue.1 +45 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-issue.1.ronn +37 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-licenses.1 +9 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-licenses.1.ronn +10 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-list.1 +35 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-list.1.ronn +36 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-lock.1 +75 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-lock.1.ronn +115 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-open.1 +32 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-open.1.ronn +28 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-outdated.1 +103 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-outdated.1.ronn +110 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-platform.1 +49 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-platform.1.ronn +49 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-plugin.1 +58 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-plugin.1.ronn +63 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-pristine.1 +23 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-pristine.1.ronn +34 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-remove.1 +21 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-remove.1.ronn +23 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-show.1 +19 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-show.1.ronn +25 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-update.1 +281 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-update.1.ronn +359 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-version.1 +22 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-version.1.ronn +24 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-viz.1 +30 -0
- package/lib/ruby/3.4.0/bundler/man/bundle-viz.1.ronn +36 -0
- package/lib/ruby/3.4.0/bundler/man/bundle.1 +102 -0
- package/lib/ruby/3.4.0/bundler/man/bundle.1.ronn +116 -0
- package/lib/ruby/3.4.0/bundler/man/gemfile.5 +472 -0
- package/lib/ruby/3.4.0/bundler/man/gemfile.5.ronn +558 -0
- package/lib/ruby/3.4.0/bundler/match_metadata.rb +30 -0
- package/lib/ruby/3.4.0/bundler/match_platform.rb +23 -0
- package/lib/ruby/3.4.0/bundler/match_remote_metadata.rb +29 -0
- package/lib/ruby/3.4.0/bundler/materialization.rb +59 -0
- package/lib/ruby/3.4.0/bundler/mirror.rb +221 -0
- package/lib/ruby/3.4.0/bundler/plugin/api/source.rb +322 -0
- package/lib/ruby/3.4.0/bundler/plugin/api.rb +81 -0
- package/lib/ruby/3.4.0/bundler/plugin/dsl.rb +53 -0
- package/lib/ruby/3.4.0/bundler/plugin/events.rb +85 -0
- package/lib/ruby/3.4.0/bundler/plugin/index.rb +197 -0
- package/lib/ruby/3.4.0/bundler/plugin/installer/git.rb +34 -0
- package/lib/ruby/3.4.0/bundler/plugin/installer/path.rb +26 -0
- package/lib/ruby/3.4.0/bundler/plugin/installer/rubygems.rb +19 -0
- package/lib/ruby/3.4.0/bundler/plugin/installer.rb +132 -0
- package/lib/ruby/3.4.0/bundler/plugin/source_list.rb +31 -0
- package/lib/ruby/3.4.0/bundler/plugin.rb +378 -0
- package/lib/ruby/3.4.0/bundler/process_lock.rb +20 -0
- package/lib/ruby/3.4.0/bundler/remote_specification.rb +126 -0
- package/lib/ruby/3.4.0/bundler/resolver/base.rb +118 -0
- package/lib/ruby/3.4.0/bundler/resolver/candidate.rb +85 -0
- package/lib/ruby/3.4.0/bundler/resolver/incompatibility.rb +15 -0
- package/lib/ruby/3.4.0/bundler/resolver/package.rb +94 -0
- package/lib/ruby/3.4.0/bundler/resolver/root.rb +25 -0
- package/lib/ruby/3.4.0/bundler/resolver/spec_group.rb +74 -0
- package/lib/ruby/3.4.0/bundler/resolver/strategy.rb +40 -0
- package/lib/ruby/3.4.0/bundler/resolver.rb +526 -0
- package/lib/ruby/3.4.0/bundler/retry.rb +66 -0
- package/lib/ruby/3.4.0/bundler/ruby_dsl.rb +62 -0
- package/lib/ruby/3.4.0/bundler/ruby_version.rb +137 -0
- package/lib/ruby/3.4.0/bundler/rubygems_ext.rb +485 -0
- package/lib/ruby/3.4.0/bundler/rubygems_gem_installer.rb +172 -0
- package/lib/ruby/3.4.0/bundler/rubygems_integration.rb +455 -0
- package/lib/ruby/3.4.0/bundler/runtime.rb +320 -0
- package/lib/ruby/3.4.0/bundler/safe_marshal.rb +31 -0
- package/lib/ruby/3.4.0/bundler/self_manager.rb +206 -0
- package/lib/ruby/3.4.0/bundler/settings/validator.rb +102 -0
- package/lib/ruby/3.4.0/bundler/settings.rb +599 -0
- package/lib/ruby/3.4.0/bundler/setup.rb +39 -0
- package/lib/ruby/3.4.0/bundler/shared_helpers.rb +398 -0
- package/lib/ruby/3.4.0/bundler/similarity_detector.rb +63 -0
- package/lib/ruby/3.4.0/bundler/source/gemspec.rb +15 -0
- package/lib/ruby/3.4.0/bundler/source/git/git_proxy.rb +472 -0
- package/lib/ruby/3.4.0/bundler/source/git.rb +452 -0
- package/lib/ruby/3.4.0/bundler/source/metadata.rb +63 -0
- package/lib/ruby/3.4.0/bundler/source/path/installer.rb +53 -0
- package/lib/ruby/3.4.0/bundler/source/path.rb +250 -0
- package/lib/ruby/3.4.0/bundler/source/rubygems/remote.rb +76 -0
- package/lib/ruby/3.4.0/bundler/source/rubygems.rb +522 -0
- package/lib/ruby/3.4.0/bundler/source/rubygems_aggregate.rb +68 -0
- package/lib/ruby/3.4.0/bundler/source.rb +118 -0
- package/lib/ruby/3.4.0/bundler/source_list.rb +273 -0
- package/lib/ruby/3.4.0/bundler/source_map.rb +71 -0
- package/lib/ruby/3.4.0/bundler/spec_set.rb +395 -0
- package/lib/ruby/3.4.0/bundler/stub_specification.rb +146 -0
- package/lib/ruby/3.4.0/bundler/templates/Executable +27 -0
- package/lib/ruby/3.4.0/bundler/templates/Executable.bundler +109 -0
- package/lib/ruby/3.4.0/bundler/templates/Executable.standalone +14 -0
- package/lib/ruby/3.4.0/bundler/templates/Gemfile +5 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +132 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/Cargo.toml.tt +7 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/Gemfile.tt +24 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/LICENSE.txt.tt +21 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/README.md.tt +49 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/Rakefile.tt +67 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/bin/console.tt +11 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/bin/setup.tt +8 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/circleci/config.yml.tt +25 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/exe/newgem.tt +3 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +10 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/ext/newgem/newgem.c.tt +9 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/ext/newgem/newgem.h.tt +6 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/github/workflows/main.yml.tt +37 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/gitignore.tt +23 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/gitlab-ci.yml.tt +18 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/lib/newgem/version.rb.tt +9 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/lib/newgem.rb.tt +15 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/newgem.gemspec.tt +52 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/rspec.tt +3 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/rubocop.yml.tt +8 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/spec/newgem_spec.rb.tt +11 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/spec/spec_helper.rb.tt +15 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/standard.yml.tt +3 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/test/minitest/test_helper.rb.tt +6 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/test/minitest/test_newgem.rb.tt +13 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +15 -0
- package/lib/ruby/3.4.0/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +6 -0
- package/lib/ruby/3.4.0/bundler/ui/rg_proxy.rb +19 -0
- package/lib/ruby/3.4.0/bundler/ui/shell.rb +187 -0
- package/lib/ruby/3.4.0/bundler/ui/silent.rb +96 -0
- package/lib/ruby/3.4.0/bundler/ui.rb +9 -0
- package/lib/ruby/3.4.0/bundler/uri_credentials_filter.rb +43 -0
- package/lib/ruby/3.4.0/bundler/uri_normalizer.rb +23 -0
- package/lib/ruby/3.4.0/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +224 -0
- package/lib/ruby/3.4.0/bundler/vendor/connection_pool/lib/connection_pool/version.rb +3 -0
- package/lib/ruby/3.4.0/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +56 -0
- package/lib/ruby/3.4.0/bundler/vendor/connection_pool/lib/connection_pool.rb +186 -0
- package/lib/ruby/3.4.0/bundler/vendor/fileutils/lib/fileutils.rb +2696 -0
- package/lib/ruby/3.4.0/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +41 -0
- package/lib/ruby/3.4.0/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +65 -0
- package/lib/ruby/3.4.0/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +79 -0
- package/lib/ruby/3.4.0/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1111 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +169 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +150 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +61 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/strategy.rb +42 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +129 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +423 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +236 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
- package/lib/ruby/3.4.0/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
- package/lib/ruby/3.4.0/bundler/vendor/securerandom/lib/securerandom.rb +102 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/actions/create_file.rb +105 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/actions/create_link.rb +61 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/actions/directory.rb +108 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +143 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +371 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +130 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/actions.rb +340 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/base.rb +825 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/command.rb +151 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +107 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/error.rb +106 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/group.rb +292 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/invocation.rb +178 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/line_editor/basic.rb +37 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/line_editor/readline.rb +88 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/line_editor.rb +17 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/nested_context.rb +29 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/parser/argument.rb +86 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/parser/arguments.rb +195 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/parser/option.rb +178 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/parser/options.rb +294 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/parser.rb +4 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/rake_compat.rb +72 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/runner.rb +335 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/shell/basic.rb +388 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/shell/color.rb +112 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/shell/column_printer.rb +29 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/shell/html.rb +81 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/shell/table_printer.rb +118 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/shell/terminal.rb +42 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +38 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/shell.rb +81 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/util.rb +285 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/version.rb +3 -0
- package/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor.rb +674 -0
- package/lib/ruby/3.4.0/bundler/vendor/tsort/lib/tsort.rb +455 -0
- package/lib/ruby/3.4.0/bundler/vendor/uri/lib/uri/common.rb +880 -0
- package/lib/ruby/3.4.0/bundler/vendor/uri/lib/uri/file.rb +100 -0
- package/lib/ruby/3.4.0/bundler/vendor/uri/lib/uri/ftp.rb +267 -0
- package/lib/ruby/3.4.0/bundler/vendor/uri/lib/uri/generic.rb +1592 -0
- package/lib/ruby/3.4.0/bundler/vendor/uri/lib/uri/http.rb +125 -0
- package/lib/ruby/3.4.0/bundler/vendor/uri/lib/uri/https.rb +23 -0
- package/lib/ruby/3.4.0/bundler/vendor/uri/lib/uri/ldap.rb +261 -0
- package/lib/ruby/3.4.0/bundler/vendor/uri/lib/uri/ldaps.rb +22 -0
- package/lib/ruby/3.4.0/bundler/vendor/uri/lib/uri/mailto.rb +293 -0
- package/lib/ruby/3.4.0/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +546 -0
- package/lib/ruby/3.4.0/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +206 -0
- package/lib/ruby/3.4.0/bundler/vendor/uri/lib/uri/version.rb +6 -0
- package/lib/ruby/3.4.0/bundler/vendor/uri/lib/uri/ws.rb +83 -0
- package/lib/ruby/3.4.0/bundler/vendor/uri/lib/uri/wss.rb +23 -0
- package/lib/ruby/3.4.0/bundler/vendor/uri/lib/uri.rb +104 -0
- package/lib/ruby/3.4.0/bundler/vendored_fileutils.rb +4 -0
- package/lib/ruby/3.4.0/bundler/vendored_net_http.rb +23 -0
- package/lib/ruby/3.4.0/bundler/vendored_persistent.rb +11 -0
- package/lib/ruby/3.4.0/bundler/vendored_pub_grub.rb +4 -0
- package/lib/ruby/3.4.0/bundler/vendored_securerandom.rb +12 -0
- package/lib/ruby/3.4.0/bundler/vendored_thor.rb +8 -0
- package/lib/ruby/3.4.0/bundler/vendored_timeout.rb +12 -0
- package/lib/ruby/3.4.0/bundler/vendored_tsort.rb +4 -0
- package/lib/ruby/3.4.0/bundler/vendored_uri.rb +21 -0
- package/lib/ruby/3.4.0/bundler/version.rb +13 -0
- package/lib/ruby/3.4.0/bundler/vlad.rb +17 -0
- package/lib/ruby/3.4.0/bundler/worker.rb +117 -0
- package/lib/ruby/3.4.0/bundler/yaml_serializer.rb +98 -0
- package/lib/ruby/3.4.0/bundler.rb +701 -0
- package/lib/ruby/3.4.0/cgi/cookie.rb +210 -0
- package/lib/ruby/3.4.0/cgi/core.rb +900 -0
- package/lib/ruby/3.4.0/cgi/html.rb +1035 -0
- package/lib/ruby/3.4.0/cgi/session/pstore.rb +91 -0
- package/lib/ruby/3.4.0/cgi/session.rb +562 -0
- package/lib/ruby/3.4.0/cgi/util.rb +258 -0
- package/lib/ruby/3.4.0/cgi.rb +297 -0
- package/lib/ruby/3.4.0/coverage.rb +14 -0
- package/lib/ruby/3.4.0/date.rb +70 -0
- package/lib/ruby/3.4.0/delegate.rb +444 -0
- package/lib/ruby/3.4.0/did_you_mean/core_ext/name_error.rb +57 -0
- package/lib/ruby/3.4.0/did_you_mean/experimental.rb +2 -0
- package/lib/ruby/3.4.0/did_you_mean/formatter.rb +44 -0
- package/lib/ruby/3.4.0/did_you_mean/formatters/plain_formatter.rb +4 -0
- package/lib/ruby/3.4.0/did_you_mean/formatters/verbose_formatter.rb +10 -0
- package/lib/ruby/3.4.0/did_you_mean/jaro_winkler.rb +84 -0
- package/lib/ruby/3.4.0/did_you_mean/levenshtein.rb +57 -0
- package/lib/ruby/3.4.0/did_you_mean/spell_checker.rb +46 -0
- package/lib/ruby/3.4.0/did_you_mean/spell_checkers/key_error_checker.rb +28 -0
- package/lib/ruby/3.4.0/did_you_mean/spell_checkers/method_name_checker.rb +79 -0
- package/lib/ruby/3.4.0/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb +49 -0
- package/lib/ruby/3.4.0/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb +85 -0
- package/lib/ruby/3.4.0/did_you_mean/spell_checkers/name_error_checkers.rb +20 -0
- package/lib/ruby/3.4.0/did_you_mean/spell_checkers/null_checker.rb +6 -0
- package/lib/ruby/3.4.0/did_you_mean/spell_checkers/pattern_key_name_checker.rb +28 -0
- package/lib/ruby/3.4.0/did_you_mean/spell_checkers/require_path_checker.rb +39 -0
- package/lib/ruby/3.4.0/did_you_mean/tree_spell_checker.rb +109 -0
- package/lib/ruby/3.4.0/did_you_mean/verbose.rb +2 -0
- package/lib/ruby/3.4.0/did_you_mean/version.rb +3 -0
- package/lib/ruby/3.4.0/did_you_mean.rb +131 -0
- package/lib/ruby/3.4.0/digest/loader.rb +3 -0
- package/lib/ruby/3.4.0/digest/sha2/loader.rb +3 -0
- package/lib/ruby/3.4.0/digest/sha2.rb +142 -0
- package/lib/ruby/3.4.0/digest/version.rb +5 -0
- package/lib/ruby/3.4.0/digest.rb +123 -0
- package/lib/ruby/3.4.0/erb/compiler.rb +472 -0
- package/lib/ruby/3.4.0/erb/def_method.rb +47 -0
- package/lib/ruby/3.4.0/erb/util.rb +63 -0
- package/lib/ruby/3.4.0/erb/version.rb +5 -0
- package/lib/ruby/3.4.0/erb.rb +509 -0
- package/lib/ruby/3.4.0/error_highlight/base.rb +830 -0
- package/lib/ruby/3.4.0/error_highlight/core_ext.rb +47 -0
- package/lib/ruby/3.4.0/error_highlight/formatter.rb +74 -0
- package/lib/ruby/3.4.0/error_highlight/version.rb +3 -0
- package/lib/ruby/3.4.0/error_highlight.rb +2 -0
- package/lib/ruby/3.4.0/fileutils.rb +2696 -0
- package/lib/ruby/3.4.0/find.rb +90 -0
- package/lib/ruby/3.4.0/forwardable/impl.rb +16 -0
- package/lib/ruby/3.4.0/forwardable.rb +321 -0
- package/lib/ruby/3.4.0/ipaddr.rb +841 -0
- package/lib/ruby/3.4.0/irb/cmd/nop.rb +4 -0
- package/lib/ruby/3.4.0/irb/color.rb +262 -0
- package/lib/ruby/3.4.0/irb/color_printer.rb +55 -0
- package/lib/ruby/3.4.0/irb/command/backtrace.rb +17 -0
- package/lib/ruby/3.4.0/irb/command/base.rb +60 -0
- package/lib/ruby/3.4.0/irb/command/break.rb +17 -0
- package/lib/ruby/3.4.0/irb/command/catch.rb +17 -0
- package/lib/ruby/3.4.0/irb/command/cd.rb +51 -0
- package/lib/ruby/3.4.0/irb/command/chws.rb +40 -0
- package/lib/ruby/3.4.0/irb/command/context.rb +16 -0
- package/lib/ruby/3.4.0/irb/command/continue.rb +17 -0
- package/lib/ruby/3.4.0/irb/command/debug.rb +73 -0
- package/lib/ruby/3.4.0/irb/command/delete.rb +17 -0
- package/lib/ruby/3.4.0/irb/command/disable_irb.rb +19 -0
- package/lib/ruby/3.4.0/irb/command/edit.rb +63 -0
- package/lib/ruby/3.4.0/irb/command/exit.rb +18 -0
- package/lib/ruby/3.4.0/irb/command/finish.rb +17 -0
- package/lib/ruby/3.4.0/irb/command/force_exit.rb +18 -0
- package/lib/ruby/3.4.0/irb/command/help.rb +83 -0
- package/lib/ruby/3.4.0/irb/command/history.rb +45 -0
- package/lib/ruby/3.4.0/irb/command/info.rb +17 -0
- package/lib/ruby/3.4.0/irb/command/internal_helpers.rb +27 -0
- package/lib/ruby/3.4.0/irb/command/irb_info.rb +33 -0
- package/lib/ruby/3.4.0/irb/command/load.rb +91 -0
- package/lib/ruby/3.4.0/irb/command/ls.rb +167 -0
- package/lib/ruby/3.4.0/irb/command/measure.rb +49 -0
- package/lib/ruby/3.4.0/irb/command/next.rb +17 -0
- package/lib/ruby/3.4.0/irb/command/pushws.rb +65 -0
- package/lib/ruby/3.4.0/irb/command/show_doc.rb +51 -0
- package/lib/ruby/3.4.0/irb/command/show_source.rb +74 -0
- package/lib/ruby/3.4.0/irb/command/step.rb +17 -0
- package/lib/ruby/3.4.0/irb/command/subirb.rb +123 -0
- package/lib/ruby/3.4.0/irb/command/whereami.rb +23 -0
- package/lib/ruby/3.4.0/irb/command.rb +23 -0
- package/lib/ruby/3.4.0/irb/completion.rb +504 -0
- package/lib/ruby/3.4.0/irb/context.rb +716 -0
- package/lib/ruby/3.4.0/irb/debug/ui.rb +101 -0
- package/lib/ruby/3.4.0/irb/debug.rb +127 -0
- package/lib/ruby/3.4.0/irb/default_commands.rb +276 -0
- package/lib/ruby/3.4.0/irb/easter-egg.rb +152 -0
- package/lib/ruby/3.4.0/irb/ext/change-ws.rb +37 -0
- package/lib/ruby/3.4.0/irb/ext/eval_history.rb +149 -0
- package/lib/ruby/3.4.0/irb/ext/loader.rb +127 -0
- package/lib/ruby/3.4.0/irb/ext/multi-irb.rb +258 -0
- package/lib/ruby/3.4.0/irb/ext/tracer.rb +39 -0
- package/lib/ruby/3.4.0/irb/ext/use-loader.rb +67 -0
- package/lib/ruby/3.4.0/irb/ext/workspaces.rb +36 -0
- package/lib/ruby/3.4.0/irb/frame.rb +80 -0
- package/lib/ruby/3.4.0/irb/help.rb +28 -0
- package/lib/ruby/3.4.0/irb/helper_method/base.rb +16 -0
- package/lib/ruby/3.4.0/irb/helper_method/conf.rb +11 -0
- package/lib/ruby/3.4.0/irb/helper_method.rb +29 -0
- package/lib/ruby/3.4.0/irb/history.rb +112 -0
- package/lib/ruby/3.4.0/irb/init.rb +538 -0
- package/lib/ruby/3.4.0/irb/input-method.rb +515 -0
- package/lib/ruby/3.4.0/irb/inspector.rb +131 -0
- package/lib/ruby/3.4.0/irb/lc/error.rb +52 -0
- package/lib/ruby/3.4.0/irb/lc/help-message +55 -0
- package/lib/ruby/3.4.0/irb/lc/ja/error.rb +53 -0
- package/lib/ruby/3.4.0/irb/lc/ja/help-message +58 -0
- package/lib/ruby/3.4.0/irb/locale.rb +153 -0
- package/lib/ruby/3.4.0/irb/nesting_parser.rb +239 -0
- package/lib/ruby/3.4.0/irb/notifier.rb +230 -0
- package/lib/ruby/3.4.0/irb/output-method.rb +80 -0
- package/lib/ruby/3.4.0/irb/pager.rb +100 -0
- package/lib/ruby/3.4.0/irb/ruby-lex.rb +476 -0
- package/lib/ruby/3.4.0/irb/ruby_logo.aa +118 -0
- package/lib/ruby/3.4.0/irb/source_finder.rb +138 -0
- package/lib/ruby/3.4.0/irb/statement.rb +80 -0
- package/lib/ruby/3.4.0/irb/version.rb +11 -0
- package/lib/ruby/3.4.0/irb/workspace.rb +171 -0
- package/lib/ruby/3.4.0/irb/ws-for-case-2.rb +9 -0
- package/lib/ruby/3.4.0/irb/xmp.rb +164 -0
- package/lib/ruby/3.4.0/irb.rb +1593 -0
- package/lib/ruby/3.4.0/json/add/bigdecimal.rb +58 -0
- package/lib/ruby/3.4.0/json/add/complex.rb +51 -0
- package/lib/ruby/3.4.0/json/add/core.rb +12 -0
- package/lib/ruby/3.4.0/json/add/date.rb +54 -0
- package/lib/ruby/3.4.0/json/add/date_time.rb +67 -0
- package/lib/ruby/3.4.0/json/add/exception.rb +49 -0
- package/lib/ruby/3.4.0/json/add/ostruct.rb +54 -0
- package/lib/ruby/3.4.0/json/add/range.rb +54 -0
- package/lib/ruby/3.4.0/json/add/rational.rb +49 -0
- package/lib/ruby/3.4.0/json/add/regexp.rb +48 -0
- package/lib/ruby/3.4.0/json/add/set.rb +48 -0
- package/lib/ruby/3.4.0/json/add/struct.rb +52 -0
- package/lib/ruby/3.4.0/json/add/symbol.rb +47 -0
- package/lib/ruby/3.4.0/json/add/time.rb +52 -0
- package/lib/ruby/3.4.0/json/common.rb +896 -0
- package/lib/ruby/3.4.0/json/ext/generator/state.rb +116 -0
- package/lib/ruby/3.4.0/json/ext.rb +23 -0
- package/lib/ruby/3.4.0/json/generic_object.rb +75 -0
- package/lib/ruby/3.4.0/json/version.rb +5 -0
- package/lib/ruby/3.4.0/json.rb +587 -0
- package/lib/ruby/3.4.0/logger/errors.rb +9 -0
- package/lib/ruby/3.4.0/logger/formatter.rb +36 -0
- package/lib/ruby/3.4.0/logger/log_device.rb +236 -0
- package/lib/ruby/3.4.0/logger/period.rb +47 -0
- package/lib/ruby/3.4.0/logger/severity.rb +38 -0
- package/lib/ruby/3.4.0/logger/version.rb +5 -0
- package/lib/ruby/3.4.0/logger.rb +761 -0
- package/lib/ruby/3.4.0/mkmf.rb +3045 -0
- package/lib/ruby/3.4.0/monitor.rb +289 -0
- package/lib/ruby/3.4.0/net/http/exceptions.rb +34 -0
- package/lib/ruby/3.4.0/net/http/generic_request.rb +414 -0
- package/lib/ruby/3.4.0/net/http/header.rb +981 -0
- package/lib/ruby/3.4.0/net/http/proxy_delta.rb +17 -0
- package/lib/ruby/3.4.0/net/http/request.rb +88 -0
- package/lib/ruby/3.4.0/net/http/requests.rb +430 -0
- package/lib/ruby/3.4.0/net/http/response.rb +738 -0
- package/lib/ruby/3.4.0/net/http/responses.rb +1174 -0
- package/lib/ruby/3.4.0/net/http/status.rb +84 -0
- package/lib/ruby/3.4.0/net/http.rb +2574 -0
- package/lib/ruby/3.4.0/net/https.rb +23 -0
- package/lib/ruby/3.4.0/net/protocol.rb +544 -0
- package/lib/ruby/3.4.0/objspace/trace.rb +45 -0
- package/lib/ruby/3.4.0/objspace.rb +135 -0
- package/lib/ruby/3.4.0/open-uri.rb +895 -0
- package/lib/ruby/3.4.0/open3/version.rb +3 -0
- package/lib/ruby/3.4.0/open3.rb +1410 -0
- package/lib/ruby/3.4.0/openssl/asn1.rb +188 -0
- package/lib/ruby/3.4.0/openssl/bn.rb +40 -0
- package/lib/ruby/3.4.0/openssl/buffering.rb +499 -0
- package/lib/ruby/3.4.0/openssl/cipher.rb +67 -0
- package/lib/ruby/3.4.0/openssl/digest.rb +69 -0
- package/lib/ruby/3.4.0/openssl/hmac.rb +78 -0
- package/lib/ruby/3.4.0/openssl/marshal.rb +30 -0
- package/lib/ruby/3.4.0/openssl/pkcs5.rb +22 -0
- package/lib/ruby/3.4.0/openssl/pkey.rb +471 -0
- package/lib/ruby/3.4.0/openssl/ssl.rb +609 -0
- package/lib/ruby/3.4.0/openssl/version.rb +5 -0
- package/lib/ruby/3.4.0/openssl/x509.rb +391 -0
- package/lib/ruby/3.4.0/openssl.rb +38 -0
- package/lib/ruby/3.4.0/optionparser.rb +2 -0
- package/lib/ruby/3.4.0/optparse/ac.rb +70 -0
- package/lib/ruby/3.4.0/optparse/date.rb +18 -0
- package/lib/ruby/3.4.0/optparse/kwargs.rb +27 -0
- package/lib/ruby/3.4.0/optparse/shellwords.rb +7 -0
- package/lib/ruby/3.4.0/optparse/time.rb +11 -0
- package/lib/ruby/3.4.0/optparse/uri.rb +7 -0
- package/lib/ruby/3.4.0/optparse/version.rb +80 -0
- package/lib/ruby/3.4.0/optparse.rb +2429 -0
- package/lib/ruby/3.4.0/ostruct.rb +489 -0
- package/lib/ruby/3.4.0/pathname.rb +621 -0
- package/lib/ruby/3.4.0/pp.rb +699 -0
- package/lib/ruby/3.4.0/prettyprint.rb +558 -0
- package/lib/ruby/3.4.0/prism/compiler.rb +801 -0
- package/lib/ruby/3.4.0/prism/desugar_compiler.rb +392 -0
- package/lib/ruby/3.4.0/prism/dispatcher.rb +2210 -0
- package/lib/ruby/3.4.0/prism/dsl.rb +1003 -0
- package/lib/ruby/3.4.0/prism/ffi.rb +570 -0
- package/lib/ruby/3.4.0/prism/inspect_visitor.rb +2392 -0
- package/lib/ruby/3.4.0/prism/lex_compat.rb +928 -0
- package/lib/ruby/3.4.0/prism/mutation_compiler.rb +772 -0
- package/lib/ruby/3.4.0/prism/node.rb +18816 -0
- package/lib/ruby/3.4.0/prism/node_ext.rb +511 -0
- package/lib/ruby/3.4.0/prism/pack.rb +230 -0
- package/lib/ruby/3.4.0/prism/parse_result/comments.rb +188 -0
- package/lib/ruby/3.4.0/prism/parse_result/errors.rb +66 -0
- package/lib/ruby/3.4.0/prism/parse_result/newlines.rb +155 -0
- package/lib/ruby/3.4.0/prism/parse_result.rb +911 -0
- package/lib/ruby/3.4.0/prism/pattern.rb +269 -0
- package/lib/ruby/3.4.0/prism/polyfill/append_as_bytes.rb +15 -0
- package/lib/ruby/3.4.0/prism/polyfill/byteindex.rb +13 -0
- package/lib/ruby/3.4.0/prism/polyfill/scan_byte.rb +14 -0
- package/lib/ruby/3.4.0/prism/polyfill/unpack1.rb +14 -0
- package/lib/ruby/3.4.0/prism/polyfill/warn.rb +36 -0
- package/lib/ruby/3.4.0/prism/reflection.rb +416 -0
- package/lib/ruby/3.4.0/prism/relocation.rb +505 -0
- package/lib/ruby/3.4.0/prism/serialize.rb +2400 -0
- package/lib/ruby/3.4.0/prism/string_query.rb +31 -0
- package/lib/ruby/3.4.0/prism/translation/parser/builder.rb +62 -0
- package/lib/ruby/3.4.0/prism/translation/parser/compiler.rb +2234 -0
- package/lib/ruby/3.4.0/prism/translation/parser/lexer.rb +820 -0
- package/lib/ruby/3.4.0/prism/translation/parser.rb +374 -0
- package/lib/ruby/3.4.0/prism/translation/parser33.rb +13 -0
- package/lib/ruby/3.4.0/prism/translation/parser34.rb +13 -0
- package/lib/ruby/3.4.0/prism/translation/parser35.rb +13 -0
- package/lib/ruby/3.4.0/prism/translation/parser_current.rb +24 -0
- package/lib/ruby/3.4.0/prism/translation/ripper/sexp.rb +126 -0
- package/lib/ruby/3.4.0/prism/translation/ripper/shim.rb +5 -0
- package/lib/ruby/3.4.0/prism/translation/ripper.rb +3474 -0
- package/lib/ruby/3.4.0/prism/translation/ruby_parser.rb +1929 -0
- package/lib/ruby/3.4.0/prism/translation.rb +16 -0
- package/lib/ruby/3.4.0/prism/visitor.rb +813 -0
- package/lib/ruby/3.4.0/prism.rb +91 -0
- package/lib/ruby/3.4.0/pstore.rb +736 -0
- package/lib/ruby/3.4.0/psych/class_loader.rb +104 -0
- package/lib/ruby/3.4.0/psych/coder.rb +95 -0
- package/lib/ruby/3.4.0/psych/core_ext.rb +19 -0
- package/lib/ruby/3.4.0/psych/exception.rb +28 -0
- package/lib/ruby/3.4.0/psych/handler.rb +255 -0
- package/lib/ruby/3.4.0/psych/handlers/document_stream.rb +23 -0
- package/lib/ruby/3.4.0/psych/handlers/recorder.rb +40 -0
- package/lib/ruby/3.4.0/psych/json/ruby_events.rb +20 -0
- package/lib/ruby/3.4.0/psych/json/stream.rb +17 -0
- package/lib/ruby/3.4.0/psych/json/tree_builder.rb +13 -0
- package/lib/ruby/3.4.0/psych/json/yaml_events.rb +30 -0
- package/lib/ruby/3.4.0/psych/nodes/alias.rb +21 -0
- package/lib/ruby/3.4.0/psych/nodes/document.rb +63 -0
- package/lib/ruby/3.4.0/psych/nodes/mapping.rb +59 -0
- package/lib/ruby/3.4.0/psych/nodes/node.rb +75 -0
- package/lib/ruby/3.4.0/psych/nodes/scalar.rb +70 -0
- package/lib/ruby/3.4.0/psych/nodes/sequence.rb +84 -0
- package/lib/ruby/3.4.0/psych/nodes/stream.rb +40 -0
- package/lib/ruby/3.4.0/psych/nodes.rb +78 -0
- package/lib/ruby/3.4.0/psych/omap.rb +5 -0
- package/lib/ruby/3.4.0/psych/parser.rb +65 -0
- package/lib/ruby/3.4.0/psych/scalar_scanner.rb +141 -0
- package/lib/ruby/3.4.0/psych/set.rb +5 -0
- package/lib/ruby/3.4.0/psych/stream.rb +38 -0
- package/lib/ruby/3.4.0/psych/streaming.rb +28 -0
- package/lib/ruby/3.4.0/psych/syntax_error.rb +22 -0
- package/lib/ruby/3.4.0/psych/tree_builder.rb +137 -0
- package/lib/ruby/3.4.0/psych/versions.rb +10 -0
- package/lib/ruby/3.4.0/psych/visitors/depth_first.rb +27 -0
- package/lib/ruby/3.4.0/psych/visitors/emitter.rb +52 -0
- package/lib/ruby/3.4.0/psych/visitors/json_tree.rb +25 -0
- package/lib/ruby/3.4.0/psych/visitors/to_ruby.rb +435 -0
- package/lib/ruby/3.4.0/psych/visitors/visitor.rb +34 -0
- package/lib/ruby/3.4.0/psych/visitors/yaml_tree.rb +583 -0
- package/lib/ruby/3.4.0/psych/visitors.rb +7 -0
- package/lib/ruby/3.4.0/psych/y.rb +10 -0
- package/lib/ruby/3.4.0/psych.rb +763 -0
- package/lib/ruby/3.4.0/random/formatter.rb +372 -0
- package/lib/ruby/3.4.0/rdoc/code_object/alias.rb +104 -0
- package/lib/ruby/3.4.0/rdoc/code_object/anon_class.rb +10 -0
- package/lib/ruby/3.4.0/rdoc/code_object/any_method.rb +374 -0
- package/lib/ruby/3.4.0/rdoc/code_object/attr.rb +172 -0
- package/lib/ruby/3.4.0/rdoc/code_object/class_module.rb +888 -0
- package/lib/ruby/3.4.0/rdoc/code_object/constant.rb +186 -0
- package/lib/ruby/3.4.0/rdoc/code_object/context/section.rb +175 -0
- package/lib/ruby/3.4.0/rdoc/code_object/context.rb +1222 -0
- package/lib/ruby/3.4.0/rdoc/code_object/extend.rb +9 -0
- package/lib/ruby/3.4.0/rdoc/code_object/ghost_method.rb +6 -0
- package/lib/ruby/3.4.0/rdoc/code_object/include.rb +9 -0
- package/lib/ruby/3.4.0/rdoc/code_object/meta_method.rb +6 -0
- package/lib/ruby/3.4.0/rdoc/code_object/method_attr.rb +410 -0
- package/lib/ruby/3.4.0/rdoc/code_object/mixin.rb +120 -0
- package/lib/ruby/3.4.0/rdoc/code_object/normal_class.rb +92 -0
- package/lib/ruby/3.4.0/rdoc/code_object/normal_module.rb +73 -0
- package/lib/ruby/3.4.0/rdoc/code_object/require.rb +51 -0
- package/lib/ruby/3.4.0/rdoc/code_object/single_class.rb +30 -0
- package/lib/ruby/3.4.0/rdoc/code_object/top_level.rb +273 -0
- package/lib/ruby/3.4.0/rdoc/code_object.rb +395 -0
- package/lib/ruby/3.4.0/rdoc/code_objects.rb +5 -0
- package/lib/ruby/3.4.0/rdoc/comment.rb +236 -0
- package/lib/ruby/3.4.0/rdoc/cross_reference.rb +228 -0
- package/lib/ruby/3.4.0/rdoc/encoding.rb +120 -0
- package/lib/ruby/3.4.0/rdoc/erb_partial.rb +18 -0
- package/lib/ruby/3.4.0/rdoc/erbio.rb +37 -0
- package/lib/ruby/3.4.0/rdoc/generator/darkfish.rb +812 -0
- package/lib/ruby/3.4.0/rdoc/generator/json_index.rb +284 -0
- package/lib/ruby/3.4.0/rdoc/generator/markup.rb +171 -0
- package/lib/ruby/3.4.0/rdoc/generator/pot/message_extractor.rb +68 -0
- package/lib/ruby/3.4.0/rdoc/generator/pot/po.rb +84 -0
- package/lib/ruby/3.4.0/rdoc/generator/pot/po_entry.rb +141 -0
- package/lib/ruby/3.4.0/rdoc/generator/pot.rb +94 -0
- package/lib/ruby/3.4.0/rdoc/generator/ri.rb +30 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/_footer.rhtml +5 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/_head.rhtml +48 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +5 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +15 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +15 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +15 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +21 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml +11 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +32 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +6 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/_sidebar_search.rhtml +14 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +11 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +39 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/_sidebar_toggle.rhtml +3 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/class.rhtml +221 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/css/fonts.css +167 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/css/rdoc.css +683 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/add.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/arrow_up.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/brick.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/bug.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/date.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/delete.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/find.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/package.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/page_green.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/plugin.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/ruby.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/tag_blue.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/transparent.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/wrench.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/images/zoom.png +0 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/index.rhtml +23 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/js/darkfish.js +120 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/js/search.js +110 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/page.rhtml +18 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/servlet_not_found.rhtml +20 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/servlet_root.rhtml +65 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/darkfish/table_of_contents.rhtml +70 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/json_index/js/navigation.js +105 -0
- package/lib/ruby/3.4.0/rdoc/generator/template/json_index/js/searcher.js +229 -0
- package/lib/ruby/3.4.0/rdoc/generator.rb +51 -0
- package/lib/ruby/3.4.0/rdoc/i18n/locale.rb +102 -0
- package/lib/ruby/3.4.0/rdoc/i18n/text.rb +126 -0
- package/lib/ruby/3.4.0/rdoc/i18n.rb +10 -0
- package/lib/ruby/3.4.0/rdoc/known_classes.rb +74 -0
- package/lib/ruby/3.4.0/rdoc/markdown/entities.rb +2131 -0
- package/lib/ruby/3.4.0/rdoc/markdown/literals.rb +454 -0
- package/lib/ruby/3.4.0/rdoc/markdown.rb +16806 -0
- package/lib/ruby/3.4.0/rdoc/markup/attr_changer.rb +22 -0
- package/lib/ruby/3.4.0/rdoc/markup/attr_span.rb +35 -0
- package/lib/ruby/3.4.0/rdoc/markup/attribute_manager.rb +405 -0
- package/lib/ruby/3.4.0/rdoc/markup/attributes.rb +70 -0
- package/lib/ruby/3.4.0/rdoc/markup/blank_line.rb +27 -0
- package/lib/ruby/3.4.0/rdoc/markup/block_quote.rb +14 -0
- package/lib/ruby/3.4.0/rdoc/markup/document.rb +164 -0
- package/lib/ruby/3.4.0/rdoc/markup/formatter.rb +272 -0
- package/lib/ruby/3.4.0/rdoc/markup/hard_break.rb +31 -0
- package/lib/ruby/3.4.0/rdoc/markup/heading.rb +84 -0
- package/lib/ruby/3.4.0/rdoc/markup/include.rb +42 -0
- package/lib/ruby/3.4.0/rdoc/markup/indented_paragraph.rb +47 -0
- package/lib/ruby/3.4.0/rdoc/markup/list.rb +101 -0
- package/lib/ruby/3.4.0/rdoc/markup/list_item.rb +99 -0
- package/lib/ruby/3.4.0/rdoc/markup/paragraph.rb +28 -0
- package/lib/ruby/3.4.0/rdoc/markup/parser.rb +585 -0
- package/lib/ruby/3.4.0/rdoc/markup/pre_process.rb +318 -0
- package/lib/ruby/3.4.0/rdoc/markup/raw.rb +69 -0
- package/lib/ruby/3.4.0/rdoc/markup/regexp_handling.rb +40 -0
- package/lib/ruby/3.4.0/rdoc/markup/rule.rb +20 -0
- package/lib/ruby/3.4.0/rdoc/markup/table.rb +56 -0
- package/lib/ruby/3.4.0/rdoc/markup/to_ansi.rb +93 -0
- package/lib/ruby/3.4.0/rdoc/markup/to_bs.rb +102 -0
- package/lib/ruby/3.4.0/rdoc/markup/to_html.rb +462 -0
- package/lib/ruby/3.4.0/rdoc/markup/to_html_crossref.rb +226 -0
- package/lib/ruby/3.4.0/rdoc/markup/to_html_snippet.rb +287 -0
- package/lib/ruby/3.4.0/rdoc/markup/to_joined_paragraph.rb +46 -0
- package/lib/ruby/3.4.0/rdoc/markup/to_label.rb +74 -0
- package/lib/ruby/3.4.0/rdoc/markup/to_markdown.rb +191 -0
- package/lib/ruby/3.4.0/rdoc/markup/to_rdoc.rb +353 -0
- package/lib/ruby/3.4.0/rdoc/markup/to_table_of_contents.rb +88 -0
- package/lib/ruby/3.4.0/rdoc/markup/to_test.rb +69 -0
- package/lib/ruby/3.4.0/rdoc/markup/to_tt_only.rb +120 -0
- package/lib/ruby/3.4.0/rdoc/markup/verbatim.rb +83 -0
- package/lib/ruby/3.4.0/rdoc/markup.rb +240 -0
- package/lib/ruby/3.4.0/rdoc/options.rb +1416 -0
- package/lib/ruby/3.4.0/rdoc/parser/c.rb +1257 -0
- package/lib/ruby/3.4.0/rdoc/parser/changelog.rb +350 -0
- package/lib/ruby/3.4.0/rdoc/parser/markdown.rb +22 -0
- package/lib/ruby/3.4.0/rdoc/parser/prism_ruby.rb +1092 -0
- package/lib/ruby/3.4.0/rdoc/parser/rd.rb +22 -0
- package/lib/ruby/3.4.0/rdoc/parser/ripper_state_lex.rb +302 -0
- package/lib/ruby/3.4.0/rdoc/parser/ruby.rb +2378 -0
- package/lib/ruby/3.4.0/rdoc/parser/ruby_tools.rb +165 -0
- package/lib/ruby/3.4.0/rdoc/parser/simple.rb +61 -0
- package/lib/ruby/3.4.0/rdoc/parser/text.rb +11 -0
- package/lib/ruby/3.4.0/rdoc/parser.rb +297 -0
- package/lib/ruby/3.4.0/rdoc/rd/block_parser.rb +1706 -0
- package/lib/ruby/3.4.0/rdoc/rd/inline.rb +71 -0
- package/lib/ruby/3.4.0/rdoc/rd/inline_parser.rb +1854 -0
- package/lib/ruby/3.4.0/rdoc/rd.rb +99 -0
- package/lib/ruby/3.4.0/rdoc/rdoc.rb +551 -0
- package/lib/ruby/3.4.0/rdoc/ri/driver.rb +1566 -0
- package/lib/ruby/3.4.0/rdoc/ri/formatter.rb +6 -0
- package/lib/ruby/3.4.0/rdoc/ri/paths.rb +171 -0
- package/lib/ruby/3.4.0/rdoc/ri/store.rb +6 -0
- package/lib/ruby/3.4.0/rdoc/ri/task.rb +71 -0
- package/lib/ruby/3.4.0/rdoc/ri.rb +20 -0
- package/lib/ruby/3.4.0/rdoc/rubygems_hook.rb +327 -0
- package/lib/ruby/3.4.0/rdoc/servlet.rb +452 -0
- package/lib/ruby/3.4.0/rdoc/stats/normal.rb +58 -0
- package/lib/ruby/3.4.0/rdoc/stats/quiet.rb +59 -0
- package/lib/ruby/3.4.0/rdoc/stats/verbose.rb +44 -0
- package/lib/ruby/3.4.0/rdoc/stats.rb +461 -0
- package/lib/ruby/3.4.0/rdoc/store.rb +997 -0
- package/lib/ruby/3.4.0/rdoc/task.rb +354 -0
- package/lib/ruby/3.4.0/rdoc/text.rb +322 -0
- package/lib/ruby/3.4.0/rdoc/token_stream.rb +118 -0
- package/lib/ruby/3.4.0/rdoc/tom_doc.rb +257 -0
- package/lib/ruby/3.4.0/rdoc/version.rb +10 -0
- package/lib/ruby/3.4.0/rdoc.rb +211 -0
- package/lib/ruby/3.4.0/readline.rb +7 -0
- package/lib/ruby/3.4.0/reline/config.rb +373 -0
- package/lib/ruby/3.4.0/reline/face.rb +199 -0
- package/lib/ruby/3.4.0/reline/history.rb +76 -0
- package/lib/ruby/3.4.0/reline/io/ansi.rb +325 -0
- package/lib/ruby/3.4.0/reline/io/dumb.rb +120 -0
- package/lib/ruby/3.4.0/reline/io/windows.rb +530 -0
- package/lib/ruby/3.4.0/reline/io.rb +55 -0
- package/lib/ruby/3.4.0/reline/key_actor/base.rb +37 -0
- package/lib/ruby/3.4.0/reline/key_actor/composite.rb +17 -0
- package/lib/ruby/3.4.0/reline/key_actor/emacs.rb +517 -0
- package/lib/ruby/3.4.0/reline/key_actor/vi_command.rb +518 -0
- package/lib/ruby/3.4.0/reline/key_actor/vi_insert.rb +517 -0
- package/lib/ruby/3.4.0/reline/key_actor.rb +8 -0
- package/lib/ruby/3.4.0/reline/key_stroke.rb +119 -0
- package/lib/ruby/3.4.0/reline/kill_ring.rb +125 -0
- package/lib/ruby/3.4.0/reline/line_editor.rb +2382 -0
- package/lib/ruby/3.4.0/reline/unicode/east_asian_width.rb +1267 -0
- package/lib/ruby/3.4.0/reline/unicode.rb +415 -0
- package/lib/ruby/3.4.0/reline/version.rb +3 -0
- package/lib/ruby/3.4.0/reline.rb +519 -0
- package/lib/ruby/3.4.0/resolv.rb +3587 -0
- package/lib/ruby/3.4.0/ripper/core.rb +74 -0
- package/lib/ruby/3.4.0/ripper/filter.rb +86 -0
- package/lib/ruby/3.4.0/ripper/lexer.rb +379 -0
- package/lib/ruby/3.4.0/ripper/sexp.rb +187 -0
- package/lib/ruby/3.4.0/ripper.rb +74 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/assembler.rb +1160 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/block.rb +11 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/branch_stub.rb +24 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/c_pointer.rb +394 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/c_type.rb +99 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/code_block.rb +91 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/compiler.rb +518 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/context.rb +377 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/entry_stub.rb +7 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/exit_compiler.rb +164 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/hooks.rb +36 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/insn_compiler.rb +6046 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/instruction.rb +1326 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/invariants.rb +155 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/jit_state.rb +65 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/stats.rb +191 -0
- package/lib/ruby/3.4.0/ruby_vm/rjit/type.rb +221 -0
- package/lib/ruby/3.4.0/rubygems/available_set.rb +165 -0
- package/lib/ruby/3.4.0/rubygems/basic_specification.rb +383 -0
- package/lib/ruby/3.4.0/rubygems/bundler_version_finder.rb +77 -0
- package/lib/ruby/3.4.0/rubygems/ci_detector.rb +75 -0
- package/lib/ruby/3.4.0/rubygems/command.rb +664 -0
- package/lib/ruby/3.4.0/rubygems/command_manager.rb +255 -0
- package/lib/ruby/3.4.0/rubygems/commands/build_command.rb +127 -0
- package/lib/ruby/3.4.0/rubygems/commands/cert_command.rb +325 -0
- package/lib/ruby/3.4.0/rubygems/commands/check_command.rb +97 -0
- package/lib/ruby/3.4.0/rubygems/commands/cleanup_command.rb +178 -0
- package/lib/ruby/3.4.0/rubygems/commands/contents_command.rb +196 -0
- package/lib/ruby/3.4.0/rubygems/commands/dependency_command.rb +206 -0
- package/lib/ruby/3.4.0/rubygems/commands/environment_command.rb +181 -0
- package/lib/ruby/3.4.0/rubygems/commands/exec_command.rb +256 -0
- package/lib/ruby/3.4.0/rubygems/commands/fetch_command.rb +109 -0
- package/lib/ruby/3.4.0/rubygems/commands/generate_index_command.rb +51 -0
- package/lib/ruby/3.4.0/rubygems/commands/help_command.rb +375 -0
- package/lib/ruby/3.4.0/rubygems/commands/info_command.rb +38 -0
- package/lib/ruby/3.4.0/rubygems/commands/install_command.rb +269 -0
- package/lib/ruby/3.4.0/rubygems/commands/list_command.rb +42 -0
- package/lib/ruby/3.4.0/rubygems/commands/lock_command.rb +109 -0
- package/lib/ruby/3.4.0/rubygems/commands/mirror_command.rb +26 -0
- package/lib/ruby/3.4.0/rubygems/commands/open_command.rb +83 -0
- package/lib/ruby/3.4.0/rubygems/commands/outdated_command.rb +33 -0
- package/lib/ruby/3.4.0/rubygems/commands/owner_command.rb +124 -0
- package/lib/ruby/3.4.0/rubygems/commands/pristine_command.rb +217 -0
- package/lib/ruby/3.4.0/rubygems/commands/push_command.rb +135 -0
- package/lib/ruby/3.4.0/rubygems/commands/query_command.rb +43 -0
- package/lib/ruby/3.4.0/rubygems/commands/rdoc_command.rb +90 -0
- package/lib/ruby/3.4.0/rubygems/commands/rebuild_command.rb +262 -0
- package/lib/ruby/3.4.0/rubygems/commands/search_command.rb +41 -0
- package/lib/ruby/3.4.0/rubygems/commands/server_command.rb +26 -0
- package/lib/ruby/3.4.0/rubygems/commands/setup_command.rb +663 -0
- package/lib/ruby/3.4.0/rubygems/commands/signin_command.rb +34 -0
- package/lib/ruby/3.4.0/rubygems/commands/signout_command.rb +32 -0
- package/lib/ruby/3.4.0/rubygems/commands/sources_command.rb +227 -0
- package/lib/ruby/3.4.0/rubygems/commands/specification_command.rb +156 -0
- package/lib/ruby/3.4.0/rubygems/commands/stale_command.rb +40 -0
- package/lib/ruby/3.4.0/rubygems/commands/uninstall_command.rb +204 -0
- package/lib/ruby/3.4.0/rubygems/commands/unpack_command.rb +168 -0
- package/lib/ruby/3.4.0/rubygems/commands/update_command.rb +326 -0
- package/lib/ruby/3.4.0/rubygems/commands/which_command.rb +88 -0
- package/lib/ruby/3.4.0/rubygems/commands/yank_command.rb +99 -0
- package/lib/ruby/3.4.0/rubygems/compatibility.rb +41 -0
- package/lib/ruby/3.4.0/rubygems/config_file.rb +618 -0
- package/lib/ruby/3.4.0/rubygems/core_ext/kernel_gem.rb +68 -0
- package/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb +149 -0
- package/lib/ruby/3.4.0/rubygems/core_ext/kernel_warn.rb +45 -0
- package/lib/ruby/3.4.0/rubygems/core_ext/tcpsocket_init.rb +54 -0
- package/lib/ruby/3.4.0/rubygems/defaults.rb +308 -0
- package/lib/ruby/3.4.0/rubygems/dependency.rb +348 -0
- package/lib/ruby/3.4.0/rubygems/dependency_installer.rb +335 -0
- package/lib/ruby/3.4.0/rubygems/dependency_list.rb +243 -0
- package/lib/ruby/3.4.0/rubygems/deprecate.rb +169 -0
- package/lib/ruby/3.4.0/rubygems/doctor.rb +132 -0
- package/lib/ruby/3.4.0/rubygems/errors.rb +177 -0
- package/lib/ruby/3.4.0/rubygems/exceptions.rb +293 -0
- package/lib/ruby/3.4.0/rubygems/ext/build_error.rb +9 -0
- package/lib/ruby/3.4.0/rubygems/ext/builder.rb +260 -0
- package/lib/ruby/3.4.0/rubygems/ext/cargo_builder/link_flag_converter.rb +27 -0
- package/lib/ruby/3.4.0/rubygems/ext/cargo_builder.rb +346 -0
- package/lib/ruby/3.4.0/rubygems/ext/cmake_builder.rb +21 -0
- package/lib/ruby/3.4.0/rubygems/ext/configure_builder.rb +26 -0
- package/lib/ruby/3.4.0/rubygems/ext/ext_conf_builder.rb +77 -0
- package/lib/ruby/3.4.0/rubygems/ext/rake_builder.rb +37 -0
- package/lib/ruby/3.4.0/rubygems/ext.rb +20 -0
- package/lib/ruby/3.4.0/rubygems/gem_runner.rb +89 -0
- package/lib/ruby/3.4.0/rubygems/gemcutter_utilities/webauthn_listener/response.rb +163 -0
- package/lib/ruby/3.4.0/rubygems/gemcutter_utilities/webauthn_listener.rb +105 -0
- package/lib/ruby/3.4.0/rubygems/gemcutter_utilities/webauthn_poller.rb +80 -0
- package/lib/ruby/3.4.0/rubygems/gemcutter_utilities.rb +397 -0
- package/lib/ruby/3.4.0/rubygems/gemspec_helpers.rb +19 -0
- package/lib/ruby/3.4.0/rubygems/install_default_message.rb +13 -0
- package/lib/ruby/3.4.0/rubygems/install_message.rb +13 -0
- package/lib/ruby/3.4.0/rubygems/install_update_options.rb +204 -0
- package/lib/ruby/3.4.0/rubygems/installer.rb +1031 -0
- package/lib/ruby/3.4.0/rubygems/installer_uninstaller_utils.rb +27 -0
- package/lib/ruby/3.4.0/rubygems/local_remote_options.rb +146 -0
- package/lib/ruby/3.4.0/rubygems/name_tuple.rb +119 -0
- package/lib/ruby/3.4.0/rubygems/openssl.rb +7 -0
- package/lib/ruby/3.4.0/rubygems/package/digest_io.rb +63 -0
- package/lib/ruby/3.4.0/rubygems/package/file_source.rb +32 -0
- package/lib/ruby/3.4.0/rubygems/package/io_source.rb +48 -0
- package/lib/ruby/3.4.0/rubygems/package/old.rb +169 -0
- package/lib/ruby/3.4.0/rubygems/package/source.rb +4 -0
- package/lib/ruby/3.4.0/rubygems/package/tar_header.rb +277 -0
- package/lib/ruby/3.4.0/rubygems/package/tar_reader/entry.rb +244 -0
- package/lib/ruby/3.4.0/rubygems/package/tar_reader.rb +101 -0
- package/lib/ruby/3.4.0/rubygems/package/tar_writer.rb +332 -0
- package/lib/ruby/3.4.0/rubygems/package.rb +742 -0
- package/lib/ruby/3.4.0/rubygems/package_task.rb +123 -0
- package/lib/ruby/3.4.0/rubygems/path_support.rb +85 -0
- package/lib/ruby/3.4.0/rubygems/platform.rb +269 -0
- package/lib/ruby/3.4.0/rubygems/psych_tree.rb +37 -0
- package/lib/ruby/3.4.0/rubygems/query_utils.rb +349 -0
- package/lib/ruby/3.4.0/rubygems/rdoc.rb +26 -0
- package/lib/ruby/3.4.0/rubygems/remote_fetcher.rb +341 -0
- package/lib/ruby/3.4.0/rubygems/request/connection_pools.rb +95 -0
- package/lib/ruby/3.4.0/rubygems/request/http_pool.rb +47 -0
- package/lib/ruby/3.4.0/rubygems/request/https_pool.rb +10 -0
- package/lib/ruby/3.4.0/rubygems/request.rb +298 -0
- package/lib/ruby/3.4.0/rubygems/request_set/gem_dependency_api.rb +841 -0
- package/lib/ruby/3.4.0/rubygems/request_set/lockfile/parser.rb +344 -0
- package/lib/ruby/3.4.0/rubygems/request_set/lockfile/tokenizer.rb +122 -0
- package/lib/ruby/3.4.0/rubygems/request_set/lockfile.rb +235 -0
- package/lib/ruby/3.4.0/rubygems/request_set.rb +468 -0
- package/lib/ruby/3.4.0/rubygems/requirement.rb +298 -0
- package/lib/ruby/3.4.0/rubygems/resolver/activation_request.rb +159 -0
- package/lib/ruby/3.4.0/rubygems/resolver/api_set/gem_parser.rb +21 -0
- package/lib/ruby/3.4.0/rubygems/resolver/api_set.rb +139 -0
- package/lib/ruby/3.4.0/rubygems/resolver/api_specification.rb +105 -0
- package/lib/ruby/3.4.0/rubygems/resolver/best_set.rb +49 -0
- package/lib/ruby/3.4.0/rubygems/resolver/composed_set.rb +65 -0
- package/lib/ruby/3.4.0/rubygems/resolver/conflict.rb +146 -0
- package/lib/ruby/3.4.0/rubygems/resolver/current_set.rb +12 -0
- package/lib/ruby/3.4.0/rubygems/resolver/dependency_request.rb +119 -0
- package/lib/ruby/3.4.0/rubygems/resolver/git_set.rb +120 -0
- package/lib/ruby/3.4.0/rubygems/resolver/git_specification.rb +57 -0
- package/lib/ruby/3.4.0/rubygems/resolver/index_set.rb +79 -0
- package/lib/ruby/3.4.0/rubygems/resolver/index_specification.rb +101 -0
- package/lib/ruby/3.4.0/rubygems/resolver/installed_specification.rb +57 -0
- package/lib/ruby/3.4.0/rubygems/resolver/installer_set.rb +271 -0
- package/lib/ruby/3.4.0/rubygems/resolver/local_specification.rb +40 -0
- package/lib/ruby/3.4.0/rubygems/resolver/lock_set.rb +81 -0
- package/lib/ruby/3.4.0/rubygems/resolver/lock_specification.rb +86 -0
- package/lib/ruby/3.4.0/rubygems/resolver/requirement_list.rb +82 -0
- package/lib/ruby/3.4.0/rubygems/resolver/set.rb +55 -0
- package/lib/ruby/3.4.0/rubygems/resolver/source_set.rb +47 -0
- package/lib/ruby/3.4.0/rubygems/resolver/spec_specification.rb +76 -0
- package/lib/ruby/3.4.0/rubygems/resolver/specification.rb +126 -0
- package/lib/ruby/3.4.0/rubygems/resolver/stats.rb +46 -0
- package/lib/ruby/3.4.0/rubygems/resolver/vendor_set.rb +86 -0
- package/lib/ruby/3.4.0/rubygems/resolver/vendor_specification.rb +23 -0
- package/lib/ruby/3.4.0/rubygems/resolver.rb +341 -0
- package/lib/ruby/3.4.0/rubygems/s3_uri_signer.rb +177 -0
- package/lib/ruby/3.4.0/rubygems/safe_marshal/elements.rb +146 -0
- package/lib/ruby/3.4.0/rubygems/safe_marshal/reader.rb +325 -0
- package/lib/ruby/3.4.0/rubygems/safe_marshal/visitors/stream_printer.rb +31 -0
- package/lib/ruby/3.4.0/rubygems/safe_marshal/visitors/to_ruby.rb +428 -0
- package/lib/ruby/3.4.0/rubygems/safe_marshal/visitors/visitor.rb +74 -0
- package/lib/ruby/3.4.0/rubygems/safe_marshal.rb +74 -0
- package/lib/ruby/3.4.0/rubygems/safe_yaml.rb +45 -0
- package/lib/ruby/3.4.0/rubygems/security/policies.rb +114 -0
- package/lib/ruby/3.4.0/rubygems/security/policy.rb +288 -0
- package/lib/ruby/3.4.0/rubygems/security/signer.rb +212 -0
- package/lib/ruby/3.4.0/rubygems/security/trust_dir.rb +117 -0
- package/lib/ruby/3.4.0/rubygems/security.rb +615 -0
- package/lib/ruby/3.4.0/rubygems/security_option.rb +43 -0
- package/lib/ruby/3.4.0/rubygems/source/git.rb +244 -0
- package/lib/ruby/3.4.0/rubygems/source/installed.rb +39 -0
- package/lib/ruby/3.4.0/rubygems/source/local.rb +131 -0
- package/lib/ruby/3.4.0/rubygems/source/lock.rb +49 -0
- package/lib/ruby/3.4.0/rubygems/source/specific_file.rb +73 -0
- package/lib/ruby/3.4.0/rubygems/source/vendor.rb +24 -0
- package/lib/ruby/3.4.0/rubygems/source.rb +247 -0
- package/lib/ruby/3.4.0/rubygems/source_list.rb +146 -0
- package/lib/ruby/3.4.0/rubygems/spec_fetcher.rb +290 -0
- package/lib/ruby/3.4.0/rubygems/specification.rb +2666 -0
- package/lib/ruby/3.4.0/rubygems/specification_policy.rb +558 -0
- package/lib/ruby/3.4.0/rubygems/specification_record.rb +212 -0
- package/lib/ruby/3.4.0/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem +21 -0
- package/lib/ruby/3.4.0/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem +21 -0
- package/lib/ruby/3.4.0/rubygems/stub_specification.rb +235 -0
- package/lib/ruby/3.4.0/rubygems/target_rbconfig.rb +50 -0
- package/lib/ruby/3.4.0/rubygems/text.rb +85 -0
- package/lib/ruby/3.4.0/rubygems/uninstaller.rb +429 -0
- package/lib/ruby/3.4.0/rubygems/unknown_command_spell_checker.rb +21 -0
- package/lib/ruby/3.4.0/rubygems/update_suggestion.rb +56 -0
- package/lib/ruby/3.4.0/rubygems/uri.rb +126 -0
- package/lib/ruby/3.4.0/rubygems/uri_formatter.rb +47 -0
- package/lib/ruby/3.4.0/rubygems/user_interaction.rb +650 -0
- package/lib/ruby/3.4.0/rubygems/util/licenses.rb +834 -0
- package/lib/ruby/3.4.0/rubygems/util/list.rb +40 -0
- package/lib/ruby/3.4.0/rubygems/util.rb +118 -0
- package/lib/ruby/3.4.0/rubygems/validator.rb +144 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +57 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +88 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +36 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +66 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +62 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +63 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +61 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +126 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +46 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +36 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +164 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph.rb +255 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/errors.rb +149 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb +6 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +112 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/modules/ui.rb +67 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/resolution.rb +839 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/resolver.rb +46 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/state.rb +58 -0
- package/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo.rb +11 -0
- package/lib/ruby/3.4.0/rubygems/vendor/net-http/lib/net/http/exceptions.rb +34 -0
- package/lib/ruby/3.4.0/rubygems/vendor/net-http/lib/net/http/generic_request.rb +414 -0
- package/lib/ruby/3.4.0/rubygems/vendor/net-http/lib/net/http/header.rb +981 -0
- package/lib/ruby/3.4.0/rubygems/vendor/net-http/lib/net/http/proxy_delta.rb +17 -0
- package/lib/ruby/3.4.0/rubygems/vendor/net-http/lib/net/http/request.rb +88 -0
- package/lib/ruby/3.4.0/rubygems/vendor/net-http/lib/net/http/requests.rb +430 -0
- package/lib/ruby/3.4.0/rubygems/vendor/net-http/lib/net/http/response.rb +738 -0
- package/lib/ruby/3.4.0/rubygems/vendor/net-http/lib/net/http/responses.rb +1174 -0
- package/lib/ruby/3.4.0/rubygems/vendor/net-http/lib/net/http/status.rb +84 -0
- package/lib/ruby/3.4.0/rubygems/vendor/net-http/lib/net/http.rb +2580 -0
- package/lib/ruby/3.4.0/rubygems/vendor/net-http/lib/net/https.rb +23 -0
- package/lib/ruby/3.4.0/rubygems/vendor/net-protocol/lib/net/protocol.rb +544 -0
- package/lib/ruby/3.4.0/rubygems/vendor/optparse/lib/optionparser.rb +2 -0
- package/lib/ruby/3.4.0/rubygems/vendor/optparse/lib/optparse/ac.rb +70 -0
- package/lib/ruby/3.4.0/rubygems/vendor/optparse/lib/optparse/date.rb +18 -0
- package/lib/ruby/3.4.0/rubygems/vendor/optparse/lib/optparse/kwargs.rb +27 -0
- package/lib/ruby/3.4.0/rubygems/vendor/optparse/lib/optparse/shellwords.rb +7 -0
- package/lib/ruby/3.4.0/rubygems/vendor/optparse/lib/optparse/time.rb +11 -0
- package/lib/ruby/3.4.0/rubygems/vendor/optparse/lib/optparse/uri.rb +7 -0
- package/lib/ruby/3.4.0/rubygems/vendor/optparse/lib/optparse/version.rb +80 -0
- package/lib/ruby/3.4.0/rubygems/vendor/optparse/lib/optparse.rb +2426 -0
- package/lib/ruby/3.4.0/rubygems/vendor/resolv/lib/resolv.rb +3455 -0
- package/lib/ruby/3.4.0/rubygems/vendor/securerandom/lib/securerandom.rb +102 -0
- package/lib/ruby/3.4.0/rubygems/vendor/timeout/lib/timeout.rb +198 -0
- package/lib/ruby/3.4.0/rubygems/vendor/tsort/lib/tsort.rb +455 -0
- package/lib/ruby/3.4.0/rubygems/vendor/uri/lib/uri/common.rb +880 -0
- package/lib/ruby/3.4.0/rubygems/vendor/uri/lib/uri/file.rb +100 -0
- package/lib/ruby/3.4.0/rubygems/vendor/uri/lib/uri/ftp.rb +267 -0
- package/lib/ruby/3.4.0/rubygems/vendor/uri/lib/uri/generic.rb +1592 -0
- package/lib/ruby/3.4.0/rubygems/vendor/uri/lib/uri/http.rb +125 -0
- package/lib/ruby/3.4.0/rubygems/vendor/uri/lib/uri/https.rb +23 -0
- package/lib/ruby/3.4.0/rubygems/vendor/uri/lib/uri/ldap.rb +261 -0
- package/lib/ruby/3.4.0/rubygems/vendor/uri/lib/uri/ldaps.rb +22 -0
- package/lib/ruby/3.4.0/rubygems/vendor/uri/lib/uri/mailto.rb +293 -0
- package/lib/ruby/3.4.0/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +546 -0
- package/lib/ruby/3.4.0/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb +206 -0
- package/lib/ruby/3.4.0/rubygems/vendor/uri/lib/uri/version.rb +6 -0
- package/lib/ruby/3.4.0/rubygems/vendor/uri/lib/uri/ws.rb +83 -0
- package/lib/ruby/3.4.0/rubygems/vendor/uri/lib/uri/wss.rb +23 -0
- package/lib/ruby/3.4.0/rubygems/vendor/uri/lib/uri.rb +104 -0
- package/lib/ruby/3.4.0/rubygems/vendored_molinillo.rb +3 -0
- package/lib/ruby/3.4.0/rubygems/vendored_net_http.rb +5 -0
- package/lib/ruby/3.4.0/rubygems/vendored_optparse.rb +3 -0
- package/lib/ruby/3.4.0/rubygems/vendored_securerandom.rb +3 -0
- package/lib/ruby/3.4.0/rubygems/vendored_timeout.rb +5 -0
- package/lib/ruby/3.4.0/rubygems/vendored_tsort.rb +3 -0
- package/lib/ruby/3.4.0/rubygems/version.rb +441 -0
- package/lib/ruby/3.4.0/rubygems/version_option.rb +80 -0
- package/lib/ruby/3.4.0/rubygems/yaml_serializer.rb +98 -0
- package/lib/ruby/3.4.0/rubygems.rb +1417 -0
- package/lib/ruby/3.4.0/securerandom.rb +102 -0
- package/lib/ruby/3.4.0/set/sorted_set.rb +6 -0
- package/lib/ruby/3.4.0/set.rb +855 -0
- package/lib/ruby/3.4.0/shellwords.rb +254 -0
- package/lib/ruby/3.4.0/singleton.rb +239 -0
- package/lib/ruby/3.4.0/socket.rb +1790 -0
- package/lib/ruby/3.4.0/strscan/strscan.rb +25 -0
- package/lib/ruby/3.4.0/syntax_suggest/api.rb +233 -0
- package/lib/ruby/3.4.0/syntax_suggest/around_block_scan.rb +232 -0
- package/lib/ruby/3.4.0/syntax_suggest/block_expand.rb +165 -0
- package/lib/ruby/3.4.0/syntax_suggest/capture/before_after_keyword_ends.rb +85 -0
- package/lib/ruby/3.4.0/syntax_suggest/capture/falling_indent_lines.rb +71 -0
- package/lib/ruby/3.4.0/syntax_suggest/capture_code_context.rb +245 -0
- package/lib/ruby/3.4.0/syntax_suggest/clean_document.rb +306 -0
- package/lib/ruby/3.4.0/syntax_suggest/cli.rb +130 -0
- package/lib/ruby/3.4.0/syntax_suggest/code_block.rb +100 -0
- package/lib/ruby/3.4.0/syntax_suggest/code_frontier.rb +178 -0
- package/lib/ruby/3.4.0/syntax_suggest/code_line.rb +243 -0
- package/lib/ruby/3.4.0/syntax_suggest/code_search.rb +139 -0
- package/lib/ruby/3.4.0/syntax_suggest/core_ext.rb +96 -0
- package/lib/ruby/3.4.0/syntax_suggest/display_code_with_line_numbers.rb +70 -0
- package/lib/ruby/3.4.0/syntax_suggest/display_invalid_blocks.rb +83 -0
- package/lib/ruby/3.4.0/syntax_suggest/explain_syntax.rb +117 -0
- package/lib/ruby/3.4.0/syntax_suggest/left_right_lex_count.rb +168 -0
- package/lib/ruby/3.4.0/syntax_suggest/lex_all.rb +74 -0
- package/lib/ruby/3.4.0/syntax_suggest/lex_value.rb +70 -0
- package/lib/ruby/3.4.0/syntax_suggest/mini_stringio.rb +30 -0
- package/lib/ruby/3.4.0/syntax_suggest/parse_blocks_from_indent_line.rb +60 -0
- package/lib/ruby/3.4.0/syntax_suggest/pathname_from_message.rb +59 -0
- package/lib/ruby/3.4.0/syntax_suggest/priority_engulf_queue.rb +63 -0
- package/lib/ruby/3.4.0/syntax_suggest/priority_queue.rb +105 -0
- package/lib/ruby/3.4.0/syntax_suggest/ripper_errors.rb +39 -0
- package/lib/ruby/3.4.0/syntax_suggest/scan_history.rb +134 -0
- package/lib/ruby/3.4.0/syntax_suggest/unvisited_lines.rb +36 -0
- package/lib/ruby/3.4.0/syntax_suggest/version.rb +5 -0
- package/lib/ruby/3.4.0/syntax_suggest.rb +3 -0
- package/lib/ruby/3.4.0/tempfile.rb +640 -0
- package/lib/ruby/3.4.0/time.rb +731 -0
- package/lib/ruby/3.4.0/timeout.rb +200 -0
- package/lib/ruby/3.4.0/tmpdir.rb +189 -0
- package/lib/ruby/3.4.0/tsort.rb +455 -0
- package/lib/ruby/3.4.0/un.rb +441 -0
- package/lib/ruby/3.4.0/unicode_normalize/normalize.rb +181 -0
- package/lib/ruby/3.4.0/unicode_normalize/tables.rb +9259 -0
- package/lib/ruby/3.4.0/uri/common.rb +880 -0
- package/lib/ruby/3.4.0/uri/file.rb +100 -0
- package/lib/ruby/3.4.0/uri/ftp.rb +267 -0
- package/lib/ruby/3.4.0/uri/generic.rb +1592 -0
- package/lib/ruby/3.4.0/uri/http.rb +125 -0
- package/lib/ruby/3.4.0/uri/https.rb +23 -0
- package/lib/ruby/3.4.0/uri/ldap.rb +261 -0
- package/lib/ruby/3.4.0/uri/ldaps.rb +22 -0
- package/lib/ruby/3.4.0/uri/mailto.rb +293 -0
- package/lib/ruby/3.4.0/uri/rfc2396_parser.rb +546 -0
- package/lib/ruby/3.4.0/uri/rfc3986_parser.rb +206 -0
- package/lib/ruby/3.4.0/uri/version.rb +6 -0
- package/lib/ruby/3.4.0/uri/ws.rb +83 -0
- package/lib/ruby/3.4.0/uri/wss.rb +23 -0
- package/lib/ruby/3.4.0/uri.rb +104 -0
- package/lib/ruby/{3.4.11 → 3.4.0/wasm32-wasi}/rbconfig.rb +11 -11
- package/lib/ruby/3.4.0/weakref.rb +58 -0
- package/lib/ruby/3.4.0/yaml/dbm.rb +295 -0
- package/lib/ruby/3.4.0/yaml/store.rb +98 -0
- package/lib/ruby/3.4.0/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/Gemfile +4 -0
- package/lib/ruby/gems/3.4.0/gems/abbrev-0.1.2/LICENSE.txt +22 -0
- package/lib/ruby/gems/3.4.0/gems/abbrev-0.1.2/README.md +45 -0
- package/lib/ruby/gems/3.4.0/gems/abbrev-0.1.2/Rakefile +10 -0
- package/lib/ruby/gems/3.4.0/gems/abbrev-0.1.2/bin/console +14 -0
- package/lib/ruby/gems/3.4.0/gems/abbrev-0.1.2/bin/setup +8 -0
- package/lib/ruby/gems/3.4.0/gems/abbrev-0.1.2/lib/abbrev.rb +133 -0
- package/lib/ruby/gems/3.4.0/gems/base64-0.2.0/LICENSE.txt +22 -0
- package/lib/ruby/gems/3.4.0/gems/base64-0.2.0/README.md +48 -0
- package/lib/ruby/gems/3.4.0/gems/base64-0.2.0/lib/base64.rb +363 -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/csv-3.3.2/LICENSE.txt +33 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/NEWS.md +965 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/README.md +55 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/arguments/io.rdoc +5 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/common/col_sep.rdoc +57 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/common/quote_char.rdoc +42 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/common/row_sep.rdoc +91 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/generating/force_quotes.rdoc +17 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/generating/quote_empty.rdoc +12 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/generating/write_converters.rdoc +25 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/generating/write_empty_value.rdoc +15 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/generating/write_headers.rdoc +29 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/generating/write_nil_value.rdoc +14 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/parsing/converters.rdoc +46 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/parsing/empty_value.rdoc +13 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/parsing/field_size_limit.rdoc +39 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/parsing/header_converters.rdoc +43 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/parsing/headers.rdoc +63 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/parsing/liberal_parsing.rdoc +38 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/parsing/nil_value.rdoc +12 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/parsing/return_headers.rdoc +22 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/parsing/skip_blanks.rdoc +31 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/parsing/skip_lines.rdoc +37 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/parsing/strip.rdoc +15 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/options/parsing/unconverted_fields.rdoc +27 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/recipes/filtering.rdoc +226 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/recipes/generating.rdoc +298 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/recipes/parsing.rdoc +554 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/doc/csv/recipes/recipes.rdoc +6 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/lib/csv/core_ext/array.rb +9 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/lib/csv/core_ext/string.rb +9 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/lib/csv/fields_converter.rb +96 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/lib/csv/input_record_separator.rb +18 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/lib/csv/parser.rb +1292 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/lib/csv/row.rb +757 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/lib/csv/table.rb +1055 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/lib/csv/version.rb +6 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/lib/csv/writer.rb +209 -0
- package/lib/ruby/gems/3.4.0/gems/csv-3.3.2/lib/csv.rb +3017 -0
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/LICENSE.txt +22 -0
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/acl.rb +239 -0
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/drb.rb +1943 -0
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/eq.rb +15 -0
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/extserv.rb +44 -0
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/extservm.rb +94 -0
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/gw.rb +161 -0
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/invokemethod.rb +35 -0
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/observer.rb +26 -0
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/ssl.rb +354 -0
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/timeridconv.rb +97 -0
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/unix.rb +118 -0
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/version.rb +3 -0
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/weakidconv.rb +59 -0
- package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb.rb +3 -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/Gemfile +4 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/LICENSE.txt +22 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/README.md +99 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/Rakefile +10 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/bin/console +7 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/bin/setup +6 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/lib/getoptlong.rb +867 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/sample/getoptlong/abbrev.rb +9 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/sample/getoptlong/aliases.rb +8 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/sample/getoptlong/argv.rb +12 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/sample/getoptlong/each.rb +12 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/sample/getoptlong/fibonacci.rb +62 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/sample/getoptlong/permute.rb +12 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/sample/getoptlong/require_order.rb +13 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/sample/getoptlong/return_in_order.rb +13 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/sample/getoptlong/simple.rb +7 -0
- package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/sample/getoptlong/types.rb +10 -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/matrix-0.4.2/LICENSE.txt +22 -0
- package/lib/ruby/gems/3.4.0/gems/matrix-0.4.2/lib/matrix/eigenvalue_decomposition.rb +882 -0
- package/lib/ruby/gems/3.4.0/gems/matrix-0.4.2/lib/matrix/lup_decomposition.rb +219 -0
- package/lib/ruby/gems/3.4.0/gems/matrix-0.4.2/lib/matrix/version.rb +5 -0
- package/lib/ruby/gems/3.4.0/gems/matrix-0.4.2/lib/matrix.rb +2493 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/History.rdoc +1681 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/Manifest.txt +32 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/README.rdoc +835 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/Rakefile +81 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/design_rationale.rb +52 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/hoe/minitest.rb +29 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/assertions.rb +855 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/autorun.rb +6 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/benchmark.rb +452 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/compress.rb +94 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/error_on_warning.rb +11 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/expectations.rb +321 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/hell.rb +11 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/manual_plugins.rb +16 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/mock.rb +347 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/parallel.rb +70 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/pride.rb +4 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/pride_plugin.rb +135 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/spec.rb +350 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/test.rb +237 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/test_task.rb +307 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest/unit.rb +42 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/lib/minitest.rb +1235 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/test/minitest/metametameta.rb +150 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/test/minitest/test_minitest_assertions.rb +1720 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/test/minitest/test_minitest_benchmark.rb +137 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/test/minitest/test_minitest_mock.rb +1218 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/test/minitest/test_minitest_reporter.rb +436 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/test/minitest/test_minitest_spec.rb +1163 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/test/minitest/test_minitest_test.rb +1356 -0
- package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/test/minitest/test_minitest_test_task.rb +57 -0
- package/lib/ruby/gems/3.4.0/gems/mutex_m-0.3.0/BSDL +22 -0
- package/lib/ruby/gems/3.4.0/gems/mutex_m-0.3.0/COPYING +56 -0
- package/lib/ruby/gems/3.4.0/gems/mutex_m-0.3.0/README.md +62 -0
- package/lib/ruby/gems/3.4.0/gems/mutex_m-0.3.0/lib/mutex_m.rb +121 -0
- package/lib/ruby/gems/3.4.0/gems/mutex_m-0.3.0/sig/mutex_m.rbs +99 -0
- package/lib/ruby/gems/3.4.0/gems/net-ftp-0.3.8/BSDL +22 -0
- package/lib/ruby/gems/3.4.0/gems/net-ftp-0.3.8/COPYING +56 -0
- package/lib/ruby/gems/3.4.0/gems/net-ftp-0.3.8/Gemfile +6 -0
- package/lib/ruby/gems/3.4.0/gems/net-ftp-0.3.8/LICENSE.txt +2 -0
- package/lib/ruby/gems/3.4.0/gems/net-ftp-0.3.8/README.md +56 -0
- package/lib/ruby/gems/3.4.0/gems/net-ftp-0.3.8/Rakefile +10 -0
- package/lib/ruby/gems/3.4.0/gems/net-ftp-0.3.8/lib/net/ftp.rb +1580 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/BSDL +22 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/COPYING +56 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/Gemfile +25 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/LICENSE.txt +65 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/README.md +77 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/Rakefile +13 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/docs/styles.css +85 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/authenticators.rb +37 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/command_data.rb +507 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/config/attr_accessors.rb +75 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/config/attr_inheritance.rb +90 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/config/attr_type_coercion.rb +74 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/config/attr_version_defaults.rb +93 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/config.rb +500 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/connection_state.rb +48 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/data_encoding.rb +214 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/data_lite.rb +226 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/deprecated_client_options.rb +142 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/errors.rb +118 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/esearch_result.rb +219 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/fetch_data.rb +597 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/flags.rb +262 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/response_data.rb +1113 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/response_parser/parser_utils.rb +245 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/response_parser.rb +2282 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/response_reader.rb +92 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/anonymous_authenticator.rb +69 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/authentication_exchange.rb +139 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/authenticators.rb +122 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/client_adapter.rb +123 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/cram_md5_authenticator.rb +61 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/digest_md5_authenticator.rb +342 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/external_authenticator.rb +83 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/gs2_header.rb +80 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/login_authenticator.rb +56 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/oauthbearer_authenticator.rb +199 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/plain_authenticator.rb +101 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/protocol_adapters.rb +101 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/scram_algorithm.rb +58 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/scram_authenticator.rb +361 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/stringprep.rb +12 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl/xoauth2_authenticator.rb +106 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl.rb +182 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sasl_adapter.rb +20 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/search_result.rb +145 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/sequence_set.rb +1952 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/stringprep/nameprep.rb +70 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/stringprep/saslprep.rb +69 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/stringprep/saslprep_tables.rb +96 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/stringprep/tables.rb +146 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/stringprep/trace.rb +85 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/stringprep.rb +159 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/uidplus_data.rb +244 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap/vanished_data.rb +65 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/lib/net/imap.rb +3968 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/rakelib/benchmarks.rake +91 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/rakelib/rdoc.rake +70 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/rakelib/rfcs.rake +170 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/rakelib/saslprep.rake +30 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/rakelib/string_prep_tables_generator.rb +449 -0
- package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/sample/net-imap.rb +167 -0
- package/lib/ruby/gems/3.4.0/gems/net-pop-0.1.2/Gemfile +7 -0
- package/lib/ruby/gems/3.4.0/gems/net-pop-0.1.2/LICENSE.txt +22 -0
- package/lib/ruby/gems/3.4.0/gems/net-pop-0.1.2/README.md +66 -0
- package/lib/ruby/gems/3.4.0/gems/net-pop-0.1.2/Rakefile +17 -0
- package/lib/ruby/gems/3.4.0/gems/net-pop-0.1.2/lib/net/pop.rb +1025 -0
- package/lib/ruby/gems/3.4.0/gems/net-smtp-0.5.1/LICENSE.txt +2 -0
- package/lib/ruby/gems/3.4.0/gems/net-smtp-0.5.1/NEWS.md +133 -0
- package/lib/ruby/gems/3.4.0/gems/net-smtp-0.5.1/README.md +97 -0
- package/lib/ruby/gems/3.4.0/gems/net-smtp-0.5.1/lib/net/smtp/auth_cram_md5.rb +48 -0
- package/lib/ruby/gems/3.4.0/gems/net-smtp-0.5.1/lib/net/smtp/auth_login.rb +11 -0
- package/lib/ruby/gems/3.4.0/gems/net-smtp-0.5.1/lib/net/smtp/auth_plain.rb +9 -0
- package/lib/ruby/gems/3.4.0/gems/net-smtp-0.5.1/lib/net/smtp/auth_xoauth2.rb +17 -0
- package/lib/ruby/gems/3.4.0/gems/net-smtp-0.5.1/lib/net/smtp/authenticator.rb +57 -0
- package/lib/ruby/gems/3.4.0/gems/net-smtp-0.5.1/lib/net/smtp.rb +1164 -0
- package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/Gemfile +9 -0
- package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/LICENSE.txt +22 -0
- package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/README.md +139 -0
- package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/Rakefile +10 -0
- package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/bin/console +14 -0
- package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/bin/setup +8 -0
- package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/lib/observer.rb +229 -0
- package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/BSDL +22 -0
- package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/COPYING +57 -0
- package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/Gemfile +19 -0
- package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/LEGAL +4 -0
- package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/README.md +98 -0
- package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/Rakefile +59 -0
- package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/lib/power_assert/colorize.rb +7 -0
- package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/lib/power_assert/configuration.rb +46 -0
- package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/lib/power_assert/context.rb +233 -0
- package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/lib/power_assert/enable_tracepoint_events.rb +62 -0
- package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/lib/power_assert/inspector.rb +66 -0
- package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/lib/power_assert/parser.rb +251 -0
- package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/lib/power_assert/version.rb +3 -0
- package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/lib/power_assert.rb +93 -0
- package/lib/ruby/gems/3.4.0/gems/prime-0.1.3/BSDL +22 -0
- package/lib/ruby/gems/3.4.0/gems/prime-0.1.3/COPYING +56 -0
- package/lib/ruby/gems/3.4.0/gems/prime-0.1.3/README.md +49 -0
- package/lib/ruby/gems/3.4.0/gems/prime-0.1.3/Rakefile +10 -0
- package/lib/ruby/gems/3.4.0/gems/prime-0.1.3/lib/prime.rb +561 -0
- package/lib/ruby/gems/3.4.0/gems/prime-0.1.3/sig/integer-extension.rbs +41 -0
- package/lib/ruby/gems/3.4.0/gems/prime-0.1.3/sig/manifest.yaml +2 -0
- package/lib/ruby/gems/3.4.0/gems/prime-0.1.3/sig/prime.rbs +372 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/History.rdoc +2403 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/MIT-LICENSE +21 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/README.rdoc +155 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/doc/command_line_usage.rdoc +158 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/doc/example/Rakefile1 +38 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/doc/example/Rakefile2 +35 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/doc/example/a.c +6 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/doc/example/b.c +6 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/doc/example/main.c +11 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/doc/glossary.rdoc +42 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/doc/jamis.rb +592 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/doc/proto_rake.rdoc +127 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/doc/rake.1 +156 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/doc/rakefile.rdoc +622 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/doc/rational.rdoc +151 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/exe/rake +27 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/application.rb +861 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/backtrace.rb +25 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/clean.rb +78 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/cloneable.rb +17 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/cpu_counter.rb +107 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/default_loader.rb +15 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/dsl_definition.rb +196 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/early_time.rb +22 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/ext/core.rb +26 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/ext/string.rb +176 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/file_creation_task.rb +25 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/file_list.rb +435 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/file_task.rb +58 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/file_utils.rb +132 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/file_utils_ext.rb +134 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/invocation_chain.rb +57 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/invocation_exception_mixin.rb +17 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/late_time.rb +18 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/linked_list.rb +112 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/loaders/makefile.rb +54 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/multi_task.rb +14 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/name_space.rb +38 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/packagetask.rb +222 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/phony.rb +16 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/private_reader.rb +21 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/promise.rb +100 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/pseudo_status.rb +30 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/rake_module.rb +67 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/rake_test_loader.rb +27 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/rule_recursion_overflow_error.rb +20 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/scope.rb +43 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/task.rb +434 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/task_argument_error.rb +8 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/task_arguments.rb +109 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/task_manager.rb +331 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/tasklib.rb +12 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/testtask.rb +189 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/thread_history_display.rb +49 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/thread_pool.rb +163 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/trace_output.rb +23 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/version.rb +10 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/win32.rb +51 -0
- package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake.rb +70 -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/repl_type_completor-0.1.9/Gemfile +27 -0
- package/lib/ruby/gems/3.4.0/gems/repl_type_completor-0.1.9/LICENSE.txt +21 -0
- package/lib/ruby/gems/3.4.0/gems/repl_type_completor-0.1.9/README.md +60 -0
- package/lib/ruby/gems/3.4.0/gems/repl_type_completor-0.1.9/Rakefile +37 -0
- package/lib/ruby/gems/3.4.0/gems/repl_type_completor-0.1.9/lib/repl_type_completor/methods.rb +11 -0
- package/lib/ruby/gems/3.4.0/gems/repl_type_completor-0.1.9/lib/repl_type_completor/require_paths.rb +80 -0
- package/lib/ruby/gems/3.4.0/gems/repl_type_completor-0.1.9/lib/repl_type_completor/result.rb +170 -0
- package/lib/ruby/gems/3.4.0/gems/repl_type_completor-0.1.9/lib/repl_type_completor/scope.rb +409 -0
- package/lib/ruby/gems/3.4.0/gems/repl_type_completor-0.1.9/lib/repl_type_completor/type_analyzer.rb +1190 -0
- package/lib/ruby/gems/3.4.0/gems/repl_type_completor-0.1.9/lib/repl_type_completor/types.rb +452 -0
- package/lib/ruby/gems/3.4.0/gems/repl_type_completor-0.1.9/lib/repl_type_completor/version.rb +5 -0
- package/lib/ruby/gems/3.4.0/gems/repl_type_completor-0.1.9/lib/repl_type_completor.rb +141 -0
- package/lib/ruby/gems/3.4.0/gems/repl_type_completor-0.1.9/sig/repl_type_completor.rbs +19 -0
- package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/Gemfile +4 -0
- package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/LICENSE.txt +22 -0
- package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/README.md +30 -0
- package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/Rakefile +1 -0
- package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/bin/console +14 -0
- package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/bin/setup +8 -0
- package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/lib/resolv-replace.rb +76 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/LICENSE.txt +22 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/NEWS.md +843 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/README.md +57 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/doc/rexml/context.rdoc +143 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/child.rdoc +87 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/document.rdoc +276 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/element.rdoc +602 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/node.rdoc +97 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/parent.rdoc +267 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/child_toc.rdoc +12 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/document_toc.rdoc +30 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/element_toc.rdoc +55 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/master_toc.rdoc +135 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/node_toc.rdoc +16 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/parent_toc.rdoc +25 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/doc/rexml/tutorial.rdoc +1358 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/attlistdecl.rb +63 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/attribute.rb +210 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/cdata.rb +68 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/child.rb +96 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/comment.rb +80 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/doctype.rb +306 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/document.rb +471 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/dtd/attlistdecl.rb +11 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/dtd/dtd.rb +47 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/dtd/elementdecl.rb +18 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/dtd/entitydecl.rb +57 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/dtd/notationdecl.rb +40 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/element.rb +2578 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/encoding.rb +48 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/entity.rb +142 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/formatters/default.rb +116 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/formatters/pretty.rb +142 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/formatters/transitive.rb +58 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/functions.rb +446 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/instruction.rb +79 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/light/node.rb +188 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/namespace.rb +63 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/node.rb +80 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/output.rb +30 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/parent.rb +166 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/parseexception.rb +53 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/parsers/baseparser.rb +949 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/parsers/lightparser.rb +59 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/parsers/pullparser.rb +213 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/parsers/sax2parser.rb +270 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/parsers/streamparser.rb +67 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/parsers/treeparser.rb +89 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/parsers/ultralightparser.rb +57 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/parsers/xpathparser.rb +739 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/quickpath.rb +267 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/rexml.rb +39 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/sax2listener.rb +98 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/security.rb +28 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/source.rb +388 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/streamlistener.rb +93 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/text.rb +420 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/undefinednamespaceexception.rb +9 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/validation/relaxng.rb +540 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/validation/validation.rb +144 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/validation/validationexception.rb +10 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/xmldecl.rb +130 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/xmltokens.rb +85 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/xpath.rb +70 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml/xpath_parser.rb +980 -0
- package/lib/ruby/gems/3.4.0/gems/rexml-3.4.4/lib/rexml.rb +3 -0
- package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/Gemfile +6 -0
- package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/LICENSE.txt +22 -0
- package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/README.md +32 -0
- package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/Rakefile +9 -0
- package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/bin/console +14 -0
- package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/bin/setup +8 -0
- package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/lib/rinda/rinda.rb +329 -0
- package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/lib/rinda/ring.rb +484 -0
- package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/lib/rinda/tuplespace.rb +641 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/LICENSE.txt +22 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/NEWS.md +87 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/README.md +88 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/0.9.rb +462 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/1.0.rb +485 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/2.0.rb +143 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/atom.rb +1025 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/content/1.0.rb +10 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/content/2.0.rb +12 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/content.rb +34 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/converter.rb +171 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/dublincore/1.0.rb +13 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/dublincore/2.0.rb +13 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/dublincore/atom.rb +17 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/dublincore.rb +164 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/image.rb +198 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/itunes.rb +482 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker/0.9.rb +509 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker/1.0.rb +436 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker/2.0.rb +224 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker/atom.rb +173 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker/base.rb +945 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker/content.rb +22 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker/dublincore.rb +122 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker/entry.rb +164 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker/feed.rb +427 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker/image.rb +112 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker/itunes.rb +258 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker/slash.rb +34 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker/syndication.rb +19 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker/taxonomy.rb +119 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker/trackback.rb +62 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/maker.rb +79 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/parser.rb +589 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/rexmlparser.rb +50 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/rss.rb +1370 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/slash.rb +52 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/syndication.rb +69 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/taxonomy.rb +148 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/trackback.rb +291 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/utils.rb +182 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/version.rb +4 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/xml-stylesheet.rb +105 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/xml.rb +73 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/xmlparser.rb +95 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss/xmlscanner.rb +122 -0
- package/lib/ruby/gems/3.4.0/gems/rss-0.3.1/lib/rss.rb +94 -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/gems/test-unit-3.6.7/BSDL +24 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/COPYING +64 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/PSFL +271 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/README.md +108 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/Rakefile +74 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/doc/text/getting-started.md +246 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/doc/text/how-to.md +90 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/doc/text/news.md +1853 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/assertion-failed-error.rb +60 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/assertions.rb +2541 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/attribute-matcher.rb +26 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/attribute.rb +228 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/auto-runner-loader.rb +17 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/autorunner.rb +629 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/code-snippet-fetcher.rb +58 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/collector/descendant.rb +20 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/collector/dir.rb +110 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/collector/load.rb +201 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/collector/objectspace.rb +35 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/collector/xml.rb +249 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/collector.rb +104 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/color-scheme.rb +225 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/color.rb +134 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/data-sets.rb +127 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/data.rb +371 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/diff.rb +745 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/error.rb +158 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/exception-handler.rb +82 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/failure.rb +169 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/fault-location-detector.rb +104 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/fixture.rb +304 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/notification.rb +138 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/omission.rb +198 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/pending.rb +155 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/priority.rb +194 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/runner/console.rb +86 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/runner/emacs.rb +8 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/runner/xml.rb +15 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/sub-test-result.rb +59 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-creator.rb +103 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-runner.rb +128 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/test-suite-thread-runner.rb +69 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/testcase.rb +963 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/testresult.rb +132 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/testsuite.rb +108 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/ui/console/outputlevel.rb +15 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/ui/console/testrunner.rb +891 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/ui/emacs/testrunner.rb +49 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/ui/testrunner.rb +53 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/ui/testrunnermediator.rb +119 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/ui/testrunnerutilities.rb +41 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/ui/xml/testrunner.rb +224 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/util/backtracefilter.rb +59 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/util/memory-usage.rb +47 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/util/method-owner-finder.rb +28 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/util/observable.rb +86 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/util/output.rb +32 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/util/procwrapper.rb +48 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/version.rb +5 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit/warning.rb +3 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test/unit.rb +521 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/lib/test-unit.rb +19 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/sample/adder.rb +13 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/sample/subtracter.rb +12 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/sample/test_adder.rb +20 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/sample/test_subtracter.rb +20 -0
- package/lib/ruby/gems/3.4.0/gems/test-unit-3.6.7/sample/test_user.rb +23 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/LICENSE +21 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/README.md +25 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/bin/typeprof +5 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/doc/doc.ja.md +134 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/doc/doc.md +136 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/cli/cli.rb +178 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/cli.rb +5 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/code_range.rb +112 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/ast/base.rb +263 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/ast/call.rb +259 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/ast/const.rb +126 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/ast/control.rb +433 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/ast/meta.rb +150 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/ast/method.rb +339 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/ast/misc.rb +263 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/ast/module.rb +123 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/ast/pattern.rb +140 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/ast/sig_decl.rb +471 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/ast/sig_type.rb +663 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/ast/value.rb +319 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/ast/variable.rb +315 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/ast.rb +472 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/builtin.rb +146 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/env/method.rb +137 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/env/method_entity.rb +55 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/env/module_entity.rb +408 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/env/static_read.rb +155 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/env/type_alias_entity.rb +27 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/env/value_entity.rb +32 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/env.rb +366 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/graph/box.rb +998 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/graph/change_set.rb +224 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/graph/filter.rb +155 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/graph/vertex.rb +225 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/service.rb +514 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/type.rb +352 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core/util.rb +81 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/core.rb +31 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/diagnostic.rb +35 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/lsp/messages.rb +415 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/lsp/server.rb +203 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/lsp/text.rb +69 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/lsp/util.rb +51 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/lsp.rb +7 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/version.rb +3 -0
- package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof.rb +6 -0
- package/lib/ruby/gems/3.4.0/specifications/abbrev-0.1.2.gemspec +23 -0
- package/lib/ruby/gems/3.4.0/specifications/base64-0.2.0.gemspec +23 -0
- package/lib/ruby/gems/3.4.0/specifications/csv-3.3.2.gemspec +24 -0
- 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 +22 -0
- package/lib/ruby/gems/3.4.0/specifications/getoptlong-0.2.1.gemspec +21 -0
- package/lib/ruby/gems/3.4.0/specifications/matrix-0.4.2.gemspec +22 -0
- package/lib/ruby/gems/3.4.0/specifications/minitest-5.25.4.gemspec +31 -0
- package/lib/ruby/gems/3.4.0/specifications/mutex_m-0.3.0.gemspec +22 -0
- package/lib/ruby/gems/3.4.0/specifications/net-ftp-0.3.8.gemspec +27 -0
- package/lib/ruby/gems/3.4.0/specifications/net-imap-0.5.15.gemspec +28 -0
- package/lib/ruby/gems/3.4.0/specifications/net-pop-0.1.2.gemspec +26 -0
- package/lib/ruby/gems/3.4.0/specifications/net-smtp-0.5.1.gemspec +26 -0
- package/lib/ruby/gems/3.4.0/specifications/observer-0.1.2.gemspec +22 -0
- package/lib/ruby/gems/3.4.0/specifications/power_assert-2.0.5.gemspec +24 -0
- package/lib/ruby/gems/3.4.0/specifications/prime-0.1.3.gemspec +27 -0
- package/lib/ruby/gems/3.4.0/specifications/rake-13.2.1.gemspec +26 -0
- package/lib/ruby/gems/3.4.0/specifications/repl_type_completor-0.1.9.gemspec +28 -0
- package/lib/ruby/gems/3.4.0/specifications/resolv-replace-0.1.1.gemspec +26 -0
- package/lib/ruby/gems/3.4.0/specifications/rexml-3.4.4.gemspec +25 -0
- package/lib/ruby/gems/3.4.0/specifications/rinda-0.2.0.gemspec +29 -0
- package/lib/ruby/gems/3.4.0/specifications/rss-0.3.1.gemspec +24 -0
- package/lib/ruby/gems/3.4.0/specifications/test-unit-3.6.7.gemspec +25 -0
- package/lib/ruby/gems/3.4.0/specifications/typeprof-0.30.1.gemspec +28 -0
- package/package.json +47 -4
- package/lib/ruby/3.4.11/wasm32-wasi/rbconfig.rb +0 -366
|
@@ -0,0 +1,2234 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# :markup: markdown
|
|
3
|
+
|
|
4
|
+
module Prism
|
|
5
|
+
module Translation
|
|
6
|
+
class Parser
|
|
7
|
+
# A visitor that knows how to convert a prism syntax tree into the
|
|
8
|
+
# whitequark/parser gem's syntax tree.
|
|
9
|
+
class Compiler < ::Prism::Compiler
|
|
10
|
+
# Raised when the tree is malformed or there is a bug in the compiler.
|
|
11
|
+
class CompilationError < StandardError
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The Parser::Base instance that is being used to build the AST.
|
|
15
|
+
attr_reader :parser
|
|
16
|
+
|
|
17
|
+
# The Parser::Builders::Default instance that is being used to build the
|
|
18
|
+
# AST.
|
|
19
|
+
attr_reader :builder
|
|
20
|
+
|
|
21
|
+
# The Parser::Source::Buffer instance that is holding a reference to the
|
|
22
|
+
# source code.
|
|
23
|
+
attr_reader :source_buffer
|
|
24
|
+
|
|
25
|
+
# The offset cache that is used to map between byte and character
|
|
26
|
+
# offsets in the file.
|
|
27
|
+
attr_reader :offset_cache
|
|
28
|
+
|
|
29
|
+
# The types of values that can be forwarded in the current scope.
|
|
30
|
+
attr_reader :forwarding
|
|
31
|
+
|
|
32
|
+
# Whether or not the current node is in a destructure.
|
|
33
|
+
attr_reader :in_destructure
|
|
34
|
+
|
|
35
|
+
# Whether or not the current node is in a pattern.
|
|
36
|
+
attr_reader :in_pattern
|
|
37
|
+
|
|
38
|
+
# Initialize a new compiler with the given parser, offset cache, and
|
|
39
|
+
# options.
|
|
40
|
+
def initialize(parser, offset_cache, forwarding: [], in_destructure: false, in_pattern: false)
|
|
41
|
+
@parser = parser
|
|
42
|
+
@builder = parser.builder
|
|
43
|
+
@source_buffer = parser.source_buffer
|
|
44
|
+
@offset_cache = offset_cache
|
|
45
|
+
|
|
46
|
+
@forwarding = forwarding
|
|
47
|
+
@in_destructure = in_destructure
|
|
48
|
+
@in_pattern = in_pattern
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# alias foo bar
|
|
52
|
+
# ^^^^^^^^^^^^^
|
|
53
|
+
def visit_alias_method_node(node)
|
|
54
|
+
builder.alias(token(node.keyword_loc), visit(node.new_name), visit(node.old_name))
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# alias $foo $bar
|
|
58
|
+
# ^^^^^^^^^^^^^^^
|
|
59
|
+
def visit_alias_global_variable_node(node)
|
|
60
|
+
builder.alias(token(node.keyword_loc), visit(node.new_name), visit(node.old_name))
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# foo => bar | baz
|
|
64
|
+
# ^^^^^^^^^
|
|
65
|
+
def visit_alternation_pattern_node(node)
|
|
66
|
+
builder.match_alt(visit(node.left), token(node.operator_loc), visit(node.right))
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# a and b
|
|
70
|
+
# ^^^^^^^
|
|
71
|
+
def visit_and_node(node)
|
|
72
|
+
builder.logical_op(:and, visit(node.left), token(node.operator_loc), visit(node.right))
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# []
|
|
76
|
+
# ^^
|
|
77
|
+
def visit_array_node(node)
|
|
78
|
+
if node.opening&.start_with?("%w", "%W", "%i", "%I")
|
|
79
|
+
elements = node.elements.flat_map do |element|
|
|
80
|
+
if element.is_a?(StringNode)
|
|
81
|
+
if element.content.include?("\n")
|
|
82
|
+
string_nodes_from_line_continuations(element.unescaped, element.content, element.content_loc.start_offset, node.opening)
|
|
83
|
+
else
|
|
84
|
+
[builder.string_internal([element.unescaped, srange(element.content_loc)])]
|
|
85
|
+
end
|
|
86
|
+
elsif element.is_a?(InterpolatedStringNode)
|
|
87
|
+
builder.string_compose(
|
|
88
|
+
token(element.opening_loc),
|
|
89
|
+
string_nodes_from_interpolation(element, node.opening),
|
|
90
|
+
token(element.closing_loc)
|
|
91
|
+
)
|
|
92
|
+
else
|
|
93
|
+
[visit(element)]
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
else
|
|
97
|
+
elements = visit_all(node.elements)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
builder.array(token(node.opening_loc), elements, token(node.closing_loc))
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# foo => [bar]
|
|
104
|
+
# ^^^^^
|
|
105
|
+
def visit_array_pattern_node(node)
|
|
106
|
+
elements = [*node.requireds]
|
|
107
|
+
elements << node.rest if !node.rest.nil? && !node.rest.is_a?(ImplicitRestNode)
|
|
108
|
+
elements.concat(node.posts)
|
|
109
|
+
visited = visit_all(elements)
|
|
110
|
+
|
|
111
|
+
if node.rest.is_a?(ImplicitRestNode)
|
|
112
|
+
visited[-1] = builder.match_with_trailing_comma(visited[-1], token(node.rest.location))
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if node.constant
|
|
116
|
+
if visited.empty?
|
|
117
|
+
builder.const_pattern(visit(node.constant), token(node.opening_loc), builder.array_pattern(token(node.opening_loc), visited, token(node.closing_loc)), token(node.closing_loc))
|
|
118
|
+
else
|
|
119
|
+
builder.const_pattern(visit(node.constant), token(node.opening_loc), builder.array_pattern(nil, visited, nil), token(node.closing_loc))
|
|
120
|
+
end
|
|
121
|
+
else
|
|
122
|
+
builder.array_pattern(token(node.opening_loc), visited, token(node.closing_loc))
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# foo(bar)
|
|
127
|
+
# ^^^
|
|
128
|
+
def visit_arguments_node(node)
|
|
129
|
+
visit_all(node.arguments)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# { a: 1 }
|
|
133
|
+
# ^^^^
|
|
134
|
+
def visit_assoc_node(node)
|
|
135
|
+
key = node.key
|
|
136
|
+
|
|
137
|
+
if node.value.is_a?(ImplicitNode)
|
|
138
|
+
if in_pattern
|
|
139
|
+
if key.is_a?(SymbolNode)
|
|
140
|
+
if key.opening.nil?
|
|
141
|
+
builder.match_hash_var([key.unescaped, srange(key.location)])
|
|
142
|
+
else
|
|
143
|
+
builder.match_hash_var_from_str(token(key.opening_loc), [builder.string_internal([key.unescaped, srange(key.value_loc)])], token(key.closing_loc))
|
|
144
|
+
end
|
|
145
|
+
else
|
|
146
|
+
builder.match_hash_var_from_str(token(key.opening_loc), visit_all(key.parts), token(key.closing_loc))
|
|
147
|
+
end
|
|
148
|
+
else
|
|
149
|
+
value = node.value.value
|
|
150
|
+
|
|
151
|
+
implicit_value = if value.is_a?(CallNode)
|
|
152
|
+
builder.call_method(nil, nil, [value.name, srange(value.message_loc)])
|
|
153
|
+
elsif value.is_a?(ConstantReadNode)
|
|
154
|
+
builder.const([value.name, srange(key.value_loc)])
|
|
155
|
+
else
|
|
156
|
+
builder.ident([value.name, srange(key.value_loc)]).updated(:lvar)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
builder.pair_keyword([key.unescaped, srange(key)], implicit_value)
|
|
160
|
+
end
|
|
161
|
+
elsif node.operator_loc
|
|
162
|
+
builder.pair(visit(key), token(node.operator_loc), visit(node.value))
|
|
163
|
+
elsif key.is_a?(SymbolNode) && key.opening_loc.nil?
|
|
164
|
+
builder.pair_keyword([key.unescaped, srange(key.location)], visit(node.value))
|
|
165
|
+
else
|
|
166
|
+
parts =
|
|
167
|
+
if key.is_a?(SymbolNode)
|
|
168
|
+
[builder.string_internal([key.unescaped, srange(key.value_loc)])]
|
|
169
|
+
else
|
|
170
|
+
visit_all(key.parts)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
builder.pair_quoted(token(key.opening_loc), parts, token(key.closing_loc), visit(node.value))
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# def foo(**); bar(**); end
|
|
178
|
+
# ^^
|
|
179
|
+
#
|
|
180
|
+
# { **foo }
|
|
181
|
+
# ^^^^^
|
|
182
|
+
def visit_assoc_splat_node(node)
|
|
183
|
+
if in_pattern
|
|
184
|
+
builder.match_rest(token(node.operator_loc), token(node.value&.location))
|
|
185
|
+
elsif node.value.nil? && forwarding.include?(:**)
|
|
186
|
+
builder.forwarded_kwrestarg(token(node.operator_loc))
|
|
187
|
+
else
|
|
188
|
+
builder.kwsplat(token(node.operator_loc), visit(node.value))
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# $+
|
|
193
|
+
# ^^
|
|
194
|
+
def visit_back_reference_read_node(node)
|
|
195
|
+
builder.back_ref(token(node.location))
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# begin end
|
|
199
|
+
# ^^^^^^^^^
|
|
200
|
+
def visit_begin_node(node)
|
|
201
|
+
rescue_bodies = []
|
|
202
|
+
|
|
203
|
+
if (rescue_clause = node.rescue_clause)
|
|
204
|
+
begin
|
|
205
|
+
find_start_offset = (rescue_clause.reference&.location || rescue_clause.exceptions.last&.location || rescue_clause.keyword_loc).end_offset
|
|
206
|
+
find_end_offset = (
|
|
207
|
+
rescue_clause.statements&.location&.start_offset ||
|
|
208
|
+
rescue_clause.subsequent&.location&.start_offset ||
|
|
209
|
+
node.else_clause&.location&.start_offset ||
|
|
210
|
+
node.ensure_clause&.location&.start_offset ||
|
|
211
|
+
node.end_keyword_loc&.start_offset ||
|
|
212
|
+
find_start_offset + 1
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
rescue_bodies << builder.rescue_body(
|
|
216
|
+
token(rescue_clause.keyword_loc),
|
|
217
|
+
rescue_clause.exceptions.any? ? builder.array(nil, visit_all(rescue_clause.exceptions), nil) : nil,
|
|
218
|
+
token(rescue_clause.operator_loc),
|
|
219
|
+
visit(rescue_clause.reference),
|
|
220
|
+
srange_find(find_start_offset, find_end_offset, ";"),
|
|
221
|
+
visit(rescue_clause.statements)
|
|
222
|
+
)
|
|
223
|
+
end until (rescue_clause = rescue_clause.subsequent).nil?
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
begin_body =
|
|
227
|
+
builder.begin_body(
|
|
228
|
+
visit(node.statements),
|
|
229
|
+
rescue_bodies,
|
|
230
|
+
token(node.else_clause&.else_keyword_loc),
|
|
231
|
+
visit(node.else_clause),
|
|
232
|
+
token(node.ensure_clause&.ensure_keyword_loc),
|
|
233
|
+
visit(node.ensure_clause&.statements)
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
if node.begin_keyword_loc
|
|
237
|
+
builder.begin_keyword(token(node.begin_keyword_loc), begin_body, token(node.end_keyword_loc))
|
|
238
|
+
else
|
|
239
|
+
begin_body
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# foo(&bar)
|
|
244
|
+
# ^^^^
|
|
245
|
+
def visit_block_argument_node(node)
|
|
246
|
+
builder.block_pass(token(node.operator_loc), visit(node.expression))
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# foo { |; bar| }
|
|
250
|
+
# ^^^
|
|
251
|
+
def visit_block_local_variable_node(node)
|
|
252
|
+
builder.shadowarg(token(node.location))
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# A block on a keyword or method call.
|
|
256
|
+
def visit_block_node(node)
|
|
257
|
+
raise CompilationError, "Cannot directly compile block nodes"
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# def foo(&bar); end
|
|
261
|
+
# ^^^^
|
|
262
|
+
def visit_block_parameter_node(node)
|
|
263
|
+
builder.blockarg(token(node.operator_loc), token(node.name_loc))
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# A block's parameters.
|
|
267
|
+
def visit_block_parameters_node(node)
|
|
268
|
+
[*visit(node.parameters)].concat(visit_all(node.locals))
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# break
|
|
272
|
+
# ^^^^^
|
|
273
|
+
#
|
|
274
|
+
# break foo
|
|
275
|
+
# ^^^^^^^^^
|
|
276
|
+
def visit_break_node(node)
|
|
277
|
+
builder.keyword_cmd(:break, token(node.keyword_loc), nil, visit(node.arguments) || [], nil)
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# foo
|
|
281
|
+
# ^^^
|
|
282
|
+
#
|
|
283
|
+
# foo.bar
|
|
284
|
+
# ^^^^^^^
|
|
285
|
+
#
|
|
286
|
+
# foo.bar() {}
|
|
287
|
+
# ^^^^^^^^^^^^
|
|
288
|
+
def visit_call_node(node)
|
|
289
|
+
name = node.name
|
|
290
|
+
arguments = node.arguments&.arguments || []
|
|
291
|
+
block = node.block
|
|
292
|
+
|
|
293
|
+
if block.is_a?(BlockArgumentNode)
|
|
294
|
+
arguments = [*arguments, block]
|
|
295
|
+
block = nil
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
if node.call_operator_loc.nil?
|
|
299
|
+
case name
|
|
300
|
+
when :-@
|
|
301
|
+
case (receiver = node.receiver).type
|
|
302
|
+
when :integer_node, :float_node, :rational_node, :imaginary_node
|
|
303
|
+
return visit(numeric_negate(node.message_loc, receiver))
|
|
304
|
+
end
|
|
305
|
+
when :!
|
|
306
|
+
return visit_block(builder.not_op(token(node.message_loc), token(node.opening_loc), visit(node.receiver), token(node.closing_loc)), block)
|
|
307
|
+
when :=~
|
|
308
|
+
if (receiver = node.receiver).is_a?(RegularExpressionNode)
|
|
309
|
+
return builder.match_op(visit(receiver), token(node.message_loc), visit(node.arguments.arguments.first))
|
|
310
|
+
end
|
|
311
|
+
when :[]
|
|
312
|
+
return visit_block(builder.index(visit(node.receiver), token(node.opening_loc), visit_all(arguments), token(node.closing_loc)), block)
|
|
313
|
+
when :[]=
|
|
314
|
+
if node.message != "[]=" && node.arguments && block.nil? && !node.safe_navigation?
|
|
315
|
+
arguments = node.arguments.arguments[...-1]
|
|
316
|
+
arguments << node.block if node.block
|
|
317
|
+
|
|
318
|
+
return visit_block(
|
|
319
|
+
builder.assign(
|
|
320
|
+
builder.index_asgn(
|
|
321
|
+
visit(node.receiver),
|
|
322
|
+
token(node.opening_loc),
|
|
323
|
+
visit_all(arguments),
|
|
324
|
+
token(node.closing_loc),
|
|
325
|
+
),
|
|
326
|
+
srange_find(node.message_loc.end_offset, node.arguments.arguments.last.location.start_offset, "="),
|
|
327
|
+
visit(node.arguments.arguments.last)
|
|
328
|
+
),
|
|
329
|
+
block
|
|
330
|
+
)
|
|
331
|
+
end
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
message_loc = node.message_loc
|
|
336
|
+
call_operator_loc = node.call_operator_loc
|
|
337
|
+
call_operator = [{ "." => :dot, "&." => :anddot, "::" => "::" }.fetch(call_operator_loc.slice), srange(call_operator_loc)] if call_operator_loc
|
|
338
|
+
|
|
339
|
+
visit_block(
|
|
340
|
+
if name.end_with?("=") && !message_loc.slice.end_with?("=") && node.arguments && block.nil?
|
|
341
|
+
builder.assign(
|
|
342
|
+
builder.attr_asgn(visit(node.receiver), call_operator, token(message_loc)),
|
|
343
|
+
srange_find(message_loc.end_offset, node.arguments.location.start_offset, "="),
|
|
344
|
+
visit(node.arguments.arguments.last)
|
|
345
|
+
)
|
|
346
|
+
else
|
|
347
|
+
builder.call_method(
|
|
348
|
+
visit(node.receiver),
|
|
349
|
+
call_operator,
|
|
350
|
+
message_loc ? [node.name, srange(message_loc)] : nil,
|
|
351
|
+
token(node.opening_loc),
|
|
352
|
+
visit_all(arguments),
|
|
353
|
+
token(node.closing_loc)
|
|
354
|
+
)
|
|
355
|
+
end,
|
|
356
|
+
block
|
|
357
|
+
)
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# foo.bar += baz
|
|
361
|
+
# ^^^^^^^^^^^^^^^
|
|
362
|
+
def visit_call_operator_write_node(node)
|
|
363
|
+
call_operator_loc = node.call_operator_loc
|
|
364
|
+
|
|
365
|
+
builder.op_assign(
|
|
366
|
+
builder.call_method(
|
|
367
|
+
visit(node.receiver),
|
|
368
|
+
call_operator_loc.nil? ? nil : [{ "." => :dot, "&." => :anddot, "::" => "::" }.fetch(call_operator_loc.slice), srange(call_operator_loc)],
|
|
369
|
+
node.message_loc ? [node.read_name, srange(node.message_loc)] : nil,
|
|
370
|
+
nil,
|
|
371
|
+
[],
|
|
372
|
+
nil
|
|
373
|
+
),
|
|
374
|
+
[node.binary_operator_loc.slice.chomp("="), srange(node.binary_operator_loc)],
|
|
375
|
+
visit(node.value)
|
|
376
|
+
)
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
# foo.bar &&= baz
|
|
380
|
+
# ^^^^^^^^^^^^^^^
|
|
381
|
+
def visit_call_and_write_node(node)
|
|
382
|
+
call_operator_loc = node.call_operator_loc
|
|
383
|
+
|
|
384
|
+
builder.op_assign(
|
|
385
|
+
builder.call_method(
|
|
386
|
+
visit(node.receiver),
|
|
387
|
+
call_operator_loc.nil? ? nil : [{ "." => :dot, "&." => :anddot, "::" => "::" }.fetch(call_operator_loc.slice), srange(call_operator_loc)],
|
|
388
|
+
node.message_loc ? [node.read_name, srange(node.message_loc)] : nil,
|
|
389
|
+
nil,
|
|
390
|
+
[],
|
|
391
|
+
nil
|
|
392
|
+
),
|
|
393
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
394
|
+
visit(node.value)
|
|
395
|
+
)
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
# foo.bar ||= baz
|
|
399
|
+
# ^^^^^^^^^^^^^^^
|
|
400
|
+
def visit_call_or_write_node(node)
|
|
401
|
+
call_operator_loc = node.call_operator_loc
|
|
402
|
+
|
|
403
|
+
builder.op_assign(
|
|
404
|
+
builder.call_method(
|
|
405
|
+
visit(node.receiver),
|
|
406
|
+
call_operator_loc.nil? ? nil : [{ "." => :dot, "&." => :anddot, "::" => "::" }.fetch(call_operator_loc.slice), srange(call_operator_loc)],
|
|
407
|
+
node.message_loc ? [node.read_name, srange(node.message_loc)] : nil,
|
|
408
|
+
nil,
|
|
409
|
+
[],
|
|
410
|
+
nil
|
|
411
|
+
),
|
|
412
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
413
|
+
visit(node.value)
|
|
414
|
+
)
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
# foo.bar, = 1
|
|
418
|
+
# ^^^^^^^
|
|
419
|
+
def visit_call_target_node(node)
|
|
420
|
+
call_operator_loc = node.call_operator_loc
|
|
421
|
+
|
|
422
|
+
builder.attr_asgn(
|
|
423
|
+
visit(node.receiver),
|
|
424
|
+
call_operator_loc.nil? ? nil : [{ "." => :dot, "&." => :anddot, "::" => "::" }.fetch(call_operator_loc.slice), srange(call_operator_loc)],
|
|
425
|
+
token(node.message_loc)
|
|
426
|
+
)
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
# foo => bar => baz
|
|
430
|
+
# ^^^^^^^^^^
|
|
431
|
+
def visit_capture_pattern_node(node)
|
|
432
|
+
builder.match_as(visit(node.value), token(node.operator_loc), visit(node.target))
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
# case foo; when bar; end
|
|
436
|
+
# ^^^^^^^^^^^^^^^^^^^^^^^
|
|
437
|
+
def visit_case_node(node)
|
|
438
|
+
builder.case(
|
|
439
|
+
token(node.case_keyword_loc),
|
|
440
|
+
visit(node.predicate),
|
|
441
|
+
visit_all(node.conditions),
|
|
442
|
+
token(node.else_clause&.else_keyword_loc),
|
|
443
|
+
visit(node.else_clause),
|
|
444
|
+
token(node.end_keyword_loc)
|
|
445
|
+
)
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
# case foo; in bar; end
|
|
449
|
+
# ^^^^^^^^^^^^^^^^^^^^^
|
|
450
|
+
def visit_case_match_node(node)
|
|
451
|
+
builder.case_match(
|
|
452
|
+
token(node.case_keyword_loc),
|
|
453
|
+
visit(node.predicate),
|
|
454
|
+
visit_all(node.conditions),
|
|
455
|
+
token(node.else_clause&.else_keyword_loc),
|
|
456
|
+
visit(node.else_clause),
|
|
457
|
+
token(node.end_keyword_loc)
|
|
458
|
+
)
|
|
459
|
+
end
|
|
460
|
+
|
|
461
|
+
# class Foo; end
|
|
462
|
+
# ^^^^^^^^^^^^^^
|
|
463
|
+
def visit_class_node(node)
|
|
464
|
+
builder.def_class(
|
|
465
|
+
token(node.class_keyword_loc),
|
|
466
|
+
visit(node.constant_path),
|
|
467
|
+
token(node.inheritance_operator_loc),
|
|
468
|
+
visit(node.superclass),
|
|
469
|
+
node.body&.accept(copy_compiler(forwarding: [])),
|
|
470
|
+
token(node.end_keyword_loc)
|
|
471
|
+
)
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
# @@foo
|
|
475
|
+
# ^^^^^
|
|
476
|
+
def visit_class_variable_read_node(node)
|
|
477
|
+
builder.cvar(token(node.location))
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
# @@foo = 1
|
|
481
|
+
# ^^^^^^^^^
|
|
482
|
+
def visit_class_variable_write_node(node)
|
|
483
|
+
builder.assign(
|
|
484
|
+
builder.assignable(builder.cvar(token(node.name_loc))),
|
|
485
|
+
token(node.operator_loc),
|
|
486
|
+
visit(node.value)
|
|
487
|
+
)
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
# @@foo += bar
|
|
491
|
+
# ^^^^^^^^^^^^
|
|
492
|
+
def visit_class_variable_operator_write_node(node)
|
|
493
|
+
builder.op_assign(
|
|
494
|
+
builder.assignable(builder.cvar(token(node.name_loc))),
|
|
495
|
+
[node.binary_operator_loc.slice.chomp("="), srange(node.binary_operator_loc)],
|
|
496
|
+
visit(node.value)
|
|
497
|
+
)
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
# @@foo &&= bar
|
|
501
|
+
# ^^^^^^^^^^^^^
|
|
502
|
+
def visit_class_variable_and_write_node(node)
|
|
503
|
+
builder.op_assign(
|
|
504
|
+
builder.assignable(builder.cvar(token(node.name_loc))),
|
|
505
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
506
|
+
visit(node.value)
|
|
507
|
+
)
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
# @@foo ||= bar
|
|
511
|
+
# ^^^^^^^^^^^^^
|
|
512
|
+
def visit_class_variable_or_write_node(node)
|
|
513
|
+
builder.op_assign(
|
|
514
|
+
builder.assignable(builder.cvar(token(node.name_loc))),
|
|
515
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
516
|
+
visit(node.value)
|
|
517
|
+
)
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
# @@foo, = bar
|
|
521
|
+
# ^^^^^
|
|
522
|
+
def visit_class_variable_target_node(node)
|
|
523
|
+
builder.assignable(builder.cvar(token(node.location)))
|
|
524
|
+
end
|
|
525
|
+
|
|
526
|
+
# Foo
|
|
527
|
+
# ^^^
|
|
528
|
+
def visit_constant_read_node(node)
|
|
529
|
+
builder.const([node.name, srange(node.location)])
|
|
530
|
+
end
|
|
531
|
+
|
|
532
|
+
# Foo = 1
|
|
533
|
+
# ^^^^^^^
|
|
534
|
+
#
|
|
535
|
+
# Foo, Bar = 1
|
|
536
|
+
# ^^^ ^^^
|
|
537
|
+
def visit_constant_write_node(node)
|
|
538
|
+
builder.assign(builder.assignable(builder.const([node.name, srange(node.name_loc)])), token(node.operator_loc), visit(node.value))
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
# Foo += bar
|
|
542
|
+
# ^^^^^^^^^^^
|
|
543
|
+
def visit_constant_operator_write_node(node)
|
|
544
|
+
builder.op_assign(
|
|
545
|
+
builder.assignable(builder.const([node.name, srange(node.name_loc)])),
|
|
546
|
+
[node.binary_operator_loc.slice.chomp("="), srange(node.binary_operator_loc)],
|
|
547
|
+
visit(node.value)
|
|
548
|
+
)
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
# Foo &&= bar
|
|
552
|
+
# ^^^^^^^^^^^^
|
|
553
|
+
def visit_constant_and_write_node(node)
|
|
554
|
+
builder.op_assign(
|
|
555
|
+
builder.assignable(builder.const([node.name, srange(node.name_loc)])),
|
|
556
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
557
|
+
visit(node.value)
|
|
558
|
+
)
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
# Foo ||= bar
|
|
562
|
+
# ^^^^^^^^^^^^
|
|
563
|
+
def visit_constant_or_write_node(node)
|
|
564
|
+
builder.op_assign(
|
|
565
|
+
builder.assignable(builder.const([node.name, srange(node.name_loc)])),
|
|
566
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
567
|
+
visit(node.value)
|
|
568
|
+
)
|
|
569
|
+
end
|
|
570
|
+
|
|
571
|
+
# Foo, = bar
|
|
572
|
+
# ^^^
|
|
573
|
+
def visit_constant_target_node(node)
|
|
574
|
+
builder.assignable(builder.const([node.name, srange(node.location)]))
|
|
575
|
+
end
|
|
576
|
+
|
|
577
|
+
# Foo::Bar
|
|
578
|
+
# ^^^^^^^^
|
|
579
|
+
def visit_constant_path_node(node)
|
|
580
|
+
if node.parent.nil?
|
|
581
|
+
builder.const_global(
|
|
582
|
+
token(node.delimiter_loc),
|
|
583
|
+
[node.name, srange(node.name_loc)]
|
|
584
|
+
)
|
|
585
|
+
else
|
|
586
|
+
builder.const_fetch(
|
|
587
|
+
visit(node.parent),
|
|
588
|
+
token(node.delimiter_loc),
|
|
589
|
+
[node.name, srange(node.name_loc)]
|
|
590
|
+
)
|
|
591
|
+
end
|
|
592
|
+
end
|
|
593
|
+
|
|
594
|
+
# Foo::Bar = 1
|
|
595
|
+
# ^^^^^^^^^^^^
|
|
596
|
+
#
|
|
597
|
+
# Foo::Foo, Bar::Bar = 1
|
|
598
|
+
# ^^^^^^^^ ^^^^^^^^
|
|
599
|
+
def visit_constant_path_write_node(node)
|
|
600
|
+
builder.assign(
|
|
601
|
+
builder.assignable(visit(node.target)),
|
|
602
|
+
token(node.operator_loc),
|
|
603
|
+
visit(node.value)
|
|
604
|
+
)
|
|
605
|
+
end
|
|
606
|
+
|
|
607
|
+
# Foo::Bar += baz
|
|
608
|
+
# ^^^^^^^^^^^^^^^
|
|
609
|
+
def visit_constant_path_operator_write_node(node)
|
|
610
|
+
builder.op_assign(
|
|
611
|
+
builder.assignable(visit(node.target)),
|
|
612
|
+
[node.binary_operator_loc.slice.chomp("="), srange(node.binary_operator_loc)],
|
|
613
|
+
visit(node.value)
|
|
614
|
+
)
|
|
615
|
+
end
|
|
616
|
+
|
|
617
|
+
# Foo::Bar &&= baz
|
|
618
|
+
# ^^^^^^^^^^^^^^^^
|
|
619
|
+
def visit_constant_path_and_write_node(node)
|
|
620
|
+
builder.op_assign(
|
|
621
|
+
builder.assignable(visit(node.target)),
|
|
622
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
623
|
+
visit(node.value)
|
|
624
|
+
)
|
|
625
|
+
end
|
|
626
|
+
|
|
627
|
+
# Foo::Bar ||= baz
|
|
628
|
+
# ^^^^^^^^^^^^^^^^
|
|
629
|
+
def visit_constant_path_or_write_node(node)
|
|
630
|
+
builder.op_assign(
|
|
631
|
+
builder.assignable(visit(node.target)),
|
|
632
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
633
|
+
visit(node.value)
|
|
634
|
+
)
|
|
635
|
+
end
|
|
636
|
+
|
|
637
|
+
# Foo::Bar, = baz
|
|
638
|
+
# ^^^^^^^^
|
|
639
|
+
def visit_constant_path_target_node(node)
|
|
640
|
+
builder.assignable(visit_constant_path_node(node))
|
|
641
|
+
end
|
|
642
|
+
|
|
643
|
+
# def foo; end
|
|
644
|
+
# ^^^^^^^^^^^^
|
|
645
|
+
#
|
|
646
|
+
# def self.foo; end
|
|
647
|
+
# ^^^^^^^^^^^^^^^^^
|
|
648
|
+
def visit_def_node(node)
|
|
649
|
+
if node.equal_loc
|
|
650
|
+
if node.receiver
|
|
651
|
+
builder.def_endless_singleton(
|
|
652
|
+
token(node.def_keyword_loc),
|
|
653
|
+
visit(node.receiver.is_a?(ParenthesesNode) ? node.receiver.body : node.receiver),
|
|
654
|
+
token(node.operator_loc),
|
|
655
|
+
token(node.name_loc),
|
|
656
|
+
builder.args(token(node.lparen_loc), visit(node.parameters) || [], token(node.rparen_loc), false),
|
|
657
|
+
token(node.equal_loc),
|
|
658
|
+
node.body&.accept(copy_compiler(forwarding: find_forwarding(node.parameters)))
|
|
659
|
+
)
|
|
660
|
+
else
|
|
661
|
+
builder.def_endless_method(
|
|
662
|
+
token(node.def_keyword_loc),
|
|
663
|
+
token(node.name_loc),
|
|
664
|
+
builder.args(token(node.lparen_loc), visit(node.parameters) || [], token(node.rparen_loc), false),
|
|
665
|
+
token(node.equal_loc),
|
|
666
|
+
node.body&.accept(copy_compiler(forwarding: find_forwarding(node.parameters)))
|
|
667
|
+
)
|
|
668
|
+
end
|
|
669
|
+
elsif node.receiver
|
|
670
|
+
builder.def_singleton(
|
|
671
|
+
token(node.def_keyword_loc),
|
|
672
|
+
visit(node.receiver.is_a?(ParenthesesNode) ? node.receiver.body : node.receiver),
|
|
673
|
+
token(node.operator_loc),
|
|
674
|
+
token(node.name_loc),
|
|
675
|
+
builder.args(token(node.lparen_loc), visit(node.parameters) || [], token(node.rparen_loc), false),
|
|
676
|
+
node.body&.accept(copy_compiler(forwarding: find_forwarding(node.parameters))),
|
|
677
|
+
token(node.end_keyword_loc)
|
|
678
|
+
)
|
|
679
|
+
else
|
|
680
|
+
builder.def_method(
|
|
681
|
+
token(node.def_keyword_loc),
|
|
682
|
+
token(node.name_loc),
|
|
683
|
+
builder.args(token(node.lparen_loc), visit(node.parameters) || [], token(node.rparen_loc), false),
|
|
684
|
+
node.body&.accept(copy_compiler(forwarding: find_forwarding(node.parameters))),
|
|
685
|
+
token(node.end_keyword_loc)
|
|
686
|
+
)
|
|
687
|
+
end
|
|
688
|
+
end
|
|
689
|
+
|
|
690
|
+
# defined? a
|
|
691
|
+
# ^^^^^^^^^^
|
|
692
|
+
#
|
|
693
|
+
# defined?(a)
|
|
694
|
+
# ^^^^^^^^^^^
|
|
695
|
+
def visit_defined_node(node)
|
|
696
|
+
# Very weird circumstances here where something like:
|
|
697
|
+
#
|
|
698
|
+
# defined?
|
|
699
|
+
# (1)
|
|
700
|
+
#
|
|
701
|
+
# gets parsed in Ruby as having only the `1` expression but in parser
|
|
702
|
+
# it gets parsed as having a begin. In this case we need to synthesize
|
|
703
|
+
# that begin to match parser's behavior.
|
|
704
|
+
if node.lparen_loc && node.keyword_loc.join(node.lparen_loc).slice.include?("\n")
|
|
705
|
+
builder.keyword_cmd(
|
|
706
|
+
:defined?,
|
|
707
|
+
token(node.keyword_loc),
|
|
708
|
+
nil,
|
|
709
|
+
[
|
|
710
|
+
builder.begin(
|
|
711
|
+
token(node.lparen_loc),
|
|
712
|
+
visit(node.value),
|
|
713
|
+
token(node.rparen_loc)
|
|
714
|
+
)
|
|
715
|
+
],
|
|
716
|
+
nil
|
|
717
|
+
)
|
|
718
|
+
else
|
|
719
|
+
builder.keyword_cmd(
|
|
720
|
+
:defined?,
|
|
721
|
+
token(node.keyword_loc),
|
|
722
|
+
token(node.lparen_loc),
|
|
723
|
+
[visit(node.value)],
|
|
724
|
+
token(node.rparen_loc)
|
|
725
|
+
)
|
|
726
|
+
end
|
|
727
|
+
end
|
|
728
|
+
|
|
729
|
+
# if foo then bar else baz end
|
|
730
|
+
# ^^^^^^^^^^^^
|
|
731
|
+
def visit_else_node(node)
|
|
732
|
+
visit(node.statements)
|
|
733
|
+
end
|
|
734
|
+
|
|
735
|
+
# "foo #{bar}"
|
|
736
|
+
# ^^^^^^
|
|
737
|
+
def visit_embedded_statements_node(node)
|
|
738
|
+
builder.begin(
|
|
739
|
+
token(node.opening_loc),
|
|
740
|
+
visit(node.statements),
|
|
741
|
+
token(node.closing_loc)
|
|
742
|
+
)
|
|
743
|
+
end
|
|
744
|
+
|
|
745
|
+
# "foo #@bar"
|
|
746
|
+
# ^^^^^
|
|
747
|
+
def visit_embedded_variable_node(node)
|
|
748
|
+
visit(node.variable)
|
|
749
|
+
end
|
|
750
|
+
|
|
751
|
+
# begin; foo; ensure; bar; end
|
|
752
|
+
# ^^^^^^^^^^^^
|
|
753
|
+
def visit_ensure_node(node)
|
|
754
|
+
raise CompilationError, "Cannot directly compile ensure nodes"
|
|
755
|
+
end
|
|
756
|
+
|
|
757
|
+
# false
|
|
758
|
+
# ^^^^^
|
|
759
|
+
def visit_false_node(node)
|
|
760
|
+
builder.false(token(node.location))
|
|
761
|
+
end
|
|
762
|
+
|
|
763
|
+
# foo => [*, bar, *]
|
|
764
|
+
# ^^^^^^^^^^^
|
|
765
|
+
def visit_find_pattern_node(node)
|
|
766
|
+
elements = [node.left, *node.requireds, node.right]
|
|
767
|
+
|
|
768
|
+
if node.constant
|
|
769
|
+
builder.const_pattern(visit(node.constant), token(node.opening_loc), builder.find_pattern(nil, visit_all(elements), nil), token(node.closing_loc))
|
|
770
|
+
else
|
|
771
|
+
builder.find_pattern(token(node.opening_loc), visit_all(elements), token(node.closing_loc))
|
|
772
|
+
end
|
|
773
|
+
end
|
|
774
|
+
|
|
775
|
+
# 1.0
|
|
776
|
+
# ^^^
|
|
777
|
+
def visit_float_node(node)
|
|
778
|
+
visit_numeric(node, builder.float([node.value, srange(node.location)]))
|
|
779
|
+
end
|
|
780
|
+
|
|
781
|
+
# for foo in bar do end
|
|
782
|
+
# ^^^^^^^^^^^^^^^^^^^^^
|
|
783
|
+
def visit_for_node(node)
|
|
784
|
+
builder.for(
|
|
785
|
+
token(node.for_keyword_loc),
|
|
786
|
+
visit(node.index),
|
|
787
|
+
token(node.in_keyword_loc),
|
|
788
|
+
visit(node.collection),
|
|
789
|
+
if (do_keyword_loc = node.do_keyword_loc)
|
|
790
|
+
token(do_keyword_loc)
|
|
791
|
+
else
|
|
792
|
+
srange_find(node.collection.location.end_offset, (node.statements&.location || node.end_keyword_loc).start_offset, ";")
|
|
793
|
+
end,
|
|
794
|
+
visit(node.statements),
|
|
795
|
+
token(node.end_keyword_loc)
|
|
796
|
+
)
|
|
797
|
+
end
|
|
798
|
+
|
|
799
|
+
# def foo(...); bar(...); end
|
|
800
|
+
# ^^^
|
|
801
|
+
def visit_forwarding_arguments_node(node)
|
|
802
|
+
builder.forwarded_args(token(node.location))
|
|
803
|
+
end
|
|
804
|
+
|
|
805
|
+
# def foo(...); end
|
|
806
|
+
# ^^^
|
|
807
|
+
def visit_forwarding_parameter_node(node)
|
|
808
|
+
builder.forward_arg(token(node.location))
|
|
809
|
+
end
|
|
810
|
+
|
|
811
|
+
# super
|
|
812
|
+
# ^^^^^
|
|
813
|
+
#
|
|
814
|
+
# super {}
|
|
815
|
+
# ^^^^^^^^
|
|
816
|
+
def visit_forwarding_super_node(node)
|
|
817
|
+
visit_block(
|
|
818
|
+
builder.keyword_cmd(
|
|
819
|
+
:zsuper,
|
|
820
|
+
["super", srange_offsets(node.location.start_offset, node.location.start_offset + 5)]
|
|
821
|
+
),
|
|
822
|
+
node.block
|
|
823
|
+
)
|
|
824
|
+
end
|
|
825
|
+
|
|
826
|
+
# $foo
|
|
827
|
+
# ^^^^
|
|
828
|
+
def visit_global_variable_read_node(node)
|
|
829
|
+
builder.gvar(token(node.location))
|
|
830
|
+
end
|
|
831
|
+
|
|
832
|
+
# $foo = 1
|
|
833
|
+
# ^^^^^^^^
|
|
834
|
+
def visit_global_variable_write_node(node)
|
|
835
|
+
builder.assign(
|
|
836
|
+
builder.assignable(builder.gvar(token(node.name_loc))),
|
|
837
|
+
token(node.operator_loc),
|
|
838
|
+
visit(node.value)
|
|
839
|
+
)
|
|
840
|
+
end
|
|
841
|
+
|
|
842
|
+
# $foo += bar
|
|
843
|
+
# ^^^^^^^^^^^
|
|
844
|
+
def visit_global_variable_operator_write_node(node)
|
|
845
|
+
builder.op_assign(
|
|
846
|
+
builder.assignable(builder.gvar(token(node.name_loc))),
|
|
847
|
+
[node.binary_operator_loc.slice.chomp("="), srange(node.binary_operator_loc)],
|
|
848
|
+
visit(node.value)
|
|
849
|
+
)
|
|
850
|
+
end
|
|
851
|
+
|
|
852
|
+
# $foo &&= bar
|
|
853
|
+
# ^^^^^^^^^^^^
|
|
854
|
+
def visit_global_variable_and_write_node(node)
|
|
855
|
+
builder.op_assign(
|
|
856
|
+
builder.assignable(builder.gvar(token(node.name_loc))),
|
|
857
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
858
|
+
visit(node.value)
|
|
859
|
+
)
|
|
860
|
+
end
|
|
861
|
+
|
|
862
|
+
# $foo ||= bar
|
|
863
|
+
# ^^^^^^^^^^^^
|
|
864
|
+
def visit_global_variable_or_write_node(node)
|
|
865
|
+
builder.op_assign(
|
|
866
|
+
builder.assignable(builder.gvar(token(node.name_loc))),
|
|
867
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
868
|
+
visit(node.value)
|
|
869
|
+
)
|
|
870
|
+
end
|
|
871
|
+
|
|
872
|
+
# $foo, = bar
|
|
873
|
+
# ^^^^
|
|
874
|
+
def visit_global_variable_target_node(node)
|
|
875
|
+
builder.assignable(builder.gvar([node.slice, srange(node.location)]))
|
|
876
|
+
end
|
|
877
|
+
|
|
878
|
+
# {}
|
|
879
|
+
# ^^
|
|
880
|
+
def visit_hash_node(node)
|
|
881
|
+
builder.associate(
|
|
882
|
+
token(node.opening_loc),
|
|
883
|
+
visit_all(node.elements),
|
|
884
|
+
token(node.closing_loc)
|
|
885
|
+
)
|
|
886
|
+
end
|
|
887
|
+
|
|
888
|
+
# foo => {}
|
|
889
|
+
# ^^
|
|
890
|
+
def visit_hash_pattern_node(node)
|
|
891
|
+
elements = [*node.elements, *node.rest]
|
|
892
|
+
|
|
893
|
+
if node.constant
|
|
894
|
+
builder.const_pattern(visit(node.constant), token(node.opening_loc), builder.hash_pattern(nil, visit_all(elements), nil), token(node.closing_loc))
|
|
895
|
+
else
|
|
896
|
+
builder.hash_pattern(token(node.opening_loc), visit_all(elements), token(node.closing_loc))
|
|
897
|
+
end
|
|
898
|
+
end
|
|
899
|
+
|
|
900
|
+
# if foo then bar end
|
|
901
|
+
# ^^^^^^^^^^^^^^^^^^^
|
|
902
|
+
#
|
|
903
|
+
# bar if foo
|
|
904
|
+
# ^^^^^^^^^^
|
|
905
|
+
#
|
|
906
|
+
# foo ? bar : baz
|
|
907
|
+
# ^^^^^^^^^^^^^^^
|
|
908
|
+
def visit_if_node(node)
|
|
909
|
+
if !node.if_keyword_loc
|
|
910
|
+
builder.ternary(
|
|
911
|
+
visit(node.predicate),
|
|
912
|
+
token(node.then_keyword_loc),
|
|
913
|
+
visit(node.statements),
|
|
914
|
+
token(node.subsequent.else_keyword_loc),
|
|
915
|
+
visit(node.subsequent)
|
|
916
|
+
)
|
|
917
|
+
elsif node.if_keyword_loc.start_offset == node.location.start_offset
|
|
918
|
+
builder.condition(
|
|
919
|
+
token(node.if_keyword_loc),
|
|
920
|
+
visit(node.predicate),
|
|
921
|
+
if (then_keyword_loc = node.then_keyword_loc)
|
|
922
|
+
token(then_keyword_loc)
|
|
923
|
+
else
|
|
924
|
+
srange_find(node.predicate.location.end_offset, (node.statements&.location || node.subsequent&.location || node.end_keyword_loc).start_offset, ";")
|
|
925
|
+
end,
|
|
926
|
+
visit(node.statements),
|
|
927
|
+
case node.subsequent
|
|
928
|
+
when IfNode
|
|
929
|
+
token(node.subsequent.if_keyword_loc)
|
|
930
|
+
when ElseNode
|
|
931
|
+
token(node.subsequent.else_keyword_loc)
|
|
932
|
+
end,
|
|
933
|
+
visit(node.subsequent),
|
|
934
|
+
if node.if_keyword != "elsif"
|
|
935
|
+
token(node.end_keyword_loc)
|
|
936
|
+
end
|
|
937
|
+
)
|
|
938
|
+
else
|
|
939
|
+
builder.condition_mod(
|
|
940
|
+
visit(node.statements),
|
|
941
|
+
visit(node.subsequent),
|
|
942
|
+
token(node.if_keyword_loc),
|
|
943
|
+
visit(node.predicate)
|
|
944
|
+
)
|
|
945
|
+
end
|
|
946
|
+
end
|
|
947
|
+
|
|
948
|
+
# 1i
|
|
949
|
+
# ^^
|
|
950
|
+
def visit_imaginary_node(node)
|
|
951
|
+
visit_numeric(node, builder.complex([Complex(0, node.numeric.value), srange(node.location)]))
|
|
952
|
+
end
|
|
953
|
+
|
|
954
|
+
# { foo: }
|
|
955
|
+
# ^^^^
|
|
956
|
+
def visit_implicit_node(node)
|
|
957
|
+
raise CompilationError, "Cannot directly compile implicit nodes"
|
|
958
|
+
end
|
|
959
|
+
|
|
960
|
+
# foo { |bar,| }
|
|
961
|
+
# ^
|
|
962
|
+
def visit_implicit_rest_node(node)
|
|
963
|
+
raise CompilationError, "Cannot compile implicit rest nodes"
|
|
964
|
+
end
|
|
965
|
+
|
|
966
|
+
# case foo; in bar; end
|
|
967
|
+
# ^^^^^^^^^^^^^^^^^^^^^
|
|
968
|
+
def visit_in_node(node)
|
|
969
|
+
pattern = nil
|
|
970
|
+
guard = nil
|
|
971
|
+
|
|
972
|
+
case node.pattern
|
|
973
|
+
when IfNode
|
|
974
|
+
pattern = within_pattern { |compiler| node.pattern.statements.accept(compiler) }
|
|
975
|
+
guard = builder.if_guard(token(node.pattern.if_keyword_loc), visit(node.pattern.predicate))
|
|
976
|
+
when UnlessNode
|
|
977
|
+
pattern = within_pattern { |compiler| node.pattern.statements.accept(compiler) }
|
|
978
|
+
guard = builder.unless_guard(token(node.pattern.keyword_loc), visit(node.pattern.predicate))
|
|
979
|
+
else
|
|
980
|
+
pattern = within_pattern { |compiler| node.pattern.accept(compiler) }
|
|
981
|
+
end
|
|
982
|
+
|
|
983
|
+
builder.in_pattern(
|
|
984
|
+
token(node.in_loc),
|
|
985
|
+
pattern,
|
|
986
|
+
guard,
|
|
987
|
+
if (then_loc = node.then_loc)
|
|
988
|
+
token(then_loc)
|
|
989
|
+
else
|
|
990
|
+
srange_find(node.pattern.location.end_offset, node.statements&.location&.start_offset, ";")
|
|
991
|
+
end,
|
|
992
|
+
visit(node.statements)
|
|
993
|
+
)
|
|
994
|
+
end
|
|
995
|
+
|
|
996
|
+
# foo[bar] += baz
|
|
997
|
+
# ^^^^^^^^^^^^^^^
|
|
998
|
+
def visit_index_operator_write_node(node)
|
|
999
|
+
arguments = node.arguments&.arguments || []
|
|
1000
|
+
arguments << node.block if node.block
|
|
1001
|
+
|
|
1002
|
+
builder.op_assign(
|
|
1003
|
+
builder.index(
|
|
1004
|
+
visit(node.receiver),
|
|
1005
|
+
token(node.opening_loc),
|
|
1006
|
+
visit_all(arguments),
|
|
1007
|
+
token(node.closing_loc)
|
|
1008
|
+
),
|
|
1009
|
+
[node.binary_operator_loc.slice.chomp("="), srange(node.binary_operator_loc)],
|
|
1010
|
+
visit(node.value)
|
|
1011
|
+
)
|
|
1012
|
+
end
|
|
1013
|
+
|
|
1014
|
+
# foo[bar] &&= baz
|
|
1015
|
+
# ^^^^^^^^^^^^^^^^
|
|
1016
|
+
def visit_index_and_write_node(node)
|
|
1017
|
+
arguments = node.arguments&.arguments || []
|
|
1018
|
+
arguments << node.block if node.block
|
|
1019
|
+
|
|
1020
|
+
builder.op_assign(
|
|
1021
|
+
builder.index(
|
|
1022
|
+
visit(node.receiver),
|
|
1023
|
+
token(node.opening_loc),
|
|
1024
|
+
visit_all(arguments),
|
|
1025
|
+
token(node.closing_loc)
|
|
1026
|
+
),
|
|
1027
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
1028
|
+
visit(node.value)
|
|
1029
|
+
)
|
|
1030
|
+
end
|
|
1031
|
+
|
|
1032
|
+
# foo[bar] ||= baz
|
|
1033
|
+
# ^^^^^^^^^^^^^^^^
|
|
1034
|
+
def visit_index_or_write_node(node)
|
|
1035
|
+
arguments = node.arguments&.arguments || []
|
|
1036
|
+
arguments << node.block if node.block
|
|
1037
|
+
|
|
1038
|
+
builder.op_assign(
|
|
1039
|
+
builder.index(
|
|
1040
|
+
visit(node.receiver),
|
|
1041
|
+
token(node.opening_loc),
|
|
1042
|
+
visit_all(arguments),
|
|
1043
|
+
token(node.closing_loc)
|
|
1044
|
+
),
|
|
1045
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
1046
|
+
visit(node.value)
|
|
1047
|
+
)
|
|
1048
|
+
end
|
|
1049
|
+
|
|
1050
|
+
# foo[bar], = 1
|
|
1051
|
+
# ^^^^^^^^
|
|
1052
|
+
def visit_index_target_node(node)
|
|
1053
|
+
builder.index_asgn(
|
|
1054
|
+
visit(node.receiver),
|
|
1055
|
+
token(node.opening_loc),
|
|
1056
|
+
visit_all(node.arguments&.arguments || []),
|
|
1057
|
+
token(node.closing_loc),
|
|
1058
|
+
)
|
|
1059
|
+
end
|
|
1060
|
+
|
|
1061
|
+
# @foo
|
|
1062
|
+
# ^^^^
|
|
1063
|
+
def visit_instance_variable_read_node(node)
|
|
1064
|
+
builder.ivar(token(node.location))
|
|
1065
|
+
end
|
|
1066
|
+
|
|
1067
|
+
# @foo = 1
|
|
1068
|
+
# ^^^^^^^^
|
|
1069
|
+
def visit_instance_variable_write_node(node)
|
|
1070
|
+
builder.assign(
|
|
1071
|
+
builder.assignable(builder.ivar(token(node.name_loc))),
|
|
1072
|
+
token(node.operator_loc),
|
|
1073
|
+
visit(node.value)
|
|
1074
|
+
)
|
|
1075
|
+
end
|
|
1076
|
+
|
|
1077
|
+
# @foo += bar
|
|
1078
|
+
# ^^^^^^^^^^^
|
|
1079
|
+
def visit_instance_variable_operator_write_node(node)
|
|
1080
|
+
builder.op_assign(
|
|
1081
|
+
builder.assignable(builder.ivar(token(node.name_loc))),
|
|
1082
|
+
[node.binary_operator_loc.slice.chomp("="), srange(node.binary_operator_loc)],
|
|
1083
|
+
visit(node.value)
|
|
1084
|
+
)
|
|
1085
|
+
end
|
|
1086
|
+
|
|
1087
|
+
# @foo &&= bar
|
|
1088
|
+
# ^^^^^^^^^^^^
|
|
1089
|
+
def visit_instance_variable_and_write_node(node)
|
|
1090
|
+
builder.op_assign(
|
|
1091
|
+
builder.assignable(builder.ivar(token(node.name_loc))),
|
|
1092
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
1093
|
+
visit(node.value)
|
|
1094
|
+
)
|
|
1095
|
+
end
|
|
1096
|
+
|
|
1097
|
+
# @foo ||= bar
|
|
1098
|
+
# ^^^^^^^^^^^^
|
|
1099
|
+
def visit_instance_variable_or_write_node(node)
|
|
1100
|
+
builder.op_assign(
|
|
1101
|
+
builder.assignable(builder.ivar(token(node.name_loc))),
|
|
1102
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
1103
|
+
visit(node.value)
|
|
1104
|
+
)
|
|
1105
|
+
end
|
|
1106
|
+
|
|
1107
|
+
# @foo, = bar
|
|
1108
|
+
# ^^^^
|
|
1109
|
+
def visit_instance_variable_target_node(node)
|
|
1110
|
+
builder.assignable(builder.ivar(token(node.location)))
|
|
1111
|
+
end
|
|
1112
|
+
|
|
1113
|
+
# 1
|
|
1114
|
+
# ^
|
|
1115
|
+
def visit_integer_node(node)
|
|
1116
|
+
visit_numeric(node, builder.integer([node.value, srange(node.location)]))
|
|
1117
|
+
end
|
|
1118
|
+
|
|
1119
|
+
# /foo #{bar}/
|
|
1120
|
+
# ^^^^^^^^^^^^
|
|
1121
|
+
def visit_interpolated_regular_expression_node(node)
|
|
1122
|
+
builder.regexp_compose(
|
|
1123
|
+
token(node.opening_loc),
|
|
1124
|
+
string_nodes_from_interpolation(node, node.opening),
|
|
1125
|
+
[node.closing[0], srange_offsets(node.closing_loc.start_offset, node.closing_loc.start_offset + 1)],
|
|
1126
|
+
builder.regexp_options([node.closing[1..], srange_offsets(node.closing_loc.start_offset + 1, node.closing_loc.end_offset)])
|
|
1127
|
+
)
|
|
1128
|
+
end
|
|
1129
|
+
|
|
1130
|
+
# if /foo #{bar}/ then end
|
|
1131
|
+
# ^^^^^^^^^^^^
|
|
1132
|
+
alias visit_interpolated_match_last_line_node visit_interpolated_regular_expression_node
|
|
1133
|
+
|
|
1134
|
+
# "foo #{bar}"
|
|
1135
|
+
# ^^^^^^^^^^^^
|
|
1136
|
+
def visit_interpolated_string_node(node)
|
|
1137
|
+
if node.heredoc?
|
|
1138
|
+
return visit_heredoc(node) { |children, closing| builder.string_compose(token(node.opening_loc), children, closing) }
|
|
1139
|
+
end
|
|
1140
|
+
|
|
1141
|
+
builder.string_compose(
|
|
1142
|
+
token(node.opening_loc),
|
|
1143
|
+
string_nodes_from_interpolation(node, node.opening),
|
|
1144
|
+
token(node.closing_loc)
|
|
1145
|
+
)
|
|
1146
|
+
end
|
|
1147
|
+
|
|
1148
|
+
# :"foo #{bar}"
|
|
1149
|
+
# ^^^^^^^^^^^^^
|
|
1150
|
+
def visit_interpolated_symbol_node(node)
|
|
1151
|
+
builder.symbol_compose(
|
|
1152
|
+
token(node.opening_loc),
|
|
1153
|
+
string_nodes_from_interpolation(node, node.opening),
|
|
1154
|
+
token(node.closing_loc)
|
|
1155
|
+
)
|
|
1156
|
+
end
|
|
1157
|
+
|
|
1158
|
+
# `foo #{bar}`
|
|
1159
|
+
# ^^^^^^^^^^^^
|
|
1160
|
+
def visit_interpolated_x_string_node(node)
|
|
1161
|
+
if node.heredoc?
|
|
1162
|
+
return visit_heredoc(node) { |children, closing| builder.xstring_compose(token(node.opening_loc), children, closing) }
|
|
1163
|
+
end
|
|
1164
|
+
|
|
1165
|
+
builder.xstring_compose(
|
|
1166
|
+
token(node.opening_loc),
|
|
1167
|
+
string_nodes_from_interpolation(node, node.opening),
|
|
1168
|
+
token(node.closing_loc)
|
|
1169
|
+
)
|
|
1170
|
+
end
|
|
1171
|
+
|
|
1172
|
+
# -> { it }
|
|
1173
|
+
# ^^
|
|
1174
|
+
def visit_it_local_variable_read_node(node)
|
|
1175
|
+
builder.ident([:it, srange(node.location)]).updated(:lvar)
|
|
1176
|
+
end
|
|
1177
|
+
|
|
1178
|
+
# -> { it }
|
|
1179
|
+
# ^^^^^^^^^
|
|
1180
|
+
def visit_it_parameters_node(node)
|
|
1181
|
+
# FIXME: The builder _should_ always be a subclass of the prism builder.
|
|
1182
|
+
# Currently RuboCop passes in its own builder that always inherits from the
|
|
1183
|
+
# parser builder (which is lacking the `itarg` method). Once rubocop-ast
|
|
1184
|
+
# opts in to use the custom prism builder a warning can be emitted when
|
|
1185
|
+
# it is not the expected class, and eventually raise.
|
|
1186
|
+
# https://github.com/rubocop/rubocop-ast/pull/354
|
|
1187
|
+
if builder.is_a?(Translation::Parser::Builder)
|
|
1188
|
+
builder.itarg
|
|
1189
|
+
else
|
|
1190
|
+
builder.args(nil, [], nil, false)
|
|
1191
|
+
end
|
|
1192
|
+
end
|
|
1193
|
+
|
|
1194
|
+
# foo(bar: baz)
|
|
1195
|
+
# ^^^^^^^^
|
|
1196
|
+
def visit_keyword_hash_node(node)
|
|
1197
|
+
builder.associate(nil, visit_all(node.elements), nil)
|
|
1198
|
+
end
|
|
1199
|
+
|
|
1200
|
+
# def foo(**bar); end
|
|
1201
|
+
# ^^^^^
|
|
1202
|
+
#
|
|
1203
|
+
# def foo(**); end
|
|
1204
|
+
# ^^
|
|
1205
|
+
def visit_keyword_rest_parameter_node(node)
|
|
1206
|
+
builder.kwrestarg(
|
|
1207
|
+
token(node.operator_loc),
|
|
1208
|
+
node.name ? [node.name, srange(node.name_loc)] : nil
|
|
1209
|
+
)
|
|
1210
|
+
end
|
|
1211
|
+
|
|
1212
|
+
# -> {}
|
|
1213
|
+
# ^^^^^
|
|
1214
|
+
def visit_lambda_node(node)
|
|
1215
|
+
parameters = node.parameters
|
|
1216
|
+
implicit_parameters = parameters.is_a?(NumberedParametersNode) || parameters.is_a?(ItParametersNode)
|
|
1217
|
+
|
|
1218
|
+
builder.block(
|
|
1219
|
+
builder.call_lambda(token(node.operator_loc)),
|
|
1220
|
+
[node.opening, srange(node.opening_loc)],
|
|
1221
|
+
if parameters.nil?
|
|
1222
|
+
builder.args(nil, [], nil, false)
|
|
1223
|
+
elsif implicit_parameters
|
|
1224
|
+
visit(node.parameters)
|
|
1225
|
+
else
|
|
1226
|
+
builder.args(
|
|
1227
|
+
token(node.parameters.opening_loc),
|
|
1228
|
+
visit(node.parameters),
|
|
1229
|
+
token(node.parameters.closing_loc),
|
|
1230
|
+
false
|
|
1231
|
+
)
|
|
1232
|
+
end,
|
|
1233
|
+
visit(node.body),
|
|
1234
|
+
[node.closing, srange(node.closing_loc)]
|
|
1235
|
+
)
|
|
1236
|
+
end
|
|
1237
|
+
|
|
1238
|
+
# foo
|
|
1239
|
+
# ^^^
|
|
1240
|
+
def visit_local_variable_read_node(node)
|
|
1241
|
+
builder.ident([node.name, srange(node.location)]).updated(:lvar)
|
|
1242
|
+
end
|
|
1243
|
+
|
|
1244
|
+
# foo = 1
|
|
1245
|
+
# ^^^^^^^
|
|
1246
|
+
def visit_local_variable_write_node(node)
|
|
1247
|
+
builder.assign(
|
|
1248
|
+
builder.assignable(builder.ident(token(node.name_loc))),
|
|
1249
|
+
token(node.operator_loc),
|
|
1250
|
+
visit(node.value)
|
|
1251
|
+
)
|
|
1252
|
+
end
|
|
1253
|
+
|
|
1254
|
+
# foo += bar
|
|
1255
|
+
# ^^^^^^^^^^
|
|
1256
|
+
def visit_local_variable_operator_write_node(node)
|
|
1257
|
+
builder.op_assign(
|
|
1258
|
+
builder.assignable(builder.ident(token(node.name_loc))),
|
|
1259
|
+
[node.binary_operator_loc.slice.chomp("="), srange(node.binary_operator_loc)],
|
|
1260
|
+
visit(node.value)
|
|
1261
|
+
)
|
|
1262
|
+
end
|
|
1263
|
+
|
|
1264
|
+
# foo &&= bar
|
|
1265
|
+
# ^^^^^^^^^^^
|
|
1266
|
+
def visit_local_variable_and_write_node(node)
|
|
1267
|
+
builder.op_assign(
|
|
1268
|
+
builder.assignable(builder.ident(token(node.name_loc))),
|
|
1269
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
1270
|
+
visit(node.value)
|
|
1271
|
+
)
|
|
1272
|
+
end
|
|
1273
|
+
|
|
1274
|
+
# foo ||= bar
|
|
1275
|
+
# ^^^^^^^^^^^
|
|
1276
|
+
def visit_local_variable_or_write_node(node)
|
|
1277
|
+
builder.op_assign(
|
|
1278
|
+
builder.assignable(builder.ident(token(node.name_loc))),
|
|
1279
|
+
[node.operator_loc.slice.chomp("="), srange(node.operator_loc)],
|
|
1280
|
+
visit(node.value)
|
|
1281
|
+
)
|
|
1282
|
+
end
|
|
1283
|
+
|
|
1284
|
+
# foo, = bar
|
|
1285
|
+
# ^^^
|
|
1286
|
+
def visit_local_variable_target_node(node)
|
|
1287
|
+
if in_pattern
|
|
1288
|
+
builder.assignable(builder.match_var([node.name, srange(node.location)]))
|
|
1289
|
+
else
|
|
1290
|
+
builder.assignable(builder.ident(token(node.location)))
|
|
1291
|
+
end
|
|
1292
|
+
end
|
|
1293
|
+
|
|
1294
|
+
# foo in bar
|
|
1295
|
+
# ^^^^^^^^^^
|
|
1296
|
+
def visit_match_predicate_node(node)
|
|
1297
|
+
builder.match_pattern_p(
|
|
1298
|
+
visit(node.value),
|
|
1299
|
+
token(node.operator_loc),
|
|
1300
|
+
within_pattern { |compiler| node.pattern.accept(compiler) }
|
|
1301
|
+
)
|
|
1302
|
+
end
|
|
1303
|
+
|
|
1304
|
+
# foo => bar
|
|
1305
|
+
# ^^^^^^^^^^
|
|
1306
|
+
def visit_match_required_node(node)
|
|
1307
|
+
builder.match_pattern(
|
|
1308
|
+
visit(node.value),
|
|
1309
|
+
token(node.operator_loc),
|
|
1310
|
+
within_pattern { |compiler| node.pattern.accept(compiler) }
|
|
1311
|
+
)
|
|
1312
|
+
end
|
|
1313
|
+
|
|
1314
|
+
# /(?<foo>foo)/ =~ bar
|
|
1315
|
+
# ^^^^^^^^^^^^^^^^^^^^
|
|
1316
|
+
def visit_match_write_node(node)
|
|
1317
|
+
builder.match_op(
|
|
1318
|
+
visit(node.call.receiver),
|
|
1319
|
+
token(node.call.message_loc),
|
|
1320
|
+
visit(node.call.arguments.arguments.first)
|
|
1321
|
+
)
|
|
1322
|
+
end
|
|
1323
|
+
|
|
1324
|
+
# A node that is missing from the syntax tree. This is only used in the
|
|
1325
|
+
# case of a syntax error. The parser gem doesn't have such a concept, so
|
|
1326
|
+
# we invent our own here.
|
|
1327
|
+
def visit_missing_node(node)
|
|
1328
|
+
::AST::Node.new(:missing, [], location: ::Parser::Source::Map.new(srange(node.location)))
|
|
1329
|
+
end
|
|
1330
|
+
|
|
1331
|
+
# module Foo; end
|
|
1332
|
+
# ^^^^^^^^^^^^^^^
|
|
1333
|
+
def visit_module_node(node)
|
|
1334
|
+
builder.def_module(
|
|
1335
|
+
token(node.module_keyword_loc),
|
|
1336
|
+
visit(node.constant_path),
|
|
1337
|
+
node.body&.accept(copy_compiler(forwarding: [])),
|
|
1338
|
+
token(node.end_keyword_loc)
|
|
1339
|
+
)
|
|
1340
|
+
end
|
|
1341
|
+
|
|
1342
|
+
# foo, bar = baz
|
|
1343
|
+
# ^^^^^^^^
|
|
1344
|
+
def visit_multi_target_node(node)
|
|
1345
|
+
builder.multi_lhs(
|
|
1346
|
+
token(node.lparen_loc),
|
|
1347
|
+
visit_all(multi_target_elements(node)),
|
|
1348
|
+
token(node.rparen_loc)
|
|
1349
|
+
)
|
|
1350
|
+
end
|
|
1351
|
+
|
|
1352
|
+
# foo, bar = baz
|
|
1353
|
+
# ^^^^^^^^^^^^^^
|
|
1354
|
+
def visit_multi_write_node(node)
|
|
1355
|
+
elements = multi_target_elements(node)
|
|
1356
|
+
|
|
1357
|
+
if elements.length == 1 && elements.first.is_a?(MultiTargetNode) && !node.rest
|
|
1358
|
+
elements = multi_target_elements(elements.first)
|
|
1359
|
+
end
|
|
1360
|
+
|
|
1361
|
+
builder.multi_assign(
|
|
1362
|
+
builder.multi_lhs(
|
|
1363
|
+
token(node.lparen_loc),
|
|
1364
|
+
visit_all(elements),
|
|
1365
|
+
token(node.rparen_loc)
|
|
1366
|
+
),
|
|
1367
|
+
token(node.operator_loc),
|
|
1368
|
+
visit(node.value)
|
|
1369
|
+
)
|
|
1370
|
+
end
|
|
1371
|
+
|
|
1372
|
+
# next
|
|
1373
|
+
# ^^^^
|
|
1374
|
+
#
|
|
1375
|
+
# next foo
|
|
1376
|
+
# ^^^^^^^^
|
|
1377
|
+
def visit_next_node(node)
|
|
1378
|
+
builder.keyword_cmd(
|
|
1379
|
+
:next,
|
|
1380
|
+
token(node.keyword_loc),
|
|
1381
|
+
nil,
|
|
1382
|
+
visit(node.arguments) || [],
|
|
1383
|
+
nil
|
|
1384
|
+
)
|
|
1385
|
+
end
|
|
1386
|
+
|
|
1387
|
+
# nil
|
|
1388
|
+
# ^^^
|
|
1389
|
+
def visit_nil_node(node)
|
|
1390
|
+
builder.nil(token(node.location))
|
|
1391
|
+
end
|
|
1392
|
+
|
|
1393
|
+
# def foo(**nil); end
|
|
1394
|
+
# ^^^^^
|
|
1395
|
+
def visit_no_keywords_parameter_node(node)
|
|
1396
|
+
if in_pattern
|
|
1397
|
+
builder.match_nil_pattern(token(node.operator_loc), token(node.keyword_loc))
|
|
1398
|
+
else
|
|
1399
|
+
builder.kwnilarg(token(node.operator_loc), token(node.keyword_loc))
|
|
1400
|
+
end
|
|
1401
|
+
end
|
|
1402
|
+
|
|
1403
|
+
# -> { _1 + _2 }
|
|
1404
|
+
# ^^^^^^^^^^^^^^
|
|
1405
|
+
def visit_numbered_parameters_node(node)
|
|
1406
|
+
builder.numargs(node.maximum)
|
|
1407
|
+
end
|
|
1408
|
+
|
|
1409
|
+
# $1
|
|
1410
|
+
# ^^
|
|
1411
|
+
def visit_numbered_reference_read_node(node)
|
|
1412
|
+
builder.nth_ref([node.number, srange(node.location)])
|
|
1413
|
+
end
|
|
1414
|
+
|
|
1415
|
+
# def foo(bar: baz); end
|
|
1416
|
+
# ^^^^^^^^
|
|
1417
|
+
def visit_optional_keyword_parameter_node(node)
|
|
1418
|
+
builder.kwoptarg([node.name, srange(node.name_loc)], visit(node.value))
|
|
1419
|
+
end
|
|
1420
|
+
|
|
1421
|
+
# def foo(bar = 1); end
|
|
1422
|
+
# ^^^^^^^
|
|
1423
|
+
def visit_optional_parameter_node(node)
|
|
1424
|
+
builder.optarg(token(node.name_loc), token(node.operator_loc), visit(node.value))
|
|
1425
|
+
end
|
|
1426
|
+
|
|
1427
|
+
# a or b
|
|
1428
|
+
# ^^^^^^
|
|
1429
|
+
def visit_or_node(node)
|
|
1430
|
+
builder.logical_op(:or, visit(node.left), token(node.operator_loc), visit(node.right))
|
|
1431
|
+
end
|
|
1432
|
+
|
|
1433
|
+
# def foo(bar, *baz); end
|
|
1434
|
+
# ^^^^^^^^^
|
|
1435
|
+
def visit_parameters_node(node)
|
|
1436
|
+
params = []
|
|
1437
|
+
|
|
1438
|
+
if node.requireds.any?
|
|
1439
|
+
node.requireds.each do |required|
|
|
1440
|
+
params <<
|
|
1441
|
+
if required.is_a?(RequiredParameterNode)
|
|
1442
|
+
visit(required)
|
|
1443
|
+
else
|
|
1444
|
+
required.accept(copy_compiler(in_destructure: true))
|
|
1445
|
+
end
|
|
1446
|
+
end
|
|
1447
|
+
end
|
|
1448
|
+
|
|
1449
|
+
params.concat(visit_all(node.optionals)) if node.optionals.any?
|
|
1450
|
+
params << visit(node.rest) if !node.rest.nil? && !node.rest.is_a?(ImplicitRestNode)
|
|
1451
|
+
|
|
1452
|
+
if node.posts.any?
|
|
1453
|
+
node.posts.each do |post|
|
|
1454
|
+
params <<
|
|
1455
|
+
if post.is_a?(RequiredParameterNode)
|
|
1456
|
+
visit(post)
|
|
1457
|
+
else
|
|
1458
|
+
post.accept(copy_compiler(in_destructure: true))
|
|
1459
|
+
end
|
|
1460
|
+
end
|
|
1461
|
+
end
|
|
1462
|
+
|
|
1463
|
+
params.concat(visit_all(node.keywords)) if node.keywords.any?
|
|
1464
|
+
params << visit(node.keyword_rest) if !node.keyword_rest.nil?
|
|
1465
|
+
params << visit(node.block) if !node.block.nil?
|
|
1466
|
+
params
|
|
1467
|
+
end
|
|
1468
|
+
|
|
1469
|
+
# ()
|
|
1470
|
+
# ^^
|
|
1471
|
+
#
|
|
1472
|
+
# (1)
|
|
1473
|
+
# ^^^
|
|
1474
|
+
def visit_parentheses_node(node)
|
|
1475
|
+
builder.begin(
|
|
1476
|
+
token(node.opening_loc),
|
|
1477
|
+
visit(node.body),
|
|
1478
|
+
token(node.closing_loc)
|
|
1479
|
+
)
|
|
1480
|
+
end
|
|
1481
|
+
|
|
1482
|
+
# foo => ^(bar)
|
|
1483
|
+
# ^^^^^^
|
|
1484
|
+
def visit_pinned_expression_node(node)
|
|
1485
|
+
parts = node.expression.accept(copy_compiler(in_pattern: false)) # Don't treat * and similar as match_rest
|
|
1486
|
+
expression = builder.begin(token(node.lparen_loc), parts, token(node.rparen_loc))
|
|
1487
|
+
builder.pin(token(node.operator_loc), expression)
|
|
1488
|
+
end
|
|
1489
|
+
|
|
1490
|
+
# foo = 1 and bar => ^foo
|
|
1491
|
+
# ^^^^
|
|
1492
|
+
def visit_pinned_variable_node(node)
|
|
1493
|
+
builder.pin(token(node.operator_loc), visit(node.variable))
|
|
1494
|
+
end
|
|
1495
|
+
|
|
1496
|
+
# END {}
|
|
1497
|
+
def visit_post_execution_node(node)
|
|
1498
|
+
builder.postexe(
|
|
1499
|
+
token(node.keyword_loc),
|
|
1500
|
+
token(node.opening_loc),
|
|
1501
|
+
visit(node.statements),
|
|
1502
|
+
token(node.closing_loc)
|
|
1503
|
+
)
|
|
1504
|
+
end
|
|
1505
|
+
|
|
1506
|
+
# BEGIN {}
|
|
1507
|
+
def visit_pre_execution_node(node)
|
|
1508
|
+
builder.preexe(
|
|
1509
|
+
token(node.keyword_loc),
|
|
1510
|
+
token(node.opening_loc),
|
|
1511
|
+
visit(node.statements),
|
|
1512
|
+
token(node.closing_loc)
|
|
1513
|
+
)
|
|
1514
|
+
end
|
|
1515
|
+
|
|
1516
|
+
# The top-level program node.
|
|
1517
|
+
def visit_program_node(node)
|
|
1518
|
+
visit(node.statements)
|
|
1519
|
+
end
|
|
1520
|
+
|
|
1521
|
+
# 0..5
|
|
1522
|
+
# ^^^^
|
|
1523
|
+
def visit_range_node(node)
|
|
1524
|
+
if node.exclude_end?
|
|
1525
|
+
builder.range_exclusive(
|
|
1526
|
+
visit(node.left),
|
|
1527
|
+
token(node.operator_loc),
|
|
1528
|
+
visit(node.right)
|
|
1529
|
+
)
|
|
1530
|
+
else
|
|
1531
|
+
builder.range_inclusive(
|
|
1532
|
+
visit(node.left),
|
|
1533
|
+
token(node.operator_loc),
|
|
1534
|
+
visit(node.right)
|
|
1535
|
+
)
|
|
1536
|
+
end
|
|
1537
|
+
end
|
|
1538
|
+
|
|
1539
|
+
# if foo .. bar; end
|
|
1540
|
+
# ^^^^^^^^^^
|
|
1541
|
+
alias visit_flip_flop_node visit_range_node
|
|
1542
|
+
|
|
1543
|
+
# 1r
|
|
1544
|
+
# ^^
|
|
1545
|
+
def visit_rational_node(node)
|
|
1546
|
+
visit_numeric(node, builder.rational([node.value, srange(node.location)]))
|
|
1547
|
+
end
|
|
1548
|
+
|
|
1549
|
+
# redo
|
|
1550
|
+
# ^^^^
|
|
1551
|
+
def visit_redo_node(node)
|
|
1552
|
+
builder.keyword_cmd(:redo, token(node.location))
|
|
1553
|
+
end
|
|
1554
|
+
|
|
1555
|
+
# /foo/
|
|
1556
|
+
# ^^^^^
|
|
1557
|
+
def visit_regular_expression_node(node)
|
|
1558
|
+
parts =
|
|
1559
|
+
if node.content == ""
|
|
1560
|
+
[]
|
|
1561
|
+
elsif node.content.include?("\n")
|
|
1562
|
+
string_nodes_from_line_continuations(node.unescaped, node.content, node.content_loc.start_offset, node.opening)
|
|
1563
|
+
else
|
|
1564
|
+
[builder.string_internal([node.unescaped, srange(node.content_loc)])]
|
|
1565
|
+
end
|
|
1566
|
+
|
|
1567
|
+
builder.regexp_compose(
|
|
1568
|
+
token(node.opening_loc),
|
|
1569
|
+
parts,
|
|
1570
|
+
[node.closing[0], srange_offsets(node.closing_loc.start_offset, node.closing_loc.start_offset + 1)],
|
|
1571
|
+
builder.regexp_options([node.closing[1..], srange_offsets(node.closing_loc.start_offset + 1, node.closing_loc.end_offset)])
|
|
1572
|
+
)
|
|
1573
|
+
end
|
|
1574
|
+
|
|
1575
|
+
# if /foo/ then end
|
|
1576
|
+
# ^^^^^
|
|
1577
|
+
alias visit_match_last_line_node visit_regular_expression_node
|
|
1578
|
+
|
|
1579
|
+
# def foo(bar:); end
|
|
1580
|
+
# ^^^^
|
|
1581
|
+
def visit_required_keyword_parameter_node(node)
|
|
1582
|
+
builder.kwarg([node.name, srange(node.name_loc)])
|
|
1583
|
+
end
|
|
1584
|
+
|
|
1585
|
+
# def foo(bar); end
|
|
1586
|
+
# ^^^
|
|
1587
|
+
def visit_required_parameter_node(node)
|
|
1588
|
+
builder.arg(token(node.location))
|
|
1589
|
+
end
|
|
1590
|
+
|
|
1591
|
+
# foo rescue bar
|
|
1592
|
+
# ^^^^^^^^^^^^^^
|
|
1593
|
+
def visit_rescue_modifier_node(node)
|
|
1594
|
+
builder.begin_body(
|
|
1595
|
+
visit(node.expression),
|
|
1596
|
+
[
|
|
1597
|
+
builder.rescue_body(
|
|
1598
|
+
token(node.keyword_loc),
|
|
1599
|
+
nil,
|
|
1600
|
+
nil,
|
|
1601
|
+
nil,
|
|
1602
|
+
nil,
|
|
1603
|
+
visit(node.rescue_expression)
|
|
1604
|
+
)
|
|
1605
|
+
]
|
|
1606
|
+
)
|
|
1607
|
+
end
|
|
1608
|
+
|
|
1609
|
+
# begin; rescue; end
|
|
1610
|
+
# ^^^^^^^
|
|
1611
|
+
def visit_rescue_node(node)
|
|
1612
|
+
raise CompilationError, "Cannot directly compile rescue nodes"
|
|
1613
|
+
end
|
|
1614
|
+
|
|
1615
|
+
# def foo(*bar); end
|
|
1616
|
+
# ^^^^
|
|
1617
|
+
#
|
|
1618
|
+
# def foo(*); end
|
|
1619
|
+
# ^
|
|
1620
|
+
def visit_rest_parameter_node(node)
|
|
1621
|
+
builder.restarg(token(node.operator_loc), token(node.name_loc))
|
|
1622
|
+
end
|
|
1623
|
+
|
|
1624
|
+
# retry
|
|
1625
|
+
# ^^^^^
|
|
1626
|
+
def visit_retry_node(node)
|
|
1627
|
+
builder.keyword_cmd(:retry, token(node.location))
|
|
1628
|
+
end
|
|
1629
|
+
|
|
1630
|
+
# return
|
|
1631
|
+
# ^^^^^^
|
|
1632
|
+
#
|
|
1633
|
+
# return 1
|
|
1634
|
+
# ^^^^^^^^
|
|
1635
|
+
def visit_return_node(node)
|
|
1636
|
+
builder.keyword_cmd(
|
|
1637
|
+
:return,
|
|
1638
|
+
token(node.keyword_loc),
|
|
1639
|
+
nil,
|
|
1640
|
+
visit(node.arguments) || [],
|
|
1641
|
+
nil
|
|
1642
|
+
)
|
|
1643
|
+
end
|
|
1644
|
+
|
|
1645
|
+
# self
|
|
1646
|
+
# ^^^^
|
|
1647
|
+
def visit_self_node(node)
|
|
1648
|
+
builder.self(token(node.location))
|
|
1649
|
+
end
|
|
1650
|
+
|
|
1651
|
+
# A shareable constant.
|
|
1652
|
+
def visit_shareable_constant_node(node)
|
|
1653
|
+
visit(node.write)
|
|
1654
|
+
end
|
|
1655
|
+
|
|
1656
|
+
# class << self; end
|
|
1657
|
+
# ^^^^^^^^^^^^^^^^^^
|
|
1658
|
+
def visit_singleton_class_node(node)
|
|
1659
|
+
builder.def_sclass(
|
|
1660
|
+
token(node.class_keyword_loc),
|
|
1661
|
+
token(node.operator_loc),
|
|
1662
|
+
visit(node.expression),
|
|
1663
|
+
node.body&.accept(copy_compiler(forwarding: [])),
|
|
1664
|
+
token(node.end_keyword_loc)
|
|
1665
|
+
)
|
|
1666
|
+
end
|
|
1667
|
+
|
|
1668
|
+
# __ENCODING__
|
|
1669
|
+
# ^^^^^^^^^^^^
|
|
1670
|
+
def visit_source_encoding_node(node)
|
|
1671
|
+
builder.accessible(builder.__ENCODING__(token(node.location)))
|
|
1672
|
+
end
|
|
1673
|
+
|
|
1674
|
+
# __FILE__
|
|
1675
|
+
# ^^^^^^^^
|
|
1676
|
+
def visit_source_file_node(node)
|
|
1677
|
+
builder.accessible(builder.__FILE__(token(node.location)))
|
|
1678
|
+
end
|
|
1679
|
+
|
|
1680
|
+
# __LINE__
|
|
1681
|
+
# ^^^^^^^^
|
|
1682
|
+
def visit_source_line_node(node)
|
|
1683
|
+
builder.accessible(builder.__LINE__(token(node.location)))
|
|
1684
|
+
end
|
|
1685
|
+
|
|
1686
|
+
# foo(*bar)
|
|
1687
|
+
# ^^^^
|
|
1688
|
+
#
|
|
1689
|
+
# def foo((bar, *baz)); end
|
|
1690
|
+
# ^^^^
|
|
1691
|
+
#
|
|
1692
|
+
# def foo(*); bar(*); end
|
|
1693
|
+
# ^
|
|
1694
|
+
def visit_splat_node(node)
|
|
1695
|
+
if node.expression.nil? && forwarding.include?(:*)
|
|
1696
|
+
builder.forwarded_restarg(token(node.operator_loc))
|
|
1697
|
+
elsif in_destructure
|
|
1698
|
+
builder.restarg(token(node.operator_loc), token(node.expression&.location))
|
|
1699
|
+
elsif in_pattern
|
|
1700
|
+
builder.match_rest(token(node.operator_loc), token(node.expression&.location))
|
|
1701
|
+
else
|
|
1702
|
+
builder.splat(token(node.operator_loc), visit(node.expression))
|
|
1703
|
+
end
|
|
1704
|
+
end
|
|
1705
|
+
|
|
1706
|
+
# A list of statements.
|
|
1707
|
+
def visit_statements_node(node)
|
|
1708
|
+
builder.compstmt(visit_all(node.body))
|
|
1709
|
+
end
|
|
1710
|
+
|
|
1711
|
+
# "foo"
|
|
1712
|
+
# ^^^^^
|
|
1713
|
+
def visit_string_node(node)
|
|
1714
|
+
if node.heredoc?
|
|
1715
|
+
visit_heredoc(node.to_interpolated) { |children, closing| builder.string_compose(token(node.opening_loc), children, closing) }
|
|
1716
|
+
elsif node.opening == "?"
|
|
1717
|
+
builder.character([node.unescaped, srange(node.location)])
|
|
1718
|
+
elsif node.opening&.start_with?("%") && node.unescaped.empty?
|
|
1719
|
+
builder.string_compose(token(node.opening_loc), [], token(node.closing_loc))
|
|
1720
|
+
else
|
|
1721
|
+
parts =
|
|
1722
|
+
if node.content.include?("\n")
|
|
1723
|
+
string_nodes_from_line_continuations(node.unescaped, node.content, node.content_loc.start_offset, node.opening)
|
|
1724
|
+
else
|
|
1725
|
+
[builder.string_internal([node.unescaped, srange(node.content_loc)])]
|
|
1726
|
+
end
|
|
1727
|
+
|
|
1728
|
+
builder.string_compose(
|
|
1729
|
+
token(node.opening_loc),
|
|
1730
|
+
parts,
|
|
1731
|
+
token(node.closing_loc)
|
|
1732
|
+
)
|
|
1733
|
+
end
|
|
1734
|
+
end
|
|
1735
|
+
|
|
1736
|
+
# super(foo)
|
|
1737
|
+
# ^^^^^^^^^^
|
|
1738
|
+
def visit_super_node(node)
|
|
1739
|
+
arguments = node.arguments&.arguments || []
|
|
1740
|
+
block = node.block
|
|
1741
|
+
|
|
1742
|
+
if block.is_a?(BlockArgumentNode)
|
|
1743
|
+
arguments = [*arguments, block]
|
|
1744
|
+
block = nil
|
|
1745
|
+
end
|
|
1746
|
+
|
|
1747
|
+
visit_block(
|
|
1748
|
+
builder.keyword_cmd(
|
|
1749
|
+
:super,
|
|
1750
|
+
token(node.keyword_loc),
|
|
1751
|
+
token(node.lparen_loc),
|
|
1752
|
+
visit_all(arguments),
|
|
1753
|
+
token(node.rparen_loc)
|
|
1754
|
+
),
|
|
1755
|
+
block
|
|
1756
|
+
)
|
|
1757
|
+
end
|
|
1758
|
+
|
|
1759
|
+
# :foo
|
|
1760
|
+
# ^^^^
|
|
1761
|
+
def visit_symbol_node(node)
|
|
1762
|
+
if node.closing_loc.nil?
|
|
1763
|
+
if node.opening_loc.nil?
|
|
1764
|
+
builder.symbol_internal([node.unescaped, srange(node.location)])
|
|
1765
|
+
else
|
|
1766
|
+
builder.symbol([node.unescaped, srange(node.location)])
|
|
1767
|
+
end
|
|
1768
|
+
else
|
|
1769
|
+
parts =
|
|
1770
|
+
if node.value == ""
|
|
1771
|
+
[]
|
|
1772
|
+
elsif node.value.include?("\n")
|
|
1773
|
+
string_nodes_from_line_continuations(node.unescaped, node.value, node.value_loc.start_offset, node.opening)
|
|
1774
|
+
else
|
|
1775
|
+
[builder.string_internal([node.unescaped, srange(node.value_loc)])]
|
|
1776
|
+
end
|
|
1777
|
+
|
|
1778
|
+
builder.symbol_compose(
|
|
1779
|
+
token(node.opening_loc),
|
|
1780
|
+
parts,
|
|
1781
|
+
token(node.closing_loc)
|
|
1782
|
+
)
|
|
1783
|
+
end
|
|
1784
|
+
end
|
|
1785
|
+
|
|
1786
|
+
# true
|
|
1787
|
+
# ^^^^
|
|
1788
|
+
def visit_true_node(node)
|
|
1789
|
+
builder.true(token(node.location))
|
|
1790
|
+
end
|
|
1791
|
+
|
|
1792
|
+
# undef foo
|
|
1793
|
+
# ^^^^^^^^^
|
|
1794
|
+
def visit_undef_node(node)
|
|
1795
|
+
builder.undef_method(token(node.keyword_loc), visit_all(node.names))
|
|
1796
|
+
end
|
|
1797
|
+
|
|
1798
|
+
# unless foo; bar end
|
|
1799
|
+
# ^^^^^^^^^^^^^^^^^^^
|
|
1800
|
+
#
|
|
1801
|
+
# bar unless foo
|
|
1802
|
+
# ^^^^^^^^^^^^^^
|
|
1803
|
+
def visit_unless_node(node)
|
|
1804
|
+
if node.keyword_loc.start_offset == node.location.start_offset
|
|
1805
|
+
builder.condition(
|
|
1806
|
+
token(node.keyword_loc),
|
|
1807
|
+
visit(node.predicate),
|
|
1808
|
+
if (then_keyword_loc = node.then_keyword_loc)
|
|
1809
|
+
token(then_keyword_loc)
|
|
1810
|
+
else
|
|
1811
|
+
srange_find(node.predicate.location.end_offset, (node.statements&.location || node.else_clause&.location || node.end_keyword_loc).start_offset, ";")
|
|
1812
|
+
end,
|
|
1813
|
+
visit(node.else_clause),
|
|
1814
|
+
token(node.else_clause&.else_keyword_loc),
|
|
1815
|
+
visit(node.statements),
|
|
1816
|
+
token(node.end_keyword_loc)
|
|
1817
|
+
)
|
|
1818
|
+
else
|
|
1819
|
+
builder.condition_mod(
|
|
1820
|
+
visit(node.else_clause),
|
|
1821
|
+
visit(node.statements),
|
|
1822
|
+
token(node.keyword_loc),
|
|
1823
|
+
visit(node.predicate)
|
|
1824
|
+
)
|
|
1825
|
+
end
|
|
1826
|
+
end
|
|
1827
|
+
|
|
1828
|
+
# until foo; bar end
|
|
1829
|
+
# ^^^^^^^^^^^^^^^^^^
|
|
1830
|
+
#
|
|
1831
|
+
# bar until foo
|
|
1832
|
+
# ^^^^^^^^^^^^^
|
|
1833
|
+
def visit_until_node(node)
|
|
1834
|
+
if node.location.start_offset == node.keyword_loc.start_offset
|
|
1835
|
+
builder.loop(
|
|
1836
|
+
:until,
|
|
1837
|
+
token(node.keyword_loc),
|
|
1838
|
+
visit(node.predicate),
|
|
1839
|
+
if (do_keyword_loc = node.do_keyword_loc)
|
|
1840
|
+
token(do_keyword_loc)
|
|
1841
|
+
else
|
|
1842
|
+
srange_find(node.predicate.location.end_offset, (node.statements&.location || node.closing_loc).start_offset, ";")
|
|
1843
|
+
end,
|
|
1844
|
+
visit(node.statements),
|
|
1845
|
+
token(node.closing_loc)
|
|
1846
|
+
)
|
|
1847
|
+
else
|
|
1848
|
+
builder.loop_mod(
|
|
1849
|
+
:until,
|
|
1850
|
+
visit(node.statements),
|
|
1851
|
+
token(node.keyword_loc),
|
|
1852
|
+
visit(node.predicate)
|
|
1853
|
+
)
|
|
1854
|
+
end
|
|
1855
|
+
end
|
|
1856
|
+
|
|
1857
|
+
# case foo; when bar; end
|
|
1858
|
+
# ^^^^^^^^^^^^^
|
|
1859
|
+
def visit_when_node(node)
|
|
1860
|
+
builder.when(
|
|
1861
|
+
token(node.keyword_loc),
|
|
1862
|
+
visit_all(node.conditions),
|
|
1863
|
+
if (then_keyword_loc = node.then_keyword_loc)
|
|
1864
|
+
token(then_keyword_loc)
|
|
1865
|
+
else
|
|
1866
|
+
srange_find(node.conditions.last.location.end_offset, node.statements&.location&.start_offset, ";")
|
|
1867
|
+
end,
|
|
1868
|
+
visit(node.statements)
|
|
1869
|
+
)
|
|
1870
|
+
end
|
|
1871
|
+
|
|
1872
|
+
# while foo; bar end
|
|
1873
|
+
# ^^^^^^^^^^^^^^^^^^
|
|
1874
|
+
#
|
|
1875
|
+
# bar while foo
|
|
1876
|
+
# ^^^^^^^^^^^^^
|
|
1877
|
+
def visit_while_node(node)
|
|
1878
|
+
if node.location.start_offset == node.keyword_loc.start_offset
|
|
1879
|
+
builder.loop(
|
|
1880
|
+
:while,
|
|
1881
|
+
token(node.keyword_loc),
|
|
1882
|
+
visit(node.predicate),
|
|
1883
|
+
if (do_keyword_loc = node.do_keyword_loc)
|
|
1884
|
+
token(do_keyword_loc)
|
|
1885
|
+
else
|
|
1886
|
+
srange_find(node.predicate.location.end_offset, (node.statements&.location || node.closing_loc).start_offset, ";")
|
|
1887
|
+
end,
|
|
1888
|
+
visit(node.statements),
|
|
1889
|
+
token(node.closing_loc)
|
|
1890
|
+
)
|
|
1891
|
+
else
|
|
1892
|
+
builder.loop_mod(
|
|
1893
|
+
:while,
|
|
1894
|
+
visit(node.statements),
|
|
1895
|
+
token(node.keyword_loc),
|
|
1896
|
+
visit(node.predicate)
|
|
1897
|
+
)
|
|
1898
|
+
end
|
|
1899
|
+
end
|
|
1900
|
+
|
|
1901
|
+
# `foo`
|
|
1902
|
+
# ^^^^^
|
|
1903
|
+
def visit_x_string_node(node)
|
|
1904
|
+
if node.heredoc?
|
|
1905
|
+
return visit_heredoc(node.to_interpolated) { |children, closing| builder.xstring_compose(token(node.opening_loc), children, closing) }
|
|
1906
|
+
end
|
|
1907
|
+
|
|
1908
|
+
parts =
|
|
1909
|
+
if node.content == ""
|
|
1910
|
+
[]
|
|
1911
|
+
elsif node.content.include?("\n")
|
|
1912
|
+
string_nodes_from_line_continuations(node.unescaped, node.content, node.content_loc.start_offset, node.opening)
|
|
1913
|
+
else
|
|
1914
|
+
[builder.string_internal([node.unescaped, srange(node.content_loc)])]
|
|
1915
|
+
end
|
|
1916
|
+
|
|
1917
|
+
builder.xstring_compose(
|
|
1918
|
+
token(node.opening_loc),
|
|
1919
|
+
parts,
|
|
1920
|
+
token(node.closing_loc)
|
|
1921
|
+
)
|
|
1922
|
+
end
|
|
1923
|
+
|
|
1924
|
+
# yield
|
|
1925
|
+
# ^^^^^
|
|
1926
|
+
#
|
|
1927
|
+
# yield 1
|
|
1928
|
+
# ^^^^^^^
|
|
1929
|
+
def visit_yield_node(node)
|
|
1930
|
+
builder.keyword_cmd(
|
|
1931
|
+
:yield,
|
|
1932
|
+
token(node.keyword_loc),
|
|
1933
|
+
token(node.lparen_loc),
|
|
1934
|
+
visit(node.arguments) || [],
|
|
1935
|
+
token(node.rparen_loc)
|
|
1936
|
+
)
|
|
1937
|
+
end
|
|
1938
|
+
|
|
1939
|
+
private
|
|
1940
|
+
|
|
1941
|
+
# Initialize a new compiler with the given option overrides, used to
|
|
1942
|
+
# visit a subtree with the given options.
|
|
1943
|
+
def copy_compiler(forwarding: self.forwarding, in_destructure: self.in_destructure, in_pattern: self.in_pattern)
|
|
1944
|
+
Compiler.new(parser, offset_cache, forwarding: forwarding, in_destructure: in_destructure, in_pattern: in_pattern)
|
|
1945
|
+
end
|
|
1946
|
+
|
|
1947
|
+
# When *, **, &, or ... are used as an argument in a method call, we
|
|
1948
|
+
# check if they were allowed by the current context. To determine that
|
|
1949
|
+
# we build this lookup table.
|
|
1950
|
+
def find_forwarding(node)
|
|
1951
|
+
return [] if node.nil?
|
|
1952
|
+
|
|
1953
|
+
forwarding = []
|
|
1954
|
+
forwarding << :* if node.rest.is_a?(RestParameterNode) && node.rest.name.nil?
|
|
1955
|
+
forwarding << :** if node.keyword_rest.is_a?(KeywordRestParameterNode) && node.keyword_rest.name.nil?
|
|
1956
|
+
forwarding << :& if !node.block.nil? && node.block.name.nil?
|
|
1957
|
+
forwarding |= [:&, :"..."] if node.keyword_rest.is_a?(ForwardingParameterNode)
|
|
1958
|
+
|
|
1959
|
+
forwarding
|
|
1960
|
+
end
|
|
1961
|
+
|
|
1962
|
+
# Returns the set of targets for a MultiTargetNode or a MultiWriteNode.
|
|
1963
|
+
def multi_target_elements(node)
|
|
1964
|
+
elements = [*node.lefts]
|
|
1965
|
+
elements << node.rest if !node.rest.nil? && !node.rest.is_a?(ImplicitRestNode)
|
|
1966
|
+
elements.concat(node.rights)
|
|
1967
|
+
elements
|
|
1968
|
+
end
|
|
1969
|
+
|
|
1970
|
+
# Negate the value of a numeric node. This is a special case where you
|
|
1971
|
+
# have a negative sign on one line and then a number on the next line.
|
|
1972
|
+
# In normal Ruby, this will always be a method call. The parser gem,
|
|
1973
|
+
# however, marks this as a numeric literal. We have to massage the tree
|
|
1974
|
+
# here to get it into the correct form.
|
|
1975
|
+
def numeric_negate(message_loc, receiver)
|
|
1976
|
+
case receiver.type
|
|
1977
|
+
when :integer_node, :float_node
|
|
1978
|
+
receiver.copy(value: -receiver.value, location: message_loc.join(receiver.location))
|
|
1979
|
+
when :rational_node
|
|
1980
|
+
receiver.copy(numerator: -receiver.numerator, location: message_loc.join(receiver.location))
|
|
1981
|
+
when :imaginary_node
|
|
1982
|
+
receiver.copy(numeric: numeric_negate(message_loc, receiver.numeric), location: message_loc.join(receiver.location))
|
|
1983
|
+
end
|
|
1984
|
+
end
|
|
1985
|
+
|
|
1986
|
+
# Blocks can have a special set of parameters that automatically expand
|
|
1987
|
+
# when given arrays if they have a single required parameter and no
|
|
1988
|
+
# other parameters.
|
|
1989
|
+
def procarg0?(parameters)
|
|
1990
|
+
parameters &&
|
|
1991
|
+
parameters.requireds.length == 1 &&
|
|
1992
|
+
parameters.optionals.empty? &&
|
|
1993
|
+
parameters.rest.nil? &&
|
|
1994
|
+
parameters.posts.empty? &&
|
|
1995
|
+
parameters.keywords.empty? &&
|
|
1996
|
+
parameters.keyword_rest.nil? &&
|
|
1997
|
+
parameters.block.nil?
|
|
1998
|
+
end
|
|
1999
|
+
|
|
2000
|
+
# Locations in the parser gem AST are generated using this class. We
|
|
2001
|
+
# store a reference to its constant to make it slightly faster to look
|
|
2002
|
+
# up.
|
|
2003
|
+
Range = ::Parser::Source::Range
|
|
2004
|
+
|
|
2005
|
+
# Constructs a new source range from the given start and end offsets.
|
|
2006
|
+
def srange(location)
|
|
2007
|
+
Range.new(source_buffer, offset_cache[location.start_offset], offset_cache[location.end_offset]) if location
|
|
2008
|
+
end
|
|
2009
|
+
|
|
2010
|
+
# Constructs a new source range from the given start and end offsets.
|
|
2011
|
+
def srange_offsets(start_offset, end_offset)
|
|
2012
|
+
Range.new(source_buffer, offset_cache[start_offset], offset_cache[end_offset])
|
|
2013
|
+
end
|
|
2014
|
+
|
|
2015
|
+
# Constructs a new source range by finding the given character between
|
|
2016
|
+
# the given start offset and end offset. If the needle is not found, it
|
|
2017
|
+
# returns nil. Importantly it does not search past newlines or comments.
|
|
2018
|
+
#
|
|
2019
|
+
# Note that end_offset is allowed to be nil, in which case this will
|
|
2020
|
+
# search until the end of the string.
|
|
2021
|
+
def srange_find(start_offset, end_offset, character)
|
|
2022
|
+
if (match = source_buffer.source.byteslice(start_offset...end_offset)[/\A\s*#{character}/])
|
|
2023
|
+
final_offset = start_offset + match.bytesize
|
|
2024
|
+
[character, Range.new(source_buffer, offset_cache[final_offset - character.bytesize], offset_cache[final_offset])]
|
|
2025
|
+
end
|
|
2026
|
+
end
|
|
2027
|
+
|
|
2028
|
+
# Transform a location into a token that the parser gem expects.
|
|
2029
|
+
def token(location)
|
|
2030
|
+
[location.slice, Range.new(source_buffer, offset_cache[location.start_offset], offset_cache[location.end_offset])] if location
|
|
2031
|
+
end
|
|
2032
|
+
|
|
2033
|
+
# Visit a block node on a call.
|
|
2034
|
+
def visit_block(call, block)
|
|
2035
|
+
if block
|
|
2036
|
+
parameters = block.parameters
|
|
2037
|
+
implicit_parameters = parameters.is_a?(NumberedParametersNode) || parameters.is_a?(ItParametersNode)
|
|
2038
|
+
|
|
2039
|
+
builder.block(
|
|
2040
|
+
call,
|
|
2041
|
+
token(block.opening_loc),
|
|
2042
|
+
if parameters.nil?
|
|
2043
|
+
builder.args(nil, [], nil, false)
|
|
2044
|
+
elsif implicit_parameters
|
|
2045
|
+
visit(parameters)
|
|
2046
|
+
else
|
|
2047
|
+
builder.args(
|
|
2048
|
+
token(parameters.opening_loc),
|
|
2049
|
+
if procarg0?(parameters.parameters)
|
|
2050
|
+
parameter = parameters.parameters.requireds.first
|
|
2051
|
+
visited = parameter.is_a?(RequiredParameterNode) ? visit(parameter) : parameter.accept(copy_compiler(in_destructure: true))
|
|
2052
|
+
[builder.procarg0(visited)].concat(visit_all(parameters.locals))
|
|
2053
|
+
else
|
|
2054
|
+
visit(parameters)
|
|
2055
|
+
end,
|
|
2056
|
+
token(parameters.closing_loc),
|
|
2057
|
+
false
|
|
2058
|
+
)
|
|
2059
|
+
end,
|
|
2060
|
+
visit(block.body),
|
|
2061
|
+
token(block.closing_loc)
|
|
2062
|
+
)
|
|
2063
|
+
else
|
|
2064
|
+
call
|
|
2065
|
+
end
|
|
2066
|
+
end
|
|
2067
|
+
|
|
2068
|
+
# Visit a heredoc that can be either a string or an xstring.
|
|
2069
|
+
def visit_heredoc(node)
|
|
2070
|
+
children = Array.new
|
|
2071
|
+
indented = false
|
|
2072
|
+
|
|
2073
|
+
# If this is a dedenting heredoc, then we need to insert the opening
|
|
2074
|
+
# content into the children as well.
|
|
2075
|
+
if node.opening.start_with?("<<~") && node.parts.length > 0 && !node.parts.first.is_a?(StringNode)
|
|
2076
|
+
location = node.parts.first.location
|
|
2077
|
+
location = location.copy(start_offset: location.start_offset - location.start_line_slice.bytesize)
|
|
2078
|
+
children << builder.string_internal(token(location))
|
|
2079
|
+
indented = true
|
|
2080
|
+
end
|
|
2081
|
+
|
|
2082
|
+
node.parts.each do |part|
|
|
2083
|
+
pushing =
|
|
2084
|
+
if part.is_a?(StringNode) && part.content.include?("\n")
|
|
2085
|
+
string_nodes_from_line_continuations(part.unescaped, part.content, part.location.start_offset, node.opening)
|
|
2086
|
+
else
|
|
2087
|
+
[visit(part)]
|
|
2088
|
+
end
|
|
2089
|
+
|
|
2090
|
+
pushing.each do |child|
|
|
2091
|
+
if child.type == :str && child.children.last == ""
|
|
2092
|
+
# nothing
|
|
2093
|
+
elsif child.type == :str && children.last && children.last.type == :str && !children.last.children.first.end_with?("\n")
|
|
2094
|
+
appendee = children[-1]
|
|
2095
|
+
|
|
2096
|
+
location = appendee.loc
|
|
2097
|
+
location = location.with_expression(location.expression.join(child.loc.expression))
|
|
2098
|
+
|
|
2099
|
+
children[-1] = appendee.updated(:str, ["#{appendee.children.first}#{child.children.first}"], location: location)
|
|
2100
|
+
else
|
|
2101
|
+
children << child
|
|
2102
|
+
end
|
|
2103
|
+
end
|
|
2104
|
+
end
|
|
2105
|
+
|
|
2106
|
+
closing = node.closing
|
|
2107
|
+
closing_t = [closing.chomp, srange_offsets(node.closing_loc.start_offset, node.closing_loc.end_offset - (closing[/\s+$/]&.length || 0))]
|
|
2108
|
+
composed = yield children, closing_t
|
|
2109
|
+
|
|
2110
|
+
composed = composed.updated(nil, children[1..-1]) if indented
|
|
2111
|
+
composed
|
|
2112
|
+
end
|
|
2113
|
+
|
|
2114
|
+
# Visit a numeric node and account for the optional sign.
|
|
2115
|
+
def visit_numeric(node, value)
|
|
2116
|
+
if (slice = node.slice).match?(/^[+-]/)
|
|
2117
|
+
builder.unary_num(
|
|
2118
|
+
[slice[0].to_sym, srange_offsets(node.location.start_offset, node.location.start_offset + 1)],
|
|
2119
|
+
value
|
|
2120
|
+
)
|
|
2121
|
+
else
|
|
2122
|
+
value
|
|
2123
|
+
end
|
|
2124
|
+
end
|
|
2125
|
+
|
|
2126
|
+
# Within the given block, track that we're within a pattern.
|
|
2127
|
+
def within_pattern
|
|
2128
|
+
begin
|
|
2129
|
+
parser.pattern_variables.push
|
|
2130
|
+
yield copy_compiler(in_pattern: true)
|
|
2131
|
+
ensure
|
|
2132
|
+
parser.pattern_variables.pop
|
|
2133
|
+
end
|
|
2134
|
+
end
|
|
2135
|
+
|
|
2136
|
+
# When the content of a string node is split across multiple lines, the
|
|
2137
|
+
# parser gem creates individual string nodes for each line the content is part of.
|
|
2138
|
+
def string_nodes_from_interpolation(node, opening)
|
|
2139
|
+
node.parts.flat_map do |part|
|
|
2140
|
+
if part.type == :string_node && part.content.include?("\n") && part.opening_loc.nil?
|
|
2141
|
+
string_nodes_from_line_continuations(part.unescaped, part.content, part.content_loc.start_offset, opening)
|
|
2142
|
+
else
|
|
2143
|
+
visit(part)
|
|
2144
|
+
end
|
|
2145
|
+
end
|
|
2146
|
+
end
|
|
2147
|
+
|
|
2148
|
+
# Create parser string nodes from a single prism node. The parser gem
|
|
2149
|
+
# "glues" strings together when a line continuation is encountered.
|
|
2150
|
+
def string_nodes_from_line_continuations(unescaped, escaped, start_offset, opening)
|
|
2151
|
+
unescaped = unescaped.lines
|
|
2152
|
+
escaped = escaped.lines
|
|
2153
|
+
percent_array = opening&.start_with?("%w", "%W", "%i", "%I")
|
|
2154
|
+
regex = opening == "/" || opening&.start_with?("%r")
|
|
2155
|
+
|
|
2156
|
+
# Non-interpolating strings
|
|
2157
|
+
if opening&.end_with?("'") || opening&.start_with?("%q", "%s", "%w", "%i")
|
|
2158
|
+
current_length = 0
|
|
2159
|
+
current_line = +""
|
|
2160
|
+
|
|
2161
|
+
escaped.filter_map.with_index do |escaped_line, index|
|
|
2162
|
+
unescaped_line = unescaped.fetch(index, "")
|
|
2163
|
+
current_length += escaped_line.bytesize
|
|
2164
|
+
current_line << unescaped_line
|
|
2165
|
+
|
|
2166
|
+
# Glue line continuations together. Only %w and %i arrays can contain these.
|
|
2167
|
+
if percent_array && escaped_line[/(\\)*\n$/, 1]&.length&.odd?
|
|
2168
|
+
next unless index == escaped.count - 1
|
|
2169
|
+
end
|
|
2170
|
+
s = builder.string_internal([current_line, srange_offsets(start_offset, start_offset + current_length)])
|
|
2171
|
+
start_offset += escaped_line.bytesize
|
|
2172
|
+
current_line = +""
|
|
2173
|
+
current_length = 0
|
|
2174
|
+
s
|
|
2175
|
+
end
|
|
2176
|
+
else
|
|
2177
|
+
escaped_lengths = []
|
|
2178
|
+
normalized_lengths = []
|
|
2179
|
+
# Keeps track of where an unescaped line should start a new token. An unescaped
|
|
2180
|
+
# \n would otherwise be indistinguishable from the actual newline at the end of
|
|
2181
|
+
# of the line. The parser gem only emits a new string node at "real" newlines,
|
|
2182
|
+
# line continuations don't start a new node as well.
|
|
2183
|
+
do_next_tokens = []
|
|
2184
|
+
|
|
2185
|
+
escaped
|
|
2186
|
+
.chunk_while { |before, after| before[/(\\*)\r?\n$/, 1]&.length&.odd? || false }
|
|
2187
|
+
.each do |lines|
|
|
2188
|
+
escaped_lengths << lines.sum(&:bytesize)
|
|
2189
|
+
|
|
2190
|
+
unescaped_lines_count =
|
|
2191
|
+
if regex
|
|
2192
|
+
0 # Will always be preserved as is
|
|
2193
|
+
else
|
|
2194
|
+
lines.sum do |line|
|
|
2195
|
+
count = line.scan(/(\\*)n/).count { |(backslashes)| backslashes&.length&.odd? }
|
|
2196
|
+
count -= 1 if !line.end_with?("\n") && count > 0
|
|
2197
|
+
count
|
|
2198
|
+
end
|
|
2199
|
+
end
|
|
2200
|
+
|
|
2201
|
+
extra = 1
|
|
2202
|
+
extra = lines.count if percent_array # Account for line continuations in percent arrays
|
|
2203
|
+
|
|
2204
|
+
normalized_lengths.concat(Array.new(unescaped_lines_count + extra, 0))
|
|
2205
|
+
normalized_lengths[-1] = lines.sum { |line| line.bytesize }
|
|
2206
|
+
do_next_tokens.concat(Array.new(unescaped_lines_count + extra, false))
|
|
2207
|
+
do_next_tokens[-1] = true
|
|
2208
|
+
end
|
|
2209
|
+
|
|
2210
|
+
current_line = +""
|
|
2211
|
+
current_normalized_length = 0
|
|
2212
|
+
|
|
2213
|
+
emitted_count = 0
|
|
2214
|
+
unescaped.filter_map.with_index do |unescaped_line, index|
|
|
2215
|
+
current_line << unescaped_line
|
|
2216
|
+
current_normalized_length += normalized_lengths.fetch(index, 0)
|
|
2217
|
+
|
|
2218
|
+
if do_next_tokens[index]
|
|
2219
|
+
inner_part = builder.string_internal([current_line, srange_offsets(start_offset, start_offset + current_normalized_length)])
|
|
2220
|
+
start_offset += escaped_lengths.fetch(emitted_count, 0)
|
|
2221
|
+
current_line = +""
|
|
2222
|
+
current_normalized_length = 0
|
|
2223
|
+
emitted_count += 1
|
|
2224
|
+
inner_part
|
|
2225
|
+
else
|
|
2226
|
+
nil
|
|
2227
|
+
end
|
|
2228
|
+
end
|
|
2229
|
+
end
|
|
2230
|
+
end
|
|
2231
|
+
end
|
|
2232
|
+
end
|
|
2233
|
+
end
|
|
2234
|
+
end
|