* lib/rubygems: Fix CVE-2013-4363. Miscellaneous minor improvements.

* test/rubygems:  Tests for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2013-09-25 00:53:19 +00:00
parent 61f3a787f6
commit 8eb3918581
13 changed files with 173 additions and 124 deletions

View file

@ -134,7 +134,7 @@ command to remove old versions.
g.name == spec.name and g.match_platform?
end
highest_remote_gem = matching_gems.sort_by { |g,_| g.version }.last
highest_remote_gem = matching_gems.max_by { |g,_| g.version }
highest_remote_gem ||= [Gem::NameTuple.null]