<%= @name %> (<%= @code %>)
-#<%= @desc %>
-#-
-# <% @features.each do |f| %>
-#
- <%= f %> -# <% end %> -#
-# <% if @cost < 10 %> -# Only <%= @cost %>!!! -# <% else %> -# Call for a price, today! -# <% end %> -#
-# -#diff --git a/.github/workflows/dependabot-tapioca.yml b/.github/workflows/dependabot-tapioca.yml new file mode 100644 index 0000000..722a226 --- /dev/null +++ b/.github/workflows/dependabot-tapioca.yml @@ -0,0 +1,39 @@ +name: Update Dependabot RBIs + +# Dependency bumps can change gem APIs, so regenerate the Sorbet gem RBIs +# (`bundle exec tapioca gems`) and push the result back onto the Dependabot PR. +on: + pull_request: + +permissions: + contents: write + +jobs: + tapioca-gems: + name: Regenerate gem RBIs + if: startsWith(github.head_ref, 'dependabot/') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + ref: ${{ github.head_ref }} + - uses: ruby/setup-ruby@4c56a21280b36d862b5fc31348f463d60bdc55d5 # v1 + with: + ruby-version: '3.4' + bundler-cache: true + - name: Regenerate gem RBIs + run: bundle exec tapioca gems + - name: Commit, push, and type-check updated RBIs + run: | + if [[ -z "$(git status --porcelain sorbet/rbi)" ]]; then + echo "No RBI changes to commit." + exit 0 + fi + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + git add sorbet/rbi + git commit -m "Regenerate gem RBIs [dependabot skip]" + git push + # The push above uses GITHUB_TOKEN, which doesn't re-trigger CI. + # RBI changes only affect Sorbet, so type-check them here instead. + bundle exec srb tc diff --git a/Gemfile b/Gemfile index 02f3c1f..7f4f5e9 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,3 @@ source 'https://rubygems.org' gemspec - -# Pinned to main for the not-yet-released `Sorbet/RedundantTLet` and -# `Sorbet/RedundantTLetForLiteral` cops (see Shopify/rubocop-sorbet#372 and #367). -gem 'rubocop-sorbet', github: 'Shopify/rubocop-sorbet', ref: '7b7d3cb5a41cee8207b3cd00c21f5ef43f7140fd' diff --git a/Gemfile.lock b/Gemfile.lock index a5c353b..cb78149 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,3 @@ -GIT - remote: https://github.com/Shopify/rubocop-sorbet.git - revision: 7b7d3cb5a41cee8207b3cd00c21f5ef43f7140fd - ref: 7b7d3cb5a41cee8207b3cd00c21f5ef43f7140fd - specs: - rubocop-sorbet (0.12.0) - lint_roller - rubocop (>= 1.75.2) - PATH remote: . specs: @@ -18,9 +9,9 @@ PATH GEM remote: https://rubygems.org/ specs: - actionpack (8.1.2) - actionview (= 8.1.2) - activesupport (= 8.1.2) + actionpack (8.1.3) + actionview (= 8.1.3) + activesupport (= 8.1.3) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) @@ -28,13 +19,13 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actionview (8.1.2) - activesupport (= 8.1.2) + actionview (8.1.3) + activesupport (= 8.1.3) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activesupport (8.1.2) + activesupport (8.1.3) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) @@ -47,8 +38,6 @@ GEM securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) uri (>= 0.13.1) - addressable (2.8.9) - public_suffix (>= 2.0.2, < 8.0) ast (2.4.3) base64 (0.3.0) benchmark (0.5.0) @@ -59,7 +48,7 @@ GEM erubi (~> 1.4) parser (>= 2.4) smart_properties - bigdecimal (4.0.1) + bigdecimal (4.1.2) builder (3.3.0) coderay (1.1.3) concurrent-ruby (1.3.6) @@ -78,44 +67,39 @@ GEM prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.18.1) - json-schema (6.1.0) - addressable (~> 2.8) - bigdecimal (>= 3.1, < 5) + json (2.19.7) language_server-protocol (3.17.0.5) lint_roller (1.1.0) logger (1.7.0) - loofah (2.25.0) + loofah (2.25.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mcp (0.8.0) - json-schema (>= 4.1) method_source (1.1.0) - minitest (6.0.2) + minitest (6.0.6) drb (~> 2.0) prism (~> 1.5) - mocha (3.0.2) + mocha (3.1.0) ruby2_keywords (>= 0.0.5) netrc (0.11.0) - nokogiri (1.19.1-arm64-darwin) + nokogiri (1.19.3-arm64-darwin) racc (~> 1.4) - nokogiri (1.19.1-x86_64-darwin) + nokogiri (1.19.3-x86_64-darwin) racc (~> 1.4) - nokogiri (1.19.1-x86_64-linux-gnu) + nokogiri (1.19.3-x86_64-linux-gnu) racc (~> 1.4) - packwerk (3.2.3) + packwerk (3.3.0) activesupport (>= 6.0) ast + benchmark better_html bundler constant_resolver (>= 0.3) - parallel + parallel (< 2) parser - prism (>= 0.25.0) - sorbet-runtime (>= 0.5.9914) + prism (>= 1.4.0) zeitwerk (>= 2.6.1) parallel (1.28.0) - parser (3.3.10.2) + parser (3.3.11.1) ast (~> 2.4.1) racc pp (0.6.3) @@ -129,7 +113,6 @@ GEM psych (5.3.1) date stringio - public_suffix (7.0.5) racc (1.8.1) rack (3.2.5) rack-session (2.1.1) @@ -146,9 +129,9 @@ GEM rails-html-sanitizer (1.7.0) loofah (~> 2.25) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (8.1.2) - actionpack (= 8.1.2) - activesupport (= 8.1.2) + railties (8.1.3) + actionpack (= 8.1.3) + activesupport (= 8.1.3) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -156,7 +139,7 @@ GEM tsort (>= 0.2) zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.3.1) + rake (13.4.2) rbi (0.3.12) prism (~> 1.0) rbs (>= 4.0.1) @@ -168,27 +151,26 @@ GEM erb psych (>= 4.0.0) tsort - regexp_parser (2.11.3) + regexp_parser (2.12.0) reline (0.6.3) io-console (~> 0.5) require-hooks (0.4.0) rexml (3.4.4) - rubocop (1.85.1) + rubocop (1.86.2) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) - mcp (~> 0.6) - parallel (~> 1.10) + parallel (>= 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.49.0) + rubocop-ast (1.49.1) parser (>= 3.3.7.2) prism (~> 1.7) - rubocop-gusto (10.6.0) + rubocop-gusto (10.9.3) lint_roller rubocop (>= 1.76) rubocop-performance @@ -206,6 +188,9 @@ GEM rubocop-rspec (3.9.0) lint_roller (~> 1.1) rubocop (~> 1.81) + rubocop-sorbet (0.12.0) + lint_roller + rubocop (>= 1.75.2) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) rubydex (0.2.5-arm64-darwin) @@ -213,14 +198,14 @@ GEM rubydex (0.2.5-x86_64-linux) securerandom (0.4.1) smart_properties (1.17.0) - sorbet (0.6.13258) - sorbet-static (= 0.6.13258) - sorbet-runtime (0.6.13258) - sorbet-static (0.6.13258-universal-darwin) - sorbet-static (0.6.13258-x86_64-linux) - sorbet-static-and-runtime (0.6.13258) - sorbet (= 0.6.13258) - sorbet-runtime (= 0.6.13258) + sorbet (0.6.13261) + sorbet-static (= 0.6.13261) + sorbet-runtime (0.6.13261) + sorbet-static (0.6.13261-universal-darwin) + sorbet-static (0.6.13261-x86_64-linux) + sorbet-static-and-runtime (0.6.13261) + sorbet (= 0.6.13261) + sorbet-runtime (= 0.6.13261) spoom (1.7.16) erubi (>= 1.10.0) prism (>= 0.28.0) @@ -251,7 +236,7 @@ GEM unicode-emoji (4.2.0) uri (1.1.1) useragent (0.16.11) - zeitwerk (2.7.5) + zeitwerk (2.8.2) PLATFORMS arm64-darwin @@ -266,7 +251,6 @@ DEPENDENCIES rake rubocop rubocop-gusto - rubocop-sorbet! sorbet tapioca diff --git a/sorbet/rbi/gems/actionpack@8.1.2.rbi b/sorbet/rbi/gems/actionpack@8.1.3.rbi similarity index 99% rename from sorbet/rbi/gems/actionpack@8.1.2.rbi rename to sorbet/rbi/gems/actionpack@8.1.3.rbi index a355e70..c1570a1 100644 --- a/sorbet/rbi/gems/actionpack@8.1.2.rbi +++ b/sorbet/rbi/gems/actionpack@8.1.3.rbi @@ -12419,7 +12419,7 @@ module ActionDispatch::Integration::RequestHelpers def put(path, **args); end end -# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:334 +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:335 module ActionDispatch::Integration::Runner include ::ActionDispatch::Assertions::RoutingAssertions include ::ActionDispatch::Assertions::ResponseAssertions @@ -12429,55 +12429,55 @@ module ActionDispatch::Integration::Runner include ::ActionDispatch::Assertions extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:342 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:343 def initialize(*args, &blk); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:339 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:340 def app; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:412 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:413 def assertions; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:416 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:417 def assertions=(assertions); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def assigns(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:347 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:348 def before_setup; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def cookies(*_arg0, **_arg1, &_arg2); end # Copy the instance variables from the current session instance into the test # instance. # - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:422 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:423 def copy_session_variables!; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:362 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:363 def create_session(app); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:428 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:429 def default_url_options; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:432 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:433 def default_url_options=(options); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def delete(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def follow_redirect!(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def get(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def head(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:352 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:353 def integration_session; end # Open a new session instance. If a block is given, the new session is yielded @@ -12490,45 +12490,45 @@ module ActionDispatch::Integration::Runner # By default, a single session is automatically created for you, but you can use # this method to open multiple sessions that ought to be tested simultaneously. # - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:404 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:405 def open_session; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def patch(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def post(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def put(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:374 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:375 def remove!; end # Reset the current session. This is useful for testing multiple sessions in a # single test case. # - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:358 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:359 def reset!; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:340 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:341 def root_session; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:340 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:341 def root_session=(_arg0); end private # Delegate unhandled messages to the current session instance. # - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:442 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:443 def method_missing(method, *_arg1, **_arg2, &_arg3); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:437 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:438 def respond_to_missing?(method, _); end end -# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:337 +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:338 ActionDispatch::Integration::Runner::APP_SESSIONS = T.let(T.unsafe(nil), Hash) # An instance of this class represents a set of requests and responses performed @@ -12605,7 +12605,7 @@ class ActionDispatch::Integration::Session # # session.host! "www.example.com" # - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:315 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:316 def host!(_arg0); end # The hostname used in the last request. @@ -12624,7 +12624,7 @@ class ActionDispatch::Integration::Session # Returns `true` if the session is mimicking a secure HTTPS request. # # if session.https? - # ... + # # ... # end # # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:189 @@ -12646,7 +12646,7 @@ class ActionDispatch::Integration::Session # * `env`: Additional env to pass, as a Hash. The headers will be merged into # the Rack env hash. # * `xhr`: Set to `true` if you want to make an Ajax request. Adds request - # headers characteristic of XMLHttpRequest e.g. HTTP_X_REQUESTED_WITH. The + # headers characteristic of `XMLHttpRequest`, e.g. `HTTP_X_REQUESTED_WITH`. The # headers will be merged into the Rack env hash. # * `as`: Used for encoding the request with different content type. Supports # `:json` by default and will set the appropriate request headers. The @@ -12661,12 +12661,13 @@ class ActionDispatch::Integration::Session # This method returns the response status, after performing the request. # Furthermore, if this method was called from an ActionDispatch::IntegrationTest # object, then that object's `@response` instance variable will point to a - # Response object which one can use to inspect the details of the response. + # ActionDispatch::TestResponse object which one can use to inspect the details of the response. # # Example: + # # process :get, '/author', params: { since: 201501011400 } # - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:225 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:226 def process(method, path, params: T.unsafe(nil), headers: T.unsafe(nil), env: T.unsafe(nil), xhr: T.unsafe(nil), as: T.unsafe(nil)); end # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:97 @@ -12721,13 +12722,13 @@ class ActionDispatch::Integration::Session private - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:318 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:319 def _mock_session; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:326 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:327 def build_expanded_path(path); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:322 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:323 def build_full_uri(path, env); end class << self @@ -12948,7 +12949,7 @@ ActionDispatch::Integration::Session::DEFAULT_HOST = T.let(T.unsafe(nil), String # Consult the [Rails Testing Guide](https://guides.rubyonrails.org/testing.html) # for more. # -# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:649 +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:650 class ActionDispatch::IntegrationTest < ::ActiveSupport::TestCase include ::ActionDispatch::TestProcess::FixtureFile include ::ActionDispatch::Assertions::RoutingAssertions @@ -12969,7 +12970,7 @@ class ActionDispatch::IntegrationTest < ::ActiveSupport::TestCase extend ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods end -# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:659 +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:660 module ActionDispatch::IntegrationTest::Behavior include ::ActionDispatch::Assertions::RoutingAssertions include ::ActionDispatch::Assertions::ResponseAssertions @@ -12988,30 +12989,30 @@ module ActionDispatch::IntegrationTest::Behavior mixes_in_class_methods ::ActionDispatch::IntegrationTest::Behavior::ClassMethods mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:692 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:693 def app; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:696 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:697 def document_root_element; end end -# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:674 +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:675 module ActionDispatch::IntegrationTest::Behavior::ClassMethods - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:675 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:676 def app; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:683 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:684 def app=(app); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:687 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:688 def register_encoder(*args, **options); end end -# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:652 +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:653 module ActionDispatch::IntegrationTest::UrlOptions extend ::ActiveSupport::Concern - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:654 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:655 def url_options; end end diff --git a/sorbet/rbi/gems/actionview@8.1.2.rbi b/sorbet/rbi/gems/actionview@8.1.3.rbi similarity index 99% rename from sorbet/rbi/gems/actionview@8.1.2.rbi rename to sorbet/rbi/gems/actionview@8.1.3.rbi index 4fc2463..286eb13 100644 --- a/sorbet/rbi/gems/actionview@8.1.2.rbi +++ b/sorbet/rbi/gems/actionview@8.1.3.rbi @@ -8772,10 +8772,10 @@ module ActionView::Helpers::TagHelper # cdata_section("hello]]>world") # # => world]]> # - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:555 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:558 def cdata_section(content); end - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:540 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:543 def class_names(*args); end # Returns an HTML block tag of type +name+ surrounding the +content+. Add @@ -8807,7 +8807,7 @@ module ActionView::Helpers::TagHelper # <% end -%> # # =>
"a"*1_000_000_000:
-#
-# require 'benchmark'
-#
-# puts Benchmark.measure { "a"*1_000_000_000 }
-#
-# On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates:
-#
-# 0.350000 0.400000 0.750000 ( 0.835234)
-#
-# This report shows the user CPU time, system CPU time, the total time
-# (sum of user CPU time, system CPU time, children's user CPU time,
-# and children's system CPU time), and the elapsed real time. The unit
-# of time is seconds.
-#
-# * Do some experiments sequentially using the #bm method:
-#
-# require 'benchmark'
-#
-# n = 5000000
-# Benchmark.bm do |x|
-# x.report { for i in 1..n; a = "1"; end }
-# x.report { n.times do ; a = "1"; end }
-# x.report { 1.upto(n) do ; a = "1"; end }
-# end
-#
-# The result:
-#
-# user system total real
-# 1.010000 0.000000 1.010000 ( 1.014479)
-# 1.000000 0.000000 1.000000 ( 0.998261)
-# 0.980000 0.000000 0.980000 ( 0.981335)
-#
-# * Continuing the previous example, put a label in each report:
-#
-# require 'benchmark'
-#
-# n = 5000000
-# Benchmark.bm(7) do |x|
-# x.report("for:") { for i in 1..n; a = "1"; end }
-# x.report("times:") { n.times do ; a = "1"; end }
-# x.report("upto:") { 1.upto(n) do ; a = "1"; end }
-# end
-#
-# The result:
-#
-# user system total real
-# for: 1.010000 0.000000 1.010000 ( 1.015688)
-# times: 1.000000 0.000000 1.000000 ( 1.003611)
-# upto: 1.030000 0.000000 1.030000 ( 1.028098)
-#
-# * The times for some benchmarks depend on the order in which items
-# are run. These differences are due to the cost of memory
-# allocation and garbage collection. To avoid these discrepancies,
-# the #bmbm method is provided. For example, to compare ways to
-# sort an array of floats:
-#
-# require 'benchmark'
-#
-# array = (1..1000000).map { rand }
-#
-# Benchmark.bmbm do |x|
-# x.report("sort!") { array.dup.sort! }
-# x.report("sort") { array.dup.sort }
-# end
-#
-# The result:
-#
-# Rehearsal -----------------------------------------
-# sort! 1.490000 0.010000 1.500000 ( 1.490520)
-# sort 1.460000 0.000000 1.460000 ( 1.463025)
-# -------------------------------- total: 2.960000sec
-#
-# user system total real
-# sort! 1.460000 0.000000 1.460000 ( 1.460465)
-# sort 1.450000 0.010000 1.460000 ( 1.448327)
-#
-# * Report statistics of sequential experiments with unique labels,
-# using the #benchmark method:
-#
-# require 'benchmark'
-# include Benchmark # we need the CAPTION and FORMAT constants
-#
-# n = 5000000
-# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
-# tf = x.report("for:") { for i in 1..n; a = "1"; end }
-# tt = x.report("times:") { n.times do ; a = "1"; end }
-# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
-# [tf+tt+tu, (tf+tt+tu)/3]
-# end
-#
-# The result:
-#
-# user system total real
-# for: 0.950000 0.000000 0.950000 ( 0.952039)
-# times: 0.980000 0.000000 0.980000 ( 0.984938)
-# upto: 0.950000 0.000000 0.950000 ( 0.946787)
-# >total: 2.880000 0.000000 2.880000 ( 2.883764)
-# >avg: 0.960000 0.000000 0.960000 ( 0.961255)
-#
-# pkg:gem/benchmark#lib/benchmark.rb:123
-module Benchmark
- private
-
- # Invokes the block with a Benchmark::Report object, which
- # may be used to collect and report on the results of individual
- # benchmark tests. Reserves +label_width+ leading spaces for
- # labels on each line. Prints +caption+ at the top of the
- # report, and uses +format+ to format each line.
- # (Note: +caption+ must contain a terminating newline character,
- # see the default Benchmark::Tms::CAPTION for an example.)
- #
- # Returns an array of Benchmark::Tms objects.
- #
- # If the block returns an array of
- # Benchmark::Tms objects, these will be used to format
- # additional lines of output. If +labels+ parameter are
- # given, these are used to label these extra lines.
- #
- # _Note_: Other methods provide a simpler interface to this one, and are
- # suitable for nearly all benchmarking requirements. See the examples in
- # Benchmark, and the #bm and #bmbm methods.
- #
- # Example:
- #
- # require 'benchmark'
- # include Benchmark # we need the CAPTION and FORMAT constants
- #
- # n = 5000000
- # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
- # tf = x.report("for:") { for i in 1..n; a = "1"; end }
- # tt = x.report("times:") { n.times do ; a = "1"; end }
- # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
- # [tf+tt+tu, (tf+tt+tu)/3]
- # end
- #
- # Generates:
- #
- # user system total real
- # for: 0.970000 0.000000 0.970000 ( 0.970493)
- # times: 0.990000 0.000000 0.990000 ( 0.989542)
- # upto: 0.970000 0.000000 0.970000 ( 0.972854)
- # >total: 2.930000 0.000000 2.930000 ( 2.932889)
- # >avg: 0.976667 0.000000 0.976667 ( 0.977630)
- #
- # pkg:gem/benchmark#lib/benchmark.rb:171
- def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end
-
- # A simple interface to the #benchmark method, #bm generates sequential
- # reports with labels. +label_width+ and +labels+ parameters have the same
- # meaning as for #benchmark.
- #
- # require 'benchmark'
- #
- # n = 5000000
- # Benchmark.bm(7) do |x|
- # x.report("for:") { for i in 1..n; a = "1"; end }
- # x.report("times:") { n.times do ; a = "1"; end }
- # x.report("upto:") { 1.upto(n) do ; a = "1"; end }
- # end
- #
- # Generates:
- #
- # user system total real
- # for: 0.960000 0.000000 0.960000 ( 0.957966)
- # times: 0.960000 0.000000 0.960000 ( 0.960423)
- # upto: 0.950000 0.000000 0.950000 ( 0.954864)
- #
- # pkg:gem/benchmark#lib/benchmark.rb:216
- def bm(label_width = T.unsafe(nil), *labels, &blk); end
-
- # Sometimes benchmark results are skewed because code executed
- # earlier encounters different garbage collection overheads than
- # that run later. #bmbm attempts to minimize this effect by running
- # the tests twice, the first time as a rehearsal in order to get the
- # runtime environment stable, the second time for
- # real. GC.start is executed before the start of each of
- # the real timings; the cost of this is not included in the
- # timings. In reality, though, there's only so much that #bmbm can
- # do, and the results are not guaranteed to be isolated from garbage
- # collection and other effects.
- #
- # Because #bmbm takes two passes through the tests, it can
- # calculate the required label width.
- #
- # require 'benchmark'
- #
- # array = (1..1000000).map { rand }
- #
- # Benchmark.bmbm do |x|
- # x.report("sort!") { array.dup.sort! }
- # x.report("sort") { array.dup.sort }
- # end
- #
- # Generates:
- #
- # Rehearsal -----------------------------------------
- # sort! 1.440000 0.010000 1.450000 ( 1.446833)
- # sort 1.440000 0.000000 1.440000 ( 1.448257)
- # -------------------------------- total: 2.890000sec
- #
- # user system total real
- # sort! 1.460000 0.000000 1.460000 ( 1.458065)
- # sort 1.450000 0.000000 1.450000 ( 1.455963)
- #
- # #bmbm yields a Benchmark::Job object and returns an array of
- # Benchmark::Tms objects.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:258
- def bmbm(width = T.unsafe(nil)); end
-
- # Returns the time used to execute the given block as a
- # Benchmark::Tms object. Takes +label+ option.
- #
- # require 'benchmark'
- #
- # n = 1000000
- #
- # time = Benchmark.measure do
- # n.times { a = "1" }
- # end
- # puts time
- #
- # Generates:
- #
- # 0.220000 0.000000 0.220000 ( 0.227313)
- #
- # pkg:gem/benchmark#lib/benchmark.rb:303
- def measure(label = T.unsafe(nil)); end
-
- # Returns the elapsed real time used to execute the given block.
- # The unit of time is milliseconds.
- #
- # Benchmark.ms { "a" * 1_000_000_000 }
- # #=> 509.8029999935534
- #
- # pkg:gem/benchmark#lib/benchmark.rb:335
- def ms; end
-
- # Returns the elapsed real time used to execute the given block.
- # The unit of time is seconds.
- #
- # Benchmark.realtime { "a" * 1_000_000_000 }
- # #=> 0.5098029999935534
- #
- # pkg:gem/benchmark#lib/benchmark.rb:322
- def realtime; end
-
- class << self
- # Invokes the block with a Benchmark::Report object, which
- # may be used to collect and report on the results of individual
- # benchmark tests. Reserves +label_width+ leading spaces for
- # labels on each line. Prints +caption+ at the top of the
- # report, and uses +format+ to format each line.
- # (Note: +caption+ must contain a terminating newline character,
- # see the default Benchmark::Tms::CAPTION for an example.)
- #
- # Returns an array of Benchmark::Tms objects.
- #
- # If the block returns an array of
- # Benchmark::Tms objects, these will be used to format
- # additional lines of output. If +labels+ parameter are
- # given, these are used to label these extra lines.
- #
- # _Note_: Other methods provide a simpler interface to this one, and are
- # suitable for nearly all benchmarking requirements. See the examples in
- # Benchmark, and the #bm and #bmbm methods.
- #
- # Example:
- #
- # require 'benchmark'
- # include Benchmark # we need the CAPTION and FORMAT constants
- #
- # n = 5000000
- # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
- # tf = x.report("for:") { for i in 1..n; a = "1"; end }
- # tt = x.report("times:") { n.times do ; a = "1"; end }
- # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
- # [tf+tt+tu, (tf+tt+tu)/3]
- # end
- #
- # Generates:
- #
- # user system total real
- # for: 0.970000 0.000000 0.970000 ( 0.970493)
- # times: 0.990000 0.000000 0.990000 ( 0.989542)
- # upto: 0.970000 0.000000 0.970000 ( 0.972854)
- # >total: 2.930000 0.000000 2.930000 ( 2.932889)
- # >avg: 0.976667 0.000000 0.976667 ( 0.977630)
- #
- # pkg:gem/benchmark#lib/benchmark.rb:341
- def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end
-
- # A simple interface to the #benchmark method, #bm generates sequential
- # reports with labels. +label_width+ and +labels+ parameters have the same
- # meaning as for #benchmark.
- #
- # require 'benchmark'
- #
- # n = 5000000
- # Benchmark.bm(7) do |x|
- # x.report("for:") { for i in 1..n; a = "1"; end }
- # x.report("times:") { n.times do ; a = "1"; end }
- # x.report("upto:") { 1.upto(n) do ; a = "1"; end }
- # end
- #
- # Generates:
- #
- # user system total real
- # for: 0.960000 0.000000 0.960000 ( 0.957966)
- # times: 0.960000 0.000000 0.960000 ( 0.960423)
- # upto: 0.950000 0.000000 0.950000 ( 0.954864)
- #
- # pkg:gem/benchmark#lib/benchmark.rb:341
- def bm(label_width = T.unsafe(nil), *labels, &blk); end
-
- # Sometimes benchmark results are skewed because code executed
- # earlier encounters different garbage collection overheads than
- # that run later. #bmbm attempts to minimize this effect by running
- # the tests twice, the first time as a rehearsal in order to get the
- # runtime environment stable, the second time for
- # real. GC.start is executed before the start of each of
- # the real timings; the cost of this is not included in the
- # timings. In reality, though, there's only so much that #bmbm can
- # do, and the results are not guaranteed to be isolated from garbage
- # collection and other effects.
- #
- # Because #bmbm takes two passes through the tests, it can
- # calculate the required label width.
- #
- # require 'benchmark'
- #
- # array = (1..1000000).map { rand }
- #
- # Benchmark.bmbm do |x|
- # x.report("sort!") { array.dup.sort! }
- # x.report("sort") { array.dup.sort }
- # end
- #
- # Generates:
- #
- # Rehearsal -----------------------------------------
- # sort! 1.440000 0.010000 1.450000 ( 1.446833)
- # sort 1.440000 0.000000 1.440000 ( 1.448257)
- # -------------------------------- total: 2.890000sec
- #
- # user system total real
- # sort! 1.460000 0.000000 1.460000 ( 1.458065)
- # sort 1.450000 0.000000 1.450000 ( 1.455963)
- #
- # #bmbm yields a Benchmark::Job object and returns an array of
- # Benchmark::Tms objects.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:341
- def bmbm(width = T.unsafe(nil)); end
-
- # Returns the time used to execute the given block as a
- # Benchmark::Tms object. Takes +label+ option.
- #
- # require 'benchmark'
- #
- # n = 1000000
- #
- # time = Benchmark.measure do
- # n.times { a = "1" }
- # end
- # puts time
- #
- # Generates:
- #
- # 0.220000 0.000000 0.220000 ( 0.227313)
- #
- # pkg:gem/benchmark#lib/benchmark.rb:341
- def measure(label = T.unsafe(nil)); end
-
- # Returns the elapsed real time used to execute the given block.
- # The unit of time is milliseconds.
- #
- # Benchmark.ms { "a" * 1_000_000_000 }
- # #=> 509.8029999935534
- #
- # pkg:gem/benchmark#lib/benchmark.rb:341
- def ms; end
-
- # Returns the elapsed real time used to execute the given block.
- # The unit of time is seconds.
- #
- # Benchmark.realtime { "a" * 1_000_000_000 }
- # #=> 0.5098029999935534
- #
- # pkg:gem/benchmark#lib/benchmark.rb:341
- def realtime; end
- end
-end
-
-# A Job is a sequence of labelled blocks to be processed by the
-# Benchmark.bmbm method. It is of little direct interest to the user.
-#
-# pkg:gem/benchmark#lib/benchmark.rb:347
-class Benchmark::Job
- # Returns an initialized Job instance.
- # Usually, one doesn't call this method directly, as new
- # Job objects are created by the #bmbm method.
- # +width+ is a initial value for the label offset used in formatting;
- # the #bmbm method passes its +width+ argument to this constructor.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:355
- def initialize(width); end
-
- # Registers the given label and block pair in the job list.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:363
- def item(label = T.unsafe(nil), &blk); end
-
- # An array of 2-element arrays, consisting of label and block pairs.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:375
- def list; end
-
- # pkg:gem/benchmark#lib/benchmark.rb:372
- def report(label = T.unsafe(nil), &blk); end
-
- # Length of the widest label in the #list.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:378
- def width; end
-end
-
-# This class is used by the Benchmark.benchmark and Benchmark.bm methods.
-# It is of little direct interest to the user.
-#
-# pkg:gem/benchmark#lib/benchmark.rb:385
-class Benchmark::Report
- # Returns an initialized Report instance.
- # Usually, one doesn't call this method directly, as new
- # Report objects are created by the #benchmark and #bm methods.
- # +width+ and +format+ are the label offset and
- # format string used by Tms#format.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:393
- def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); end
-
- # An array of Benchmark::Tms objects representing each item.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:412
- def format; end
-
- # Prints the +label+ and measured time for the block,
- # formatted by +format+. See Tms#format for the
- # formatting rules.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:402
- def item(label = T.unsafe(nil), *format, &blk); end
-
- # An array of Benchmark::Tms objects representing each item.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:412
- def list; end
-
- # pkg:gem/benchmark#lib/benchmark.rb:409
- def report(label = T.unsafe(nil), *format, &blk); end
-
- # An array of Benchmark::Tms objects representing each item.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:412
- def width; end
-end
-
-# A data object, representing the times associated with a benchmark
-# measurement.
-#
-# pkg:gem/benchmark#lib/benchmark.rb:421
-class Benchmark::Tms
- # Returns an initialized Tms object which has
- # +utime+ as the user CPU time, +stime+ as the system CPU time,
- # +cutime+ as the children's user CPU time, +cstime+ as the children's
- # system CPU time, +real+ as the elapsed real time and +label+ as the label.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:456
- def initialize(utime = T.unsafe(nil), stime = T.unsafe(nil), cutime = T.unsafe(nil), cstime = T.unsafe(nil), real = T.unsafe(nil), label = T.unsafe(nil)); end
-
- # Returns a new Tms object obtained by memberwise multiplication
- # of the individual times for this Tms object by +x+.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:504
- def *(x); end
-
- # Returns a new Tms object obtained by memberwise summation
- # of the individual times for this Tms object with those of the +other+
- # Tms object.
- # This method and #/() are useful for taking statistics.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:491
- def +(other); end
-
- # Returns a new Tms object obtained by memberwise subtraction
- # of the individual times for the +other+ Tms object from those of this
- # Tms object.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:498
- def -(other); end
-
- # Returns a new Tms object obtained by memberwise division
- # of the individual times for this Tms object by +x+.
- # This method and #+() are useful for taking statistics.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:511
- def /(x); end
-
- # Returns a new Tms object whose times are the sum of the times for this
- # Tms object, plus the time required to execute the code block (+blk+).
- #
- # pkg:gem/benchmark#lib/benchmark.rb:465
- def add(&blk); end
-
- # An in-place version of #add.
- # Changes the times of this Tms object by making it the sum of the times
- # for this Tms object, plus the time required to execute
- # the code block (+blk+).
- #
- # pkg:gem/benchmark#lib/benchmark.rb:475
- def add!(&blk); end
-
- # System CPU time of children
- #
- # pkg:gem/benchmark#lib/benchmark.rb:439
- def cstime; end
-
- # User CPU time of children
- #
- # pkg:gem/benchmark#lib/benchmark.rb:436
- def cutime; end
-
- # Returns the contents of this Tms object as
- # a formatted string, according to a +format+ string
- # like that passed to Kernel.format. In addition, #format
- # accepts the following extensions:
- #
- # %u:: Replaced by the user CPU time, as reported by Tms#utime.
- # %y:: Replaced by the system CPU time, as reported by Tms#stime (Mnemonic: y of "s*y*stem")
- # %U:: Replaced by the children's user CPU time, as reported by Tms#cutime
- # %Y:: Replaced by the children's system CPU time, as reported by Tms#cstime
- # %t:: Replaced by the total CPU time, as reported by Tms#total
- # %r:: Replaced by the elapsed real time, as reported by Tms#real
- # %n:: Replaced by the label string, as reported by Tms#label (Mnemonic: n of "*n*ame")
- #
- # If +format+ is not given, FORMAT is used as default value, detailing the
- # user, system, total and real elapsed time.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:530
- def format(format = T.unsafe(nil), *args); end
-
- # Label
- #
- # pkg:gem/benchmark#lib/benchmark.rb:448
- def label; end
-
- # Elapsed real time
- #
- # pkg:gem/benchmark#lib/benchmark.rb:442
- def real; end
-
- # System CPU time
- #
- # pkg:gem/benchmark#lib/benchmark.rb:433
- def stime; end
-
- # Returns a new 6-element array, consisting of the
- # label, user CPU time, system CPU time, children's
- # user CPU time, children's system CPU time and elapsed
- # real time.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:555
- def to_a; end
-
- # Returns a hash containing the same data as `to_a`.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:562
- def to_h; end
-
- # Same as #format.
- #
- # pkg:gem/benchmark#lib/benchmark.rb:545
- def to_s; end
-
- # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+
- #
- # pkg:gem/benchmark#lib/benchmark.rb:445
- def total; end
-
- # User CPU time
- #
- # pkg:gem/benchmark#lib/benchmark.rb:430
- def utime; end
-
- protected
-
- # Returns a new Tms object obtained by memberwise operation +op+
- # of the individual times for this Tms object with those of the other
- # Tms object (+x+).
- #
- # +op+ can be a mathematical operation such as +, -,
- # *, /
- #
- # pkg:gem/benchmark#lib/benchmark.rb:583
- def memberwise(op, x); end
-end
-
-# pkg:gem/benchmark#lib/benchmark.rb:125
-Benchmark::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/bigdecimal@4.0.1.rbi b/sorbet/rbi/gems/bigdecimal@4.0.1.rbi
deleted file mode 100644
index 29f24d6..0000000
--- a/sorbet/rbi/gems/bigdecimal@4.0.1.rbi
+++ /dev/null
@@ -1,450 +0,0 @@
-# typed: false
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `bigdecimal` gem.
-# Please instead update this file by running `bin/tapioca gem bigdecimal`.
-
-
-# pkg:gem/bigdecimal#lib/bigdecimal.rb:10
-class BigDecimal < ::Numeric
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def %(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def *(_arg0); end
-
- # call-seq:
- # self ** other -> bigdecimal
- #
- # Returns the \BigDecimal value of +self+ raised to power +other+:
- #
- # b = BigDecimal('3.14')
- # b ** 2 # => 0.98596e1
- # b ** 2.0 # => 0.98596e1
- # b ** Rational(2, 1) # => 0.98596e1
- #
- # Related: BigDecimal#power.
- #
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:77
- def **(y); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def +(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def +@; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def -(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def -@; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def /(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def <(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def <=(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def <=>(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def ==(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def ===(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def >(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def >=(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def _decimal_shift(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def _dump(*_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def abs; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def add(_arg0, _arg1); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def ceil(*_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def clone; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def coerce(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def div(*_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def divmod(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def dup; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def eql?(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def exponent; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def finite?; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def fix; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def floor(*_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def frac; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def hash; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def infinite?; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def inspect; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def modulo(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def mult(_arg0, _arg1); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def n_significant_digits; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def nan?; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def nonzero?; end
-
- # call-seq:
- # power(n)
- # power(n, prec)
- #
- # Returns the value raised to the power of n.
- #
- # Also available as the operator **.
- #
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:97
- def power(y, prec = T.unsafe(nil)); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def precision; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def precision_scale; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def quo(*_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def remainder(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def round(*_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def scale; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def sign; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def split; end
-
- # Returns the square root of the value.
- #
- # Result has at least prec significant digits.
- #
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:212
- def sqrt(prec); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def sub(_arg0, _arg1); end
-
- # call-seq:
- # a.to_d -> bigdecimal
- #
- # Returns self.
- #
- # require 'bigdecimal/util'
- #
- # d = BigDecimal("3.14")
- # d.to_d # => 0.314e1
- #
- # pkg:gem/bigdecimal#lib/bigdecimal/util.rb:110
- def to_d; end
-
- # call-seq:
- # a.to_digits -> string
- #
- # Converts a BigDecimal to a String of the form "nnnnnn.mmm".
- # This method is deprecated; use BigDecimal#to_s("F") instead.
- #
- # require 'bigdecimal/util'
- #
- # d = BigDecimal("3.14")
- # d.to_digits # => "3.14"
- #
- # pkg:gem/bigdecimal#lib/bigdecimal/util.rb:90
- def to_digits; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def to_f; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def to_i; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def to_int; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def to_r; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def to_s(format = T.unsafe(nil)); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def truncate(*_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def zero?; end
-
- class << self
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def _load(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def double_fig; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def interpret_loosely(_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def limit(*_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def mode(*_arg0); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def save_exception_mode; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def save_limit; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:10
- def save_rounding_mode; end
- end
-end
-
-# pkg:gem/bigdecimal#lib/bigdecimal.rb:14
-module BigDecimal::Internal
- class << self
- # Coerce x to BigDecimal with the specified precision.
- # TODO: some methods (example: BigMath.exp) require more precision than specified to coerce.
- #
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:18
- def coerce_to_bigdecimal(x, prec, method_name); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:30
- def coerce_validate_prec(prec, method_name, accept_zero: T.unsafe(nil)); end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:50
- def infinity_computation_result; end
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:57
- def nan_computation_result; end
- end
-end
-
-# Core BigMath methods for BigDecimal (log, exp) are defined here.
-# Other methods (sin, cos, atan) are defined in 'bigdecimal/math.rb'.
-#
-# --
-# Contents:
-# sqrt(x, prec)
-# cbrt(x, prec)
-# hypot(x, y, prec)
-# sin (x, prec)
-# cos (x, prec)
-# tan (x, prec)
-# asin(x, prec)
-# acos(x, prec)
-# atan(x, prec)
-# atan2(y, x, prec)
-# sinh (x, prec)
-# cosh (x, prec)
-# tanh (x, prec)
-# asinh(x, prec)
-# acosh(x, prec)
-# atanh(x, prec)
-# log2 (x, prec)
-# log10(x, prec)
-# log1p(x, prec)
-# expm1(x, prec)
-# erf (x, prec)
-# erfc(x, prec)
-# gamma(x, prec)
-# lgamma(x, prec)
-# frexp(x)
-# ldexp(x, exponent)
-# PI (prec)
-# E (prec) == exp(1.0,prec)
-#
-# where:
-# x, y ... BigDecimal number to be computed.
-# prec ... Number of digits to be obtained.
-# ++
-#
-# Provides mathematical functions.
-#
-# Example:
-#
-# require "bigdecimal/math"
-#
-# include BigMath
-#
-# a = BigDecimal((PI(49)/2).to_s)
-# puts sin(a,100) # => 0.9999999999...9999999986e0
-#
-# pkg:gem/bigdecimal#lib/bigdecimal.rb:240
-module BigMath
- private
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:310
- def _exp_taylor(x, prec); end
-
- # call-seq:
- # BigMath.exp(decimal, numeric) -> BigDecimal
- #
- # Computes the value of e (the base of natural logarithms) raised to the
- # power of +decimal+, to the specified number of digits of precision.
- #
- # If +decimal+ is infinity, returns Infinity.
- #
- # If +decimal+ is NaN, returns NaN.
- #
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:332
- def exp(x, prec); end
-
- # call-seq:
- # BigMath.log(decimal, numeric) -> BigDecimal
- #
- # Computes the natural logarithm of +decimal+ to the specified number of
- # digits of precision, +numeric+.
- #
- # If +decimal+ is zero or negative, raises Math::DomainError.
- #
- # If +decimal+ is positive infinity, returns Infinity.
- #
- # If +decimal+ is NaN, returns NaN.
- #
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:255
- def log(x, prec); end
-
- class << self
- # call-seq:
- # BigMath.exp(decimal, numeric) -> BigDecimal
- #
- # Computes the value of e (the base of natural logarithms) raised to the
- # power of +decimal+, to the specified number of digits of precision.
- #
- # If +decimal+ is infinity, returns Infinity.
- #
- # If +decimal+ is NaN, returns NaN.
- #
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:332
- def exp(x, prec); end
-
- # call-seq:
- # BigMath.log(decimal, numeric) -> BigDecimal
- #
- # Computes the natural logarithm of +decimal+ to the specified number of
- # digits of precision, +numeric+.
- #
- # If +decimal+ is zero or negative, raises Math::DomainError.
- #
- # If +decimal+ is positive infinity, returns Infinity.
- #
- # If +decimal+ is NaN, returns NaN.
- #
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:255
- def log(x, prec); end
-
- private
-
- # pkg:gem/bigdecimal#lib/bigdecimal.rb:310
- def _exp_taylor(x, prec); end
- end
-end
-
-# pkg:gem/bigdecimal#lib/bigdecimal/util.rb:141
-class Complex < ::Numeric
- # call-seq:
- # cmp.to_d -> bigdecimal
- # cmp.to_d(precision) -> bigdecimal
- #
- # Returns the value as a BigDecimal.
- # If the imaginary part is not +0+, an error is raised
- #
- # The +precision+ parameter is used to determine the number of
- # significant digits for the result. When +precision+ is set to +0+,
- # the number of digits to represent the float being converted is determined
- # automatically.
- # The default +precision+ is +0+.
- #
- # require 'bigdecimal'
- # require 'bigdecimal/util'
- #
- # Complex(0.1234567, 0).to_d(4) # => 0.1235e0
- # Complex(Rational(22, 7), 0).to_d(3) # => 0.314e1
- # Complex(1, 1).to_d # raises ArgumentError
- #
- # See also Kernel.BigDecimal.
- #
- # pkg:gem/bigdecimal#lib/bigdecimal/util.rb:164
- def to_d(precision = T.unsafe(nil)); end
-end
-
-# pkg:gem/bigdecimal#lib/bigdecimal/util.rb:116
-class Rational < ::Numeric
- # call-seq:
- # rat.to_d(precision) -> bigdecimal
- #
- # Returns the value as a BigDecimal.
- #
- # The +precision+ parameter is used to determine the number of
- # significant digits for the result. When +precision+ is set to +0+,
- # the number of digits to represent the float being converted is determined
- # automatically.
- # The default +precision+ is +0+.
- #
- # require 'bigdecimal'
- # require 'bigdecimal/util'
- #
- # Rational(22, 7).to_d(3) # => 0.314e1
- #
- # See also Kernel.BigDecimal.
- #
- # pkg:gem/bigdecimal#lib/bigdecimal/util.rb:135
- def to_d(precision = T.unsafe(nil)); end
-end
diff --git a/sorbet/rbi/gems/date@3.5.1.rbi b/sorbet/rbi/gems/date@3.5.1.rbi
deleted file mode 100644
index 2135e86..0000000
--- a/sorbet/rbi/gems/date@3.5.1.rbi
+++ /dev/null
@@ -1,391 +0,0 @@
-# typed: false
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `date` gem.
-# Please instead update this file by running `bin/tapioca gem date`.
-
-
-# pkg:gem/date#lib/date.rb:4
-class Date
- include ::Comparable
-
- # pkg:gem/date#lib/date.rb:4
- def initialize(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def +(other); end
-
- # pkg:gem/date#lib/date.rb:4
- def -(other); end
-
- # pkg:gem/date#lib/date.rb:4
- def <<(_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def <=>(other); end
-
- # pkg:gem/date#lib/date.rb:4
- def ===(_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def >>(_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def ajd; end
-
- # pkg:gem/date#lib/date.rb:4
- def amjd; end
-
- # pkg:gem/date#lib/date.rb:4
- def asctime; end
-
- # pkg:gem/date#lib/date.rb:4
- def ctime; end
-
- # pkg:gem/date#lib/date.rb:4
- def cwday; end
-
- # pkg:gem/date#lib/date.rb:4
- def cweek; end
-
- # pkg:gem/date#lib/date.rb:4
- def cwyear; end
-
- # pkg:gem/date#lib/date.rb:4
- def day; end
-
- # pkg:gem/date#lib/date.rb:4
- def day_fraction; end
-
- # pkg:gem/date#lib/date.rb:4
- def deconstruct_keys(_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def downto(_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def england; end
-
- # pkg:gem/date#lib/date.rb:4
- def eql?(_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def friday?; end
-
- # pkg:gem/date#lib/date.rb:4
- def gregorian; end
-
- # pkg:gem/date#lib/date.rb:4
- def gregorian?; end
-
- # pkg:gem/date#lib/date.rb:4
- def hash; end
-
- # pkg:gem/date#lib/date.rb:4
- def httpdate; end
-
- # call-seq:
- # infinite? -> false
- #
- # Returns +false+
- #
- # pkg:gem/date#lib/date.rb:13
- def infinite?; end
-
- # pkg:gem/date#lib/date.rb:4
- def inspect; end
-
- # pkg:gem/date#lib/date.rb:4
- def iso8601; end
-
- # pkg:gem/date#lib/date.rb:4
- def italy; end
-
- # pkg:gem/date#lib/date.rb:4
- def jd; end
-
- # pkg:gem/date#lib/date.rb:4
- def jisx0301; end
-
- # pkg:gem/date#lib/date.rb:4
- def julian; end
-
- # pkg:gem/date#lib/date.rb:4
- def julian?; end
-
- # pkg:gem/date#lib/date.rb:4
- def ld; end
-
- # pkg:gem/date#lib/date.rb:4
- def leap?; end
-
- # pkg:gem/date#lib/date.rb:4
- def marshal_dump; end
-
- # pkg:gem/date#lib/date.rb:4
- def marshal_load(_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def mday; end
-
- # pkg:gem/date#lib/date.rb:4
- def mjd; end
-
- # pkg:gem/date#lib/date.rb:4
- def mon; end
-
- # pkg:gem/date#lib/date.rb:4
- def monday?; end
-
- # pkg:gem/date#lib/date.rb:4
- def month; end
-
- # pkg:gem/date#lib/date.rb:4
- def new_start(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def next; end
-
- # pkg:gem/date#lib/date.rb:4
- def next_day(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def next_month(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def next_year(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def prev_day(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def prev_month(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def prev_year(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def rfc2822; end
-
- # pkg:gem/date#lib/date.rb:4
- def rfc3339; end
-
- # pkg:gem/date#lib/date.rb:4
- def rfc822; end
-
- # pkg:gem/date#lib/date.rb:4
- def saturday?; end
-
- # pkg:gem/date#lib/date.rb:4
- def start; end
-
- # pkg:gem/date#lib/date.rb:4
- def step(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def strftime(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def succ; end
-
- # pkg:gem/date#lib/date.rb:4
- def sunday?; end
-
- # pkg:gem/date#lib/date.rb:4
- def thursday?; end
-
- # pkg:gem/date#lib/date.rb:4
- def to_date; end
-
- # pkg:gem/date#lib/date.rb:4
- def to_datetime; end
-
- # pkg:gem/date#lib/date.rb:4
- def to_s; end
-
- # pkg:gem/date#lib/date.rb:4
- def to_time(form = T.unsafe(nil)); end
-
- # pkg:gem/date#lib/date.rb:4
- def tuesday?; end
-
- # pkg:gem/date#lib/date.rb:4
- def upto(_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def wday; end
-
- # pkg:gem/date#lib/date.rb:4
- def wednesday?; end
-
- # pkg:gem/date#lib/date.rb:4
- def xmlschema; end
-
- # pkg:gem/date#lib/date.rb:4
- def yday; end
-
- # pkg:gem/date#lib/date.rb:4
- def year; end
-
- private
-
- # pkg:gem/date#lib/date.rb:4
- def hour; end
-
- # pkg:gem/date#lib/date.rb:4
- def initialize_copy(_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def min; end
-
- # pkg:gem/date#lib/date.rb:4
- def minute; end
-
- # pkg:gem/date#lib/date.rb:4
- def sec; end
-
- # pkg:gem/date#lib/date.rb:4
- def second; end
-
- class << self
- # pkg:gem/date#lib/date.rb:4
- def _httpdate(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def _iso8601(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def _jisx0301(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def _load(_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def _parse(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def _rfc2822(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def _rfc3339(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def _rfc822(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def _strptime(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def _xmlschema(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def civil(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def commercial(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def gregorian_leap?(_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def httpdate(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def iso8601(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def jd(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def jisx0301(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def julian_leap?(_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def leap?(_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def ordinal(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def parse(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def rfc2822(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def rfc3339(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def rfc822(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def strptime(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def today(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def valid_civil?(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def valid_commercial?(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def valid_date?(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def valid_jd?(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def valid_ordinal?(*_arg0); end
-
- # pkg:gem/date#lib/date.rb:4
- def xmlschema(*_arg0); end
- end
-end
-
-# pkg:gem/date#lib/date.rb:17
-class Date::Infinity < ::Numeric
- # pkg:gem/date#lib/date.rb:19
- def initialize(d = T.unsafe(nil)); end
-
- # pkg:gem/date#lib/date.rb:33
- def +@; end
-
- # pkg:gem/date#lib/date.rb:32
- def -@; end
-
- # pkg:gem/date#lib/date.rb:35
- def <=>(other); end
-
- # pkg:gem/date#lib/date.rb:30
- def abs; end
-
- # pkg:gem/date#lib/date.rb:51
- def coerce(other); end
-
- # pkg:gem/date#lib/date.rb:26
- def finite?; end
-
- # pkg:gem/date#lib/date.rb:27
- def infinite?; end
-
- # pkg:gem/date#lib/date.rb:28
- def nan?; end
-
- # pkg:gem/date#lib/date.rb:59
- def to_f; end
-
- # pkg:gem/date#lib/date.rb:25
- def zero?; end
-
- protected
-
- # pkg:gem/date#lib/date.rb:21
- def d; end
-end
-
-# pkg:gem/date#lib/date.rb:7
-Date::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/drb@2.2.3.rbi b/sorbet/rbi/gems/drb@2.2.3.rbi
deleted file mode 100644
index a8dd54b..0000000
--- a/sorbet/rbi/gems/drb@2.2.3.rbi
+++ /dev/null
@@ -1,1589 +0,0 @@
-# typed: false
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `drb` gem.
-# Please instead update this file by running `bin/tapioca gem drb`.
-
-
-# == Overview
-#
-# dRuby is a distributed object system for Ruby. It is written in
-# pure Ruby and uses its own protocol. No add-in services are needed
-# beyond those provided by the Ruby runtime, such as TCP sockets. It
-# does not rely on or interoperate with other distributed object
-# systems such as CORBA, RMI, or .NET.
-#
-# dRuby allows methods to be called in one Ruby process upon a Ruby
-# object located in another Ruby process, even on another machine.
-# References to objects can be passed between processes. Method
-# arguments and return values are dumped and loaded in marshalled
-# format. All of this is done transparently to both the caller of the
-# remote method and the object that it is called upon.
-#
-# An object in a remote process is locally represented by a
-# DRb::DRbObject instance. This acts as a sort of proxy for the
-# remote object. Methods called upon this DRbObject instance are
-# forwarded to its remote object. This is arranged dynamically at run
-# time. There are no statically declared interfaces for remote
-# objects, such as CORBA's IDL.
-#
-# dRuby calls made into a process are handled by a DRb::DRbServer
-# instance within that process. This reconstitutes the method call,
-# invokes it upon the specified local object, and returns the value to
-# the remote caller. Any object can receive calls over dRuby. There
-# is no need to implement a special interface, or mixin special
-# functionality. Nor, in the general case, does an object need to
-# explicitly register itself with a DRbServer in order to receive
-# dRuby calls.
-#
-# One process wishing to make dRuby calls upon another process must
-# somehow obtain an initial reference to an object in the remote
-# process by some means other than as the return value of a remote
-# method call, as there is initially no remote object reference it can
-# invoke a method upon. This is done by attaching to the server by
-# URI. Each DRbServer binds itself to a URI such as
-# 'druby://example.com:8787'. A DRbServer can have an object attached
-# to it that acts as the server's *front* *object*. A DRbObject can
-# be explicitly created from the server's URI. This DRbObject's
-# remote object will be the server's front object. This front object
-# can then return references to other Ruby objects in the DRbServer's
-# process.
-#
-# Method calls made over dRuby behave largely the same as normal Ruby
-# method calls made within a process. Method calls with blocks are
-# supported, as are raising exceptions. In addition to a method's
-# standard errors, a dRuby call may also raise one of the
-# dRuby-specific errors, all of which are subclasses of DRb::DRbError.
-#
-# Any type of object can be passed as an argument to a dRuby call or
-# returned as its return value. By default, such objects are dumped
-# or marshalled at the local end, then loaded or unmarshalled at the
-# remote end. The remote end therefore receives a copy of the local
-# object, not a distributed reference to it; methods invoked upon this
-# copy are executed entirely in the remote process, not passed on to
-# the local original. This has semantics similar to pass-by-value.
-#
-# However, if an object cannot be marshalled, a dRuby reference to it
-# is passed or returned instead. This will turn up at the remote end
-# as a DRbObject instance. All methods invoked upon this remote proxy
-# are forwarded to the local object, as described in the discussion of
-# DRbObjects. This has semantics similar to the normal Ruby
-# pass-by-reference.
-#
-# The easiest way to signal that we want an otherwise marshallable
-# object to be passed or returned as a DRbObject reference, rather
-# than marshalled and sent as a copy, is to include the
-# DRb::DRbUndumped mixin module.
-#
-# dRuby supports calling remote methods with blocks. As blocks (or
-# rather the Proc objects that represent them) are not marshallable,
-# the block executes in the local, not the remote, context. Each
-# value yielded to the block is passed from the remote object to the
-# local block, then the value returned by each block invocation is
-# passed back to the remote execution context to be collected, before
-# the collected values are finally returned to the local context as
-# the return value of the method invocation.
-#
-# == Examples of usage
-#
-# For more dRuby samples, see the +samples+ directory in the full
-# dRuby distribution.
-#
-# === dRuby in client/server mode
-#
-# This illustrates setting up a simple client-server drb
-# system. Run the server and client code in different terminals,
-# starting the server code first.
-#
-# ==== Server code
-#
-# require 'drb/drb'
-#
-# # The URI for the server to connect to
-# URI="druby://localhost:8787"
-#
-# class TimeServer
-#
-# def get_current_time
-# return Time.now
-# end
-#
-# end
-#
-# # The object that handles requests on the server
-# FRONT_OBJECT=TimeServer.new
-#
-# DRb.start_service(URI, FRONT_OBJECT)
-# # Wait for the drb server thread to finish before exiting.
-# DRb.thread.join
-#
-# ==== Client code
-#
-# require 'drb/drb'
-#
-# # The URI to connect to
-# SERVER_URI="druby://localhost:8787"
-#
-# # Start a local DRbServer to handle callbacks.
-# #
-# # Not necessary for this small example, but will be required
-# # as soon as we pass a non-marshallable object as an argument
-# # to a dRuby call.
-# #
-# # Note: this must be called at least once per process to take any effect.
-# # This is particularly important if your application forks.
-# DRb.start_service
-#
-# timeserver = DRbObject.new_with_uri(SERVER_URI)
-# puts timeserver.get_current_time
-#
-# === Remote objects under dRuby
-#
-# This example illustrates returning a reference to an object
-# from a dRuby call. The Logger instances live in the server
-# process. References to them are returned to the client process,
-# where methods can be invoked upon them. These methods are
-# executed in the server process.
-#
-# ==== Server code
-#
-# require 'drb/drb'
-#
-# URI="druby://localhost:8787"
-#
-# class Logger
-#
-# # Make dRuby send Logger instances as dRuby references,
-# # not copies.
-# include DRb::DRbUndumped
-#
-# def initialize(n, fname)
-# @name = n
-# @filename = fname
-# end
-#
-# def log(message)
-# File.open(@filename, "a") do |f|
-# f.puts("#{Time.now}: #{@name}: #{message}")
-# end
-# end
-#
-# end
-#
-# # We have a central object for creating and retrieving loggers.
-# # This retains a local reference to all loggers created. This
-# # is so an existing logger can be looked up by name, but also
-# # to prevent loggers from being garbage collected. A dRuby
-# # reference to an object is not sufficient to prevent it being
-# # garbage collected!
-# class LoggerFactory
-#
-# def initialize(bdir)
-# @basedir = bdir
-# @loggers = {}
-# end
-#
-# def get_logger(name)
-# if !@loggers.has_key? name
-# # make the filename safe, then declare it to be so
-# fname = name.gsub(/[.\/\\\:]/, "_")
-# @loggers[name] = Logger.new(name, @basedir + "/" + fname)
-# end
-# return @loggers[name]
-# end
-#
-# end
-#
-# FRONT_OBJECT=LoggerFactory.new("/tmp/dlog")
-#
-# DRb.start_service(URI, FRONT_OBJECT)
-# DRb.thread.join
-#
-# ==== Client code
-#
-# require 'drb/drb'
-#
-# SERVER_URI="druby://localhost:8787"
-#
-# DRb.start_service
-#
-# log_service=DRbObject.new_with_uri(SERVER_URI)
-#
-# ["loga", "logb", "logc"].each do |logname|
-#
-# logger=log_service.get_logger(logname)
-#
-# logger.log("Hello, world!")
-# logger.log("Goodbye, world!")
-# logger.log("=== EOT ===")
-#
-# end
-#
-# == Security
-#
-# As with all network services, security needs to be considered when
-# using dRuby. By allowing external access to a Ruby object, you are
-# not only allowing outside clients to call the methods you have
-# defined for that object, but by default to execute arbitrary Ruby
-# code on your server. Consider the following:
-#
-# # !!! UNSAFE CODE !!!
-# ro = DRbObject::new_with_uri("druby://your.server.com:8989")
-# class << ro
-# undef :instance_eval # force call to be passed to remote object
-# end
-# ro.instance_eval("`rm -rf *`")
-#
-# The dangers posed by instance_eval and friends are such that a
-# DRbServer should only be used when clients are trusted.
-#
-# A DRbServer can be configured with an access control list to
-# selectively allow or deny access from specified IP addresses. The
-# main druby distribution provides the ACL class for this purpose. In
-# general, this mechanism should only be used alongside, rather than
-# as a replacement for, a good firewall.
-#
-# == dRuby internals
-#
-# dRuby is implemented using three main components: a remote method
-# call marshaller/unmarshaller; a transport protocol; and an
-# ID-to-object mapper. The latter two can be directly, and the first
-# indirectly, replaced, in order to provide different behaviour and
-# capabilities.
-#
-# Marshalling and unmarshalling of remote method calls is performed by
-# a DRb::DRbMessage instance. This uses the Marshal module to dump
-# the method call before sending it over the transport layer, then
-# reconstitute it at the other end. There is normally no need to
-# replace this component, and no direct way is provided to do so.
-# However, it is possible to implement an alternative marshalling
-# scheme as part of an implementation of the transport layer.
-#
-# The transport layer is responsible for opening client and server
-# network connections and forwarding dRuby request across them.
-# Normally, it uses DRb::DRbMessage internally to manage marshalling
-# and unmarshalling. The transport layer is managed by
-# DRb::DRbProtocol. Multiple protocols can be installed in
-# DRbProtocol at the one time; selection between them is determined by
-# the scheme of a dRuby URI. The default transport protocol is
-# selected by the scheme 'druby:', and implemented by
-# DRb::DRbTCPSocket. This uses plain TCP/IP sockets for
-# communication. An alternative protocol, using UNIX domain sockets,
-# is implemented by DRb::DRbUNIXSocket in the file drb/unix.rb, and
-# selected by the scheme 'drbunix:'. A sample implementation over
-# HTTP can be found in the samples accompanying the main dRuby
-# distribution.
-#
-# The ID-to-object mapping component maps dRuby object ids to the
-# objects they refer to, and vice versa. The implementation to use
-# can be specified as part of a DRb::DRbServer's configuration. The
-# default implementation is provided by DRb::DRbIdConv. It uses an
-# object's ObjectSpace id as its dRuby id. This means that the dRuby
-# reference to that object only remains meaningful for the lifetime of
-# the object's process and the lifetime of the object within that
-# process. A modified implementation is provided by DRb::TimerIdConv
-# in the file drb/timeridconv.rb. This implementation retains a local
-# reference to all objects exported over dRuby for a configurable
-# period of time (defaulting to ten minutes), to prevent them being
-# garbage-collected within this time. Another sample implementation
-# is provided in sample/name.rb in the main dRuby distribution. This
-# allows objects to specify their own id or "name". A dRuby reference
-# can be made persistent across processes by having each process
-# register an object using the same dRuby name.
-#
-# pkg:gem/drb#lib/drb/eq.rb:2
-module DRb
- private
-
- # Get the configuration of the current server.
- #
- # If there is no current server, this returns the default configuration.
- # See #current_server and DRbServer::make_config.
- #
- # pkg:gem/drb#lib/drb/drb.rb:1882
- def config; end
-
- # Get the 'current' server.
- #
- # In the context of execution taking place within the main
- # thread of a dRuby server (typically, as a result of a remote
- # call on the server or one of its objects), the current
- # server is that server. Otherwise, the current server is
- # the primary server.
- #
- # If the above rule fails to find a server, a DRbServerNotFound
- # error is raised.
- #
- # pkg:gem/drb#lib/drb/drb.rb:1839
- def current_server; end
-
- # Retrieves the server with the given +uri+.
- #
- # See also regist_server and remove_server.
- #
- # pkg:gem/drb#lib/drb/drb.rb:1984
- def fetch_server(uri); end
-
- # Get the front object of the current server.
- #
- # This raises a DRbServerNotFound error if there is no current server.
- # See #current_server.
- #
- # pkg:gem/drb#lib/drb/drb.rb:1893
- def front; end
-
- # Is +uri+ the URI for the current local server?
- #
- # pkg:gem/drb#lib/drb/drb.rb:1872
- def here?(uri); end
-
- # Set the default ACL to +acl+.
- #
- # See DRb::DRbServer.default_acl.
- #
- # pkg:gem/drb#lib/drb/drb.rb:1938
- def install_acl(acl); end
-
- # Set the default id conversion object.
- #
- # This is expected to be an instance such as DRb::DRbIdConv that responds to
- # #to_id and #to_obj that can convert objects to and from DRb references.
- #
- # See DRbServer#default_id_conv.
- #
- # pkg:gem/drb#lib/drb/drb.rb:1930
- def install_id_conv(idconv); end
-
- # pkg:gem/drb#lib/drb/drb.rb:1944
- def mutex; end
-
- # The primary local dRuby server.
- #
- # This is the server created by the #start_service call.
- #
- # pkg:gem/drb#lib/drb/drb.rb:1826
- def primary_server; end
-
- # The primary local dRuby server.
- #
- # This is the server created by the #start_service call.
- #
- # pkg:gem/drb#lib/drb/drb.rb:1826
- def primary_server=(_arg0); end
-
- # Registers +server+ with DRb.
- #
- # This is called when a new DRb::DRbServer is created.
- #
- # If there is no primary server then +server+ becomes the primary server.
- #
- # Example:
- #
- # require 'drb'
- #
- # s = DRb::DRbServer.new # automatically calls regist_server
- # DRb.fetch_server s.uri #=> #druby://:? . The option is optional.
-#
-# pkg:gem/drb#lib/drb/drb.rb:843
-class DRb::DRbTCPSocket
- # Create a new DRbTCPSocket instance.
- #
- # +uri+ is the URI we are connected to.
- # +soc+ is the tcp socket we are bound to. +config+ is our
- # configuration.
- #
- # pkg:gem/drb#lib/drb/drb.rb:931
- def initialize(uri, soc, config = T.unsafe(nil)); end
-
- # On the server side, for an instance returned by #open_server,
- # accept a client connection and return a new instance to handle
- # the server's side of this client-server session.
- #
- # pkg:gem/drb#lib/drb/drb.rb:999
- def accept; end
-
- # Check to see if this connection is alive.
- #
- # pkg:gem/drb#lib/drb/drb.rb:1029
- def alive?; end
-
- # Close the connection.
- #
- # If this is an instance returned by #open_server, then this stops
- # listening for new connections altogether. If this is an instance
- # returned by #open or by #accept, then it closes this particular
- # client-server session.
- #
- # pkg:gem/drb#lib/drb/drb.rb:981
- def close; end
-
- # Get the address of our TCP peer (the other end of the socket
- # we are bound to.
- #
- # pkg:gem/drb#lib/drb/drb.rb:946
- def peeraddr; end
-
- # On the client side, receive a reply from the server.
- #
- # pkg:gem/drb#lib/drb/drb.rb:969
- def recv_reply; end
-
- # On the server side, receive a request from the client.
- #
- # pkg:gem/drb#lib/drb/drb.rb:959
- def recv_request; end
-
- # On the server side, send a reply to the client.
- #
- # pkg:gem/drb#lib/drb/drb.rb:964
- def send_reply(succ, result); end
-
- # On the client side, send a request to the server.
- #
- # pkg:gem/drb#lib/drb/drb.rb:954
- def send_request(ref, msg_id, arg, b); end
-
- # pkg:gem/drb#lib/drb/drb.rb:1038
- def set_sockopt(soc); end
-
- # Graceful shutdown
- #
- # pkg:gem/drb#lib/drb/drb.rb:1024
- def shutdown; end
-
- # Get the socket.
- #
- # pkg:gem/drb#lib/drb/drb.rb:951
- def stream; end
-
- # Get the URI that we are connected to.
- #
- # pkg:gem/drb#lib/drb/drb.rb:942
- def uri; end
-
- private
-
- # pkg:gem/drb#lib/drb/drb.rb:1014
- def accept_or_shutdown; end
-
- # pkg:gem/drb#lib/drb/drb.rb:990
- def close_shutdown_pipe; end
-
- class << self
- # Returns the hostname of this server
- #
- # pkg:gem/drb#lib/drb/drb.rb:873
- def getservername; end
-
- # Open a client connection to +uri+ (DRb URI string) using configuration
- # +config+.
- #
- # This can raise DRb::DRbBadScheme or DRb::DRbBadURI if +uri+ is not for a
- # recognized protocol. See DRb::DRbServer.new for information on built-in
- # URI protocols.
- #
- # pkg:gem/drb#lib/drb/drb.rb:866
- def open(uri, config); end
-
- # Open a server listening for connections at +uri+ using
- # configuration +config+.
- #
- # pkg:gem/drb#lib/drb/drb.rb:904
- def open_server(uri, config); end
-
- # For the families available for +host+, returns a TCPServer on +port+.
- # If +port+ is 0 the first available port is used. IPv4 servers are
- # preferred over IPv6 servers.
- #
- # pkg:gem/drb#lib/drb/drb.rb:889
- def open_server_inaddr_any(host, port); end
-
- # pkg:gem/drb#lib/drb/drb.rb:846
- def parse_uri(uri); end
-
- # Parse +uri+ into a [uri, option] pair.
- #
- # pkg:gem/drb#lib/drb/drb.rb:921
- def uri_option(uri, config); end
- end
-end
-
-# Implements DRb over a UNIX socket
-#
-# DRb UNIX socket URIs look like drbunix:? . The
-# option is optional.
-#
-# pkg:gem/drb#lib/drb/unix.rb:15
-class DRb::DRbUNIXSocket < ::DRb::DRbTCPSocket
- # pkg:gem/drb#lib/drb/unix.rb:62
- def initialize(uri, soc, config = T.unsafe(nil), server_mode = T.unsafe(nil)); end
-
- # pkg:gem/drb#lib/drb/unix.rb:105
- def accept; end
-
- # pkg:gem/drb#lib/drb/unix.rb:95
- def close; end
-
- # pkg:gem/drb#lib/drb/unix.rb:111
- def set_sockopt(soc); end
-
- class << self
- # pkg:gem/drb#lib/drb/unix.rb:28
- def open(uri, config); end
-
- # pkg:gem/drb#lib/drb/unix.rb:34
- def open_server(uri, config); end
-
- # :stopdoc:
- #
- # pkg:gem/drb#lib/drb/unix.rb:17
- def parse_uri(uri); end
-
- # pkg:gem/drb#lib/drb/unix.rb:72
- def temp_server; end
-
- # pkg:gem/drb#lib/drb/unix.rb:57
- def uri_option(uri, config); end
- end
-end
-
-# import from tempfile.rb
-#
-# pkg:gem/drb#lib/drb/unix.rb:70
-DRb::DRbUNIXSocket::Max_try = T.let(T.unsafe(nil), Integer)
-
-# pkg:gem/drb#lib/drb/drb.rb:1049
-class DRb::DRbURIOption
- # pkg:gem/drb#lib/drb/drb.rb:1050
- def initialize(option); end
-
- # pkg:gem/drb#lib/drb/drb.rb:1056
- def ==(other); end
-
- # pkg:gem/drb#lib/drb/drb.rb:1065
- def eql?(other); end
-
- # pkg:gem/drb#lib/drb/drb.rb:1061
- def hash; end
-
- # pkg:gem/drb#lib/drb/drb.rb:1053
- def option; end
-
- # pkg:gem/drb#lib/drb/drb.rb:1054
- def to_s; end
-end
-
-# Mixin module making an object undumpable or unmarshallable.
-#
-# If an object which includes this module is returned by method
-# called over drb, then the object remains in the server space
-# and a reference to the object is returned, rather than the
-# object being marshalled and moved into the client space.
-#
-# pkg:gem/drb#lib/drb/drb.rb:418
-module DRb::DRbUndumped
- # pkg:gem/drb#lib/drb/drb.rb:419
- def _dump(dummy); end
-end
-
-# Class wrapping a marshalled object whose type is unknown locally.
-#
-# If an object is returned by a method invoked over drb, but the
-# class of the object is unknown in the client namespace, or
-# the object is a constant unknown in the client namespace, then
-# the still-marshalled object is returned wrapped in a DRbUnknown instance.
-#
-# If this object is passed as an argument to a method invoked over
-# drb, then the wrapped object is passed instead.
-#
-# The class or constant name of the object can be read from the
-# +name+ attribute. The marshalled object is held in the +buf+
-# attribute.
-#
-# pkg:gem/drb#lib/drb/drb.rb:485
-class DRb::DRbUnknown
- # Create a new DRbUnknown object.
- #
- # +buf+ is a string containing a marshalled object that could not
- # be unmarshalled. +err+ is the error message that was raised
- # when the unmarshalling failed. It is used to determine the
- # name of the unmarshalled object.
- #
- # pkg:gem/drb#lib/drb/drb.rb:493
- def initialize(err, buf); end
-
- # pkg:gem/drb#lib/drb/drb.rb:522
- def _dump(lv); end
-
- # Buffer contained the marshalled, unknown object.
- #
- # pkg:gem/drb#lib/drb/drb.rb:512
- def buf; end
-
- # Create a DRbUnknownError exception containing this object.
- #
- # pkg:gem/drb#lib/drb/drb.rb:536
- def exception; end
-
- # The name of the unknown thing.
- #
- # Class name for unknown objects; variable name for unknown
- # constants.
- #
- # pkg:gem/drb#lib/drb/drb.rb:509
- def name; end
-
- # Attempt to load the wrapped marshalled object again.
- #
- # If the class of the object is now known locally, the object
- # will be unmarshalled and returned. Otherwise, a new
- # but identical DRbUnknown object will be returned.
- #
- # pkg:gem/drb#lib/drb/drb.rb:531
- def reload; end
-
- class << self
- # pkg:gem/drb#lib/drb/drb.rb:514
- def _load(s); end
- end
-end
-
-# An exception wrapping a DRb::DRbUnknown object
-#
-# pkg:gem/drb#lib/drb/drb.rb:438
-class DRb::DRbUnknownError < ::DRb::DRbError
- # Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+
- #
- # pkg:gem/drb#lib/drb/drb.rb:441
- def initialize(unknown); end
-
- # pkg:gem/drb#lib/drb/drb.rb:453
- def _dump(lv); end
-
- # Get the wrapped DRb::DRbUnknown object.
- #
- # pkg:gem/drb#lib/drb/drb.rb:447
- def unknown; end
-
- class << self
- # pkg:gem/drb#lib/drb/drb.rb:449
- def _load(s); end
- end
-end
-
-# pkg:gem/drb#lib/drb/drb.rb:1227
-class DRb::ThreadObject
- include ::MonitorMixin
-
- # pkg:gem/drb#lib/drb/drb.rb:1230
- def initialize(&blk); end
-
- # pkg:gem/drb#lib/drb/drb.rb:1265
- def _execute; end
-
- # pkg:gem/drb#lib/drb/drb.rb:1241
- def alive?; end
-
- # pkg:gem/drb#lib/drb/drb.rb:1245
- def kill; end
-
- # pkg:gem/drb#lib/drb/drb.rb:1250
- def method_missing(msg, *arg, &blk); end
-end
-
-# pkg:gem/drb#lib/drb/version.rb:2
-DRb::VERSION = T.let(T.unsafe(nil), String)
-
-# pkg:gem/drb#lib/drb/drb.rb:1993
-DRbIdConv = DRb::DRbIdConv
-
-# :stopdoc:
-#
-# pkg:gem/drb#lib/drb/drb.rb:1991
-DRbObject = DRb::DRbObject
-
-# pkg:gem/drb#lib/drb/drb.rb:1992
-DRbUndumped = DRb::DRbUndumped
diff --git a/sorbet/rbi/gems/erb@6.0.2.rbi b/sorbet/rbi/gems/erb@6.0.2.rbi
deleted file mode 100644
index 117ad71..0000000
--- a/sorbet/rbi/gems/erb@6.0.2.rbi
+++ /dev/null
@@ -1,1537 +0,0 @@
-# typed: false
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `erb` gem.
-# Please instead update this file by running `bin/tapioca gem erb`.
-
-
-# :markup: markdown
-#
-# Class **ERB** (the name stands for **Embedded Ruby**)
-# is an easy-to-use, but also very powerful, [template processor][template processor].
-#
-# ## Usage
-#
-# Before you can use \ERB, you must first require it
-# (examples on this page assume that this has been done):
-#
-# ```
-# require 'erb'
-# ```
-#
-# ## In Brief
-#
-# Here's how \ERB works:
-#
-# - You can create a *template*: a plain-text string that includes specially formatted *tags*..
-# - You can create an \ERB object to store the template.
-# - You can call instance method ERB#result to get the *result*.
-#
-# \ERB supports tags of three kinds:
-#
-# - [Expression tags][expression tags]:
-# each begins with `'<%='`, ends with `'%>'`; contains a Ruby expression;
-# in the result, the value of the expression replaces the entire tag:
-#
-# template = 'The magic word is <%= magic_word %>.'
-# erb = ERB.new(template)
-# magic_word = 'xyzzy'
-# erb.result(binding) # => "The magic word is xyzzy."
-#
-# The above call to #result passes argument `binding`,
-# which contains the binding of variable `magic_word` to its string value `'xyzzy'`.
-#
-# The below call to #result need not pass a binding,
-# because its expression `Date::DAYNAMES` is globally defined.
-#
-# ERB.new('Today is <%= Date::DAYNAMES[Date.today.wday] %>.').result # => "Today is Monday."
-#
-# - [Execution tags][execution tags]:
-# each begins with `'<%'`, ends with `'%>'`; contains Ruby code to be executed:
-#
-# template = '<% File.write("t.txt", "Some stuff.") %>'
-# ERB.new(template).result
-# File.read('t.txt') # => "Some stuff."
-#
-# - [Comment tags][comment tags]:
-# each begins with `'<%#'`, ends with `'%>'`; contains comment text;
-# in the result, the entire tag is omitted.
-#
-# template = 'Some stuff;<%# Note to self: figure out what the stuff is. %> more stuff.'
-# ERB.new(template).result # => "Some stuff; more stuff."
-#
-# ## Some Simple Examples
-#
-# Here's a simple example of \ERB in action:
-#
-# ```
-# template = 'The time is <%= Time.now %>.'
-# erb = ERB.new(template)
-# erb.result
-# # => "The time is 2025-09-09 10:49:26 -0500."
-# ```
-#
-# Details:
-#
-# 1. A plain-text string is assigned to variable `template`.
-# Its embedded [expression tag][expression tags] `'<%= Time.now %>'` includes a Ruby expression, `Time.now`.
-# 2. The string is put into a new \ERB object, and stored in variable `erb`.
-# 4. Method call `erb.result` generates a string that contains the run-time value of `Time.now`,
-# as computed at the time of the call.
-#
-# The
-# \ERB object may be re-used:
-#
-# ```
-# erb.result
-# # => "The time is 2025-09-09 10:49:33 -0500."
-# ```
-#
-# Another example:
-#
-# ```
-# template = 'The magic word is <%= magic_word %>.'
-# erb = ERB.new(template)
-# magic_word = 'abracadabra'
-# erb.result(binding)
-# # => "The magic word is abracadabra."
-# ```
-#
-# Details:
-#
-# 1. As before, a plain-text string is assigned to variable `template`.
-# Its embedded [expression tag][expression tags] `'<%= magic_word %>'` has a variable *name*, `magic_word`.
-# 2. The string is put into a new \ERB object, and stored in variable `erb`;
-# note that `magic_word` need not be defined before the \ERB object is created.
-# 3. `magic_word = 'abracadabra'` assigns a value to variable `magic_word`.
-# 4. Method call `erb.result(binding)` generates a string
-# that contains the *value* of `magic_word`.
-#
-# As before, the \ERB object may be re-used:
-#
-# ```
-# magic_word = 'xyzzy'
-# erb.result(binding)
-# # => "The magic word is xyzzy."
-# ```
-#
-# ## Bindings
-#
-# A call to method #result, which produces the formatted result string,
-# requires a [Binding object][binding object] as its argument.
-#
-# The binding object provides the bindings for expressions in [expression tags][expression tags].
-#
-# There are three ways to provide the required binding:
-#
-# - [Default binding][default binding].
-# - [Local binding][local binding].
-# - [Augmented binding][augmented binding]
-#
-# ### Default Binding
-#
-# When you pass no `binding` argument to method #result,
-# the method uses its default binding: the one returned by method #new_toplevel.
-# This binding has the bindings defined by Ruby itself,
-# which are those for Ruby's constants and variables.
-#
-# That binding is sufficient for an expression tag that refers only to Ruby's constants and variables;
-# these expression tags refer only to Ruby's global constant `RUBY_COPYRIGHT` and global variable `$0`:
-#
-# ```
-# template = <.
-# The current process is <%= $0 %>.
-# TEMPLATE
-# puts ERB.new(template).result
-# The Ruby copyright is "ruby - Copyright (C) 1993-2025 Yukihiro Matsumoto".
-# The current process is irb.
-# ```
-#
-# (The current process is `irb` because that's where we're doing these examples!)
-#
-# ### Local Binding
-#
-# The default binding is *not* sufficient for an expression
-# that refers to a a constant or variable that is not defined there:
-#
-# ```
-# Foo = 1 # Defines local constant Foo.
-# foo = 2 # Defines local variable foo.
-# template = <.
-# The current value of variable foo is <%= foo %>.
-# The Ruby copyright is <%= RUBY_COPYRIGHT.inspect %>.
-# The current process is <%= $0 %>.
-# TEMPLATE
-# erb = ERB.new(template)
-# ```
-#
-# This call below raises `NameError` because although `Foo` and `foo` are defined locally,
-# they are not defined in the default binding:
-#
-# ```
-# erb.result # Raises NameError.
-# ```
-#
-# To make the locally-defined constants and variables available,
-# you can call #result with the local binding:
-#
-# ```
-# puts erb.result(binding)
-# The current value of constant Foo is 1.
-# The current value of variable foo is 2.
-# The Ruby copyright is "ruby - Copyright (C) 1993-2025 Yukihiro Matsumoto".
-# The current process is irb.
-# ```
-#
-# ### Augmented Binding
-#
-# Another way to make variable bindings (but not constant bindings) available
-# is to use method #result_with_hash(hash);
-# the passed hash has name/value pairs that are to be used to define and assign variables
-# in a copy of the default binding:
-#
-# ```
-# template = <.
-# The current value of variable baz is <%= baz %>.
-# The Ruby copyright is <%= RUBY_COPYRIGHT.inspect %>.
-# The current process is <%= $0 %>.
-# TEMPLATE
-# erb = ERB.new(template)
-# ```
-#
-# Both of these calls raise `NameError`, because `bar` and `baz`
-# are not defined in either the default binding or the local binding.
-#
-# ```
-# puts erb.result # Raises NameError.
-# puts erb.result(binding) # Raises NameError.
-# ```
-#
-# This call passes a hash that causes `bar` and `baz` to be defined
-# in a new binding (derived from #new_toplevel):
-#
-# ```
-# hash = {bar: 3, baz: 4}
-# puts erb.result_with_hash(hash)
-# The current value of variable bar is 3.
-# The current value of variable baz is 4.
-# The Ruby copyright is "ruby - Copyright (C) 1993-2025 Yukihiro Matsumoto".
-# The current process is irb.
-# ```
-#
-# ## Tags
-#
-# The examples above use expression tags.
-# These are the tags available in \ERB:
-#
-# - [Expression tag][expression tags]: the tag contains a Ruby expression;
-# in the result, the entire tag is to be replaced with the run-time value of the expression.
-# - [Execution tag][execution tags]: the tag contains Ruby code;
-# in the result, the entire tag is to be replaced with the run-time value of the code.
-# - [Comment tag][comment tags]: the tag contains comment code;
-# in the result, the entire tag is to be omitted.
-#
-# ### Expression Tags
-#
-# You can embed a Ruby expression in a template using an *expression tag*.
-#
-# Its syntax is `<%= _expression_ %>`,
-# where *expression* is any valid Ruby expression.
-#
-# When you call method #result,
-# the method evaluates the expression and replaces the entire expression tag with the expression's value:
-#
-# ```
-# ERB.new('Today is <%= Date::DAYNAMES[Date.today.wday] %>.').result
-# # => "Today is Monday."
-# ERB.new('Tomorrow will be <%= Date::DAYNAMES[Date.today.wday + 1] %>.').result
-# # => "Tomorrow will be Tuesday."
-# ERB.new('Yesterday was <%= Date::DAYNAMES[Date.today.wday - 1] %>.').result
-# # => "Yesterday was Sunday."
-# ```
-#
-# Note that whitespace before and after the expression
-# is allowed but not required,
-# and that such whitespace is stripped from the result.
-#
-# ```
-# ERB.new('My appointment is on <%=Date::DAYNAMES[Date.today.wday + 2]%>.').result
-# # => "My appointment is on Wednesday."
-# ERB.new('My appointment is on <%= Date::DAYNAMES[Date.today.wday + 2] %>.').result
-# # => "My appointment is on Wednesday."
-# ```
-#
-# ### Execution Tags
-#
-# You can embed Ruby executable code in template using an *execution tag*.
-#
-# Its syntax is `<% _code_ %>`,
-# where *code* is any valid Ruby code.
-#
-# When you call method #result,
-# the method executes the code and removes the entire execution tag
-# (generating no text in the result):
-#
-# ```
-# ERB.new('foo <% Dir.chdir("C:/") %> bar').result # => "foo bar"
-# ```
-#
-# Whitespace before and after the embedded code is optional:
-#
-# ```
-# ERB.new('foo <%Dir.chdir("C:/")%> bar').result # => "foo bar"
-# ```
-#
-# You can interleave text with execution tags to form a control structure
-# such as a conditional, a loop, or a `case` statements.
-#
-# Conditional:
-#
-# ```
-# template = <
-# An error has occurred.
-# <% else %>
-# Oops!
-# <% end %>
-# TEMPLATE
-# erb = ERB.new(template)
-# verbosity = true
-# erb.result(binding)
-# # => "\nAn error has occurred.\n\n"
-# verbosity = false
-# erb.result(binding)
-# # => "\nOops!\n\n"
-# ```
-#
-# Note that the interleaved text may itself contain expression tags:
-#
-# Loop:
-#
-# ```
-# template = <
-# <%= dayname %>
-# <% end %>
-# TEMPLATE
-# ERB.new(template).result
-# # => "\nSun\n\nMon\n\nTue\n\nWed\n\nThu\n\nFri\n\nSat\n\n"
-# ```
-#
-# Other, non-control, lines of Ruby code may be interleaved with the text,
-# and the Ruby code may itself contain regular Ruby comments:
-#
-# ```
-# template = <
-# <%= Time.now %>
-# <% sleep(1) # Let's make the times different. %>
-# <% end %>
-# TEMPLATE
-# ERB.new(template).result
-# # => "\n2025-09-09 11:36:02 -0500\n\n\n2025-09-09 11:36:03 -0500\n\n\n2025-09-09 11:36:04 -0500\n\n\n"
-# ```
-#
-# The execution tag may also contain multiple lines of code:
-#
-# ```
-# template = <
-# * <%=i%>,<%=j%>
-# <%
-# end
-# end
-# %>
-# TEMPLATE
-# ERB.new(template).result
-# # => "\n* 0,0\n\n* 0,1\n\n* 0,2\n\n* 1,0\n\n* 1,1\n\n* 1,2\n\n* 2,0\n\n* 2,1\n\n* 2,2\n\n"
-# ```
-#
-# #### Shorthand Format for Execution Tags
-#
-# You can use keyword argument `trim_mode: '%'` to enable a shorthand format for execution tags;
-# this example uses the shorthand format `% _code_` instead of `<% _code_ %>`:
-#
-# ```
-# template = <
-# % end
-# TEMPLATE
-# erb = ERB.new(template, trim_mode: '%')
-# priorities = [ 'Run Ruby Quiz',
-# 'Document Modules',
-# 'Answer Questions on Ruby Talk' ]
-# puts erb.result(binding)
-# * Run Ruby Quiz
-# * Document Modules
-# * Answer Questions on Ruby Talk
-# ```
-#
-# Note that in the shorthand format, the character `'%'` must be the first character in the code line
-# (no leading whitespace).
-#
-# #### Suppressing Unwanted Blank Lines
-#
-# With keyword argument `trim_mode` not given,
-# all blank lines go into the result:
-#
-# ```
-# template = <
-# <%= RUBY_VERSION %>
-# <% end %>
-# TEMPLATE
-# ERB.new(template).result.lines.each {|line| puts line.inspect }
-# "\n"
-# "3.4.5\n"
-# "\n"
-# ```
-#
-# You can give `trim_mode: '-'`, you can suppress each blank line
-# whose source line ends with `-%>` (instead of `%>`):
-#
-# ```
-# template = <
-# <%= RUBY_VERSION %>
-# <% end -%>
-# TEMPLATE
-# ERB.new(template, trim_mode: '-').result.lines.each {|line| puts line.inspect }
-# "3.4.5\n"
-# ```
-#
-# It is an error to use the trailing `'-%>'` notation without `trim_mode: '-'`:
-#
-# ```
-# ERB.new(template).result.lines.each {|line| puts line.inspect } # Raises SyntaxError.
-# ```
-#
-# #### Suppressing Unwanted Newlines
-#
-# Consider this template:
-#
-# ```
-# template = <
-# <%= RUBY_VERSION %>
-# foo <% RUBY_VERSION %>
-# foo <%= RUBY_VERSION %>
-# TEMPLATE
-# ```
-#
-# With keyword argument `trim_mode` not given, all newlines go into the result:
-#
-# ```
-# ERB.new(template).result.lines.each {|line| puts line.inspect }
-# "\n"
-# "3.4.5\n"
-# "foo \n"
-# "foo 3.4.5\n"
-# ```
-#
-# You can give `trim_mode: '>'` to suppress the trailing newline
-# for each line that ends with `'%>'` (regardless of its beginning):
-#
-# ```
-# ERB.new(template, trim_mode: '>').result.lines.each {|line| puts line.inspect }
-# "3.4.5foo foo 3.4.5"
-# ```
-#
-# You can give `trim_mode: '<>'` to suppress the trailing newline
-# for each line that both begins with `'<%'` and ends with `'%>'`:
-#
-# ```
-# ERB.new(template, trim_mode: '<>').result.lines.each {|line| puts line.inspect }
-# "3.4.5foo \n"
-# "foo 3.4.5\n"
-# ```
-#
-# #### Combining Trim Modes
-#
-# You can combine certain trim modes:
-#
-# - `'%-'`: Enable shorthand and omit each blank line ending with `'-%>'`.
-# - `'%>'`: Enable shorthand and omit newline for each line ending with `'%>'`.
-# - `'%<>'`: Enable shorthand and omit newline for each line starting with `'<%'` and ending with `'%>'`.
-#
-# ### Comment Tags
-#
-# You can embed a comment in a template using a *comment tag*;
-# its syntax is `<%# _text_ %>`,
-# where *text* is the text of the comment.
-#
-# When you call method #result,
-# it removes the entire comment tag
-# (generating no text in the result).
-#
-# Example:
-#
-# ```
-# template = 'Some stuff;<%# Note to self: figure out what the stuff is. %> more stuff.'
-# ERB.new(template).result # => "Some stuff; more stuff."
-# ```
-#
-# A comment tag may appear anywhere in the template.
-#
-# Note that the beginning of the tag must be `'<%#'`, not `'<% #'`.
-#
-# In this example, the tag begins with `'<% #'`, and so is an execution tag, not a comment tag;
-# the cited code consists entirely of a Ruby-style comment (which is of course ignored):
-#
-# ```
-# ERB.new('Some stuff;<% # Note to self: figure out what the stuff is. %> more stuff.').result
-# # => "Some stuff;"
-# ```
-#
-# ## Encodings
-#
-# An \ERB object has an [encoding][encoding],
-# which is by default the encoding of the template string;
-# the result string will also have that encoding.
-#
-# ```
-# template = <
-# TEMPLATE
-# erb = ERB.new(template)
-# template.encoding # => #<%= @desc %>
-#-# <% if @cost < 10 %> -# Only <%= @cost %>!!! -# <% else %> -# Call for a price, today! -# <% end %> -#
-# -#