Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Gem.pre_uninstall
() { (::Gem::Uninstaller) -> untyped } -> ::Array[::Proc]
pre_uninstall(&hook)
lib/rubygems.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems.rb, line 821
def self.pre_uninstall(&hook)
@pre_uninstall_hooks << hook
end
Adds a pre-uninstall hook that will be passed an Gem::Uninstaller instance and the spec that will be uninstalled when Gem::Uninstaller#uninstall is called
See also
.pre_reset
.rdoc_hooks_defined_via_plugin?
.pre_install
.read_binary
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0