summaryrefslogtreecommitdiff
path: root/lib/rubygems/uninstaller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/uninstaller.rb')
-rw-r--r--lib/rubygems/uninstaller.rb23
1 files changed, 9 insertions, 14 deletions
diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb
index 143ab6df26..d672b9dec1 100644
--- a/lib/rubygems/uninstaller.rb
+++ b/lib/rubygems/uninstaller.rb
@@ -43,15 +43,14 @@ class Gem::Uninstaller
def initialize(gem, options = {})
# TODO document the valid options
- @gem = gem
- @version = options[:version] || Gem::Requirement.default
- @gem_home = File.expand_path(options[:install_dir] || Gem.dir)
- @force_executables = options[:executables]
- @force_all = options[:all]
- @force_ignore = options[:ignore]
- @bin_dir = options[:bin_dir]
- @format_executable = options[:format_executable]
- @abort_on_dependent = options[:abort_on_dependent]
+ @gem = gem
+ @version = options[:version] || Gem::Requirement.default
+ @gem_home = File.expand_path(options[:install_dir] || Gem.dir)
+ @force_executables = options[:executables]
+ @force_all = options[:all]
+ @force_ignore = options[:ignore]
+ @bin_dir = options[:bin_dir]
+ @format_executable = options[:format_executable]
# Indicate if development dependencies should be checked when
# uninstalling. (default: false)
@@ -144,7 +143,7 @@ class Gem::Uninstaller
@spec = spec
unless dependencies_ok? spec
- if abort_on_dependent? || !ask_if_ok(spec)
+ unless ask_if_ok(spec)
raise Gem::DependencyRemovalException,
"Uninstallation aborted due to dependent gem(s)"
end
@@ -291,10 +290,6 @@ class Gem::Uninstaller
deplist.ok_to_remove?(spec.full_name, @check_dev)
end
- def abort_on_dependent?
- @abort_on_dependent
- end
-
def ask_if_ok(spec)
msg = ['']
msg << 'You have requested to uninstall the gem:'