End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Gem::DefaultUserInteraction.use_ui
use_ui(new_ui) { || ... }
lib/rubygems/user_interaction.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rubygems/user_interaction.rb, line 43
def self.use_ui(new_ui)
old_ui = @ui
@ui = new_ui
yield
ensure
@ui = old_ui
end
Use new_ui for the duration of block.