Skip to content

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)

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