diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-23 00:35:09 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-23 00:35:09 +0000 |
commit | 6fe32d72667945605ef710395706e04491bfd86a (patch) | |
tree | 7fe4b8f779ff75067b45f48502864fb05787cee7 /lib/rubygems/validator.rb | |
parent | c47c095b9740e7c19d6fdca29ab661c1089221d4 (diff) | |
download | ruby-6fe32d72667945605ef710395706e04491bfd86a.tar.gz |
* lib/rubygems/commands/check_command.rb: Added --doctor and --dry-run
options to clean up after failed uninstallation.
* test/rubygems/test_gem_commands_check_command.rb: Test for above.
* lib/rubygems/commands/push_command.rb: Allow pushes from RubyGems
2.0.0.preview3
* lib/rubygems/commands/update_command.rb: Use Gem.ruby_version
* lib/rubygems/dependency.rb: Update style.
* lib/rubygems/installer.rb: Ensure installed gem specifications will
be useable. Refactor.
* test/rubygems/test_gem_installer.rb: ditto.
* lib/rubygems/validator.rb: Fixed bug with unreadable files.
* lib/rubygems.rb: Fixed broken methods.
* test/rubygems/test_gem.rb: Test for above.
* test/rubygems/test_gem_commands_push_command.rb: Fixed overridden
Gem.latest_rubygems_version
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/validator.rb')
-rw-r--r-- | lib/rubygems/validator.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/rubygems/validator.rb b/lib/rubygems/validator.rb index f66b2c1f43..e5183d401f 100644 --- a/lib/rubygems/validator.rb +++ b/lib/rubygems/validator.rb @@ -58,13 +58,11 @@ class Gem::Validator public ErrorData = Struct.new :path, :problem do - def <=> other return nil unless self.class === other [path, problem] <=> [other.path, other.problem] end - end ## @@ -121,7 +119,6 @@ class Gem::Validator File.readable? File.join(gem_directory, file_name) } - unreadable.map! { |entry, _| entry['path'] } unreadable.sort.each do |path| errors[gem_name][path] = "Unreadable file" end @@ -153,7 +150,9 @@ class Gem::Validator end errors.each do |name, subhash| - errors[name] = subhash.map { |path, msg| ErrorData.new(path, msg) }.sort + errors[name] = subhash.map do |path, msg| + ErrorData.new path, msg + end.sort end errors |