aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/uninstaller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/uninstaller.rb')
-rw-r--r--lib/rubygems/uninstaller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb
index fa838333cd..2a6edc6131 100644
--- a/lib/rubygems/uninstaller.rb
+++ b/lib/rubygems/uninstaller.rb
@@ -96,6 +96,8 @@ class Gem::Uninstaller
(@user_install and spec.base_dir == Gem.user_dir)
end
+ list.sort!
+
if list.empty? then
if other_repo_specs.empty?
if default_specs.empty?
@@ -120,7 +122,8 @@ class Gem::Uninstaller
remove_all list
elsif list.size > 1 then
- gem_names = list.collect {|gem| gem.full_name} + ["All versions"]
+ gem_names = list.map { |gem| gem.full_name }
+ gem_names << "All versions"
say
_, index = choose_from_list "Select gem to uninstall:", gem_names