mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Import rubygems 1.6.0 (released version @ 58d8a0b9)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
86bb0af7ea
commit
25a9b62d45
73 changed files with 2408 additions and 719 deletions
|
@ -131,7 +131,7 @@ class Gem::SourceIndex
|
|||
# Returns an Array specifications for the latest released versions
|
||||
# of each gem in this index.
|
||||
|
||||
def latest_specs
|
||||
def latest_specs(include_prerelease=false)
|
||||
result = Hash.new { |h,k| h[k] = [] }
|
||||
latest = {}
|
||||
|
||||
|
@ -140,7 +140,7 @@ class Gem::SourceIndex
|
|||
curr_ver = spec.version
|
||||
prev_ver = latest.key?(name) ? latest[name].version : nil
|
||||
|
||||
next if curr_ver.prerelease?
|
||||
next if !include_prerelease && curr_ver.prerelease?
|
||||
next unless prev_ver.nil? or curr_ver >= prev_ver or
|
||||
latest[name].platform != Gem::Platform::RUBY
|
||||
|
||||
|
@ -273,6 +273,7 @@ class Gem::SourceIndex
|
|||
when Gem::Dependency then
|
||||
only_platform = platform_only
|
||||
requirement = gem_pattern.requirement
|
||||
|
||||
gem_pattern = if Regexp === gem_pattern.name then
|
||||
gem_pattern.name
|
||||
elsif gem_pattern.name.empty? then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue