instance method
Gem::Uninstaller#uninstall_gem
uninstall_gem(stub)
lib/rubygems/uninstaller.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/rubygems/uninstaller.rb, line 156
def uninstall_gem(stub)
spec = stub.to_spec
@spec = spec
unless dependencies_ok? spec
if abort_on_dependent? || !ask_if_ok(spec)
raise Gem::DependencyRemovalException,
"Uninstallation aborted due to dependent gem(s)"
end
end
Gem.pre_uninstall_hooks.each do |hook|
hook.call self
end
remove_executables @spec
remove_plugins @spec
remove @spec
specification_record.remove_spec(stub)
regenerate_plugins
Gem.post_uninstall_hooks.each do |hook|
hook.call self
end
@spec = nil
end
Uninstalls gem spec
See also
#uninstall
#warn_cannot_uninstall_default_gems
#specification_record
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0