diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2021-12-04 12:49:00 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-09-29 03:41:49 +0900 |
commit | 1e5597532ac72ae324550c7cf58f94017f0c8072 (patch) | |
tree | 4357dcde018ca83dcf022fddd56a3188f8f80bdd | |
parent | 5222a89ab6c71ead00afc7c75684212328457414 (diff) |
[rubygems/rubygems] Cleaup unnecessary code
https://github.com/rubygems/rubygems/commit/2e05dadbc5
-rw-r--r-- | test/rubygems/rubygems_plugin.rb | 9 | ||||
-rw-r--r-- | test/rubygems/test_gem.rb | 11 |
2 files changed, 0 insertions, 20 deletions
diff --git a/test/rubygems/rubygems_plugin.rb b/test/rubygems/rubygems_plugin.rb index b538487bbf..c18f13d2ed 100644 --- a/test/rubygems/rubygems_plugin.rb +++ b/test/rubygems/rubygems_plugin.rb @@ -1,15 +1,6 @@ # frozen_string_literal: true require "rubygems/command_manager" -## -# This is an example of exactly what NOT to do. -# -# DO NOT include code like this in your rubygems_plugin.rb - -module Gem::Commands - remove_const(:InterruptCommand) if defined?(InterruptCommand) -end - class Gem::Commands::InterruptCommand < Gem::Command def initialize super("interrupt", "Raises an Interrupt Exception", {}) diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index cc9d0a22d5..5e14ab86a9 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb @@ -20,8 +20,6 @@ class TestGem < Gem::TestCase common_installer_setup @additional = %w[a b].map {|d| File.join @tempdir, d } - - util_remove_interrupt_command end def test_self_finish_resolve @@ -1547,14 +1545,10 @@ class TestGem < Gem::TestCase with_plugin("load") { Gem.load_env_plugins } assert_equal :loaded, TEST_PLUGIN_LOAD rescue nil - util_remove_interrupt_command - # Should attempt to cause a StandardError with_plugin("standarderror") { Gem.load_env_plugins } assert_equal :loaded, TEST_PLUGIN_STANDARDERROR rescue nil - util_remove_interrupt_command - # Should attempt to cause an Exception with_plugin("exception") { Gem.load_env_plugins } assert_equal :loaded, TEST_PLUGIN_EXCEPTION rescue nil @@ -2079,11 +2073,6 @@ You may need to `bundle install` to install missing gems spec end - def util_remove_interrupt_command - Gem::Commands.send :remove_const, :InterruptCommand if - Gem::Commands.const_defined? :InterruptCommand - end - def util_cache_dir File.join Gem.dir, "cache" end |