aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems.rb2
-rw-r--r--lib/rubygems/doctor.rb19
2 files changed, 11 insertions, 10 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index 77d1650056..3722e10780 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -98,7 +98,7 @@
require 'rbconfig'
module Gem
- VERSION = '2.0.0.preview3'
+ VERSION = '2.0.0.preview3.1'
end
# Must be first since it unloads the prelude from 1.9.2
diff --git a/lib/rubygems/doctor.rb b/lib/rubygems/doctor.rb
index 198c758b00..4fb399e24c 100644
--- a/lib/rubygems/doctor.rb
+++ b/lib/rubygems/doctor.rb
@@ -19,16 +19,17 @@ class Gem::Doctor
# Maps a gem subdirectory to the files that are expected to exist in the
# subdirectory.
- REPOSITORY_EXTENSION_MAP = { # :nodoc:
- 'build_info' => '.info',
- 'cache' => '.gem',
- 'doc' => '',
- 'gems' => '',
- 'specifications' => '.gemspec'
- }
+ REPOSITORY_EXTENSION_MAP = [ # :nodoc:
+ ['specifications', '.gemspec'],
+ ['build_info', '.info'],
+ ['cache', '.gem'],
+ ['doc', ''],
+ ['gems', ''],
+ ]
raise 'Update REPOSITORY_EXTENSION_MAP' unless
- Gem::REPOSITORY_SUBDIRECTORIES == REPOSITORY_EXTENSION_MAP.keys.sort
+ Gem::REPOSITORY_SUBDIRECTORIES.sort ==
+ REPOSITORY_EXTENSION_MAP.map { |(k,_)| k }.sort
##
# Creates a new Gem::Doctor that will clean up +gem_repository+. Only one
@@ -97,7 +98,7 @@ class Gem::Doctor
def doctor_child sub_directory, extension # :nodoc:
directory = @gem_repository + sub_directory
- directory.each_child do |child|
+ directory.children.sort.each do |child|
next unless child.exist?
basename = child.basename(extension).to_s