From 4090ec1017d3b41a6589858f2f2be484a1d6d041 Mon Sep 17 00:00:00 2001 From: drbrain Date: Sat, 1 Dec 2012 09:52:39 +0000 Subject: * lib/rubygems/commands/cleanup_command.rb: Fix cleanup command for multiple gems. [ruby-trunk - #7481] by Kouhei Sutou * test/rubygems/test_gem_commands_cleanup_command.rb: Test for above. * lib/rubygems.rb: Autoload Gem::Source to prevent test failures git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rubygems/commands/cleanup_command.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/rubygems/commands') diff --git a/lib/rubygems/commands/cleanup_command.rb b/lib/rubygems/commands/cleanup_command.rb index dc919e5570..f18a94d7a2 100644 --- a/lib/rubygems/commands/cleanup_command.rb +++ b/lib/rubygems/commands/cleanup_command.rb @@ -66,6 +66,7 @@ are not removed. deps = deplist.strongly_connected_components.flatten.reverse + original_home = Gem.dir original_path = Gem.path deps.each do |spec| @@ -97,7 +98,7 @@ are not removed. end # Restore path Gem::Uninstaller may have change - Gem.use_paths(*original_path) + Gem.use_paths(original_home, *original_path) end say "Clean Up Complete" -- cgit v1.2.3