Skip to content
Permalink
Browse files

lib/rubygems.rb: Stop "Leaked file descriptor" warning

Bundler.setup changes Gem::DefaultUserInteraction.ui and does not close
it.  This change makes sure that it is closed.
  • Loading branch information...
mame committed Jun 6, 2019
1 parent 1e54903 commit 861b50d81d9ed5f57b78c87b2e2f24f718db31dd
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/rubygems.rb
@@ -1208,7 +1208,13 @@ def self.use_gemdeps(path = nil)
require 'rubygems/user_interaction'
Gem::DefaultUserInteraction.use_ui(ui) do
require "bundler"
@gemdeps = Bundler.setup
begin
@gemdeps = Bundler.setup
ensure
if Gem::DefaultUserInteraction.ui.is_a?(Gem::SilentUI)
Gem::DefaultUserInteraction.ui.close
end
end
Bundler.ui = nil
@gemdeps.requested_specs.map(&:to_spec).sort_by(&:name)
end

0 comments on commit 861b50d

Please sign in to comment.
You can’t perform that action at this time.