method

_latest_specs

Importance_0
v2_5_5 - Show latest stable - 0 notes - Class: Specification
_latest_specs(specs, prerelease = false) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/specification.rb, line 1155
  def self._latest_specs specs, prerelease = false # :nodoc:
    result = Hash.new { |h,k| h[k] = {} }
    native = {}

    specs.reverse_each do |spec|
      next if spec.version.prerelease? unless prerelease

      native[spec.name] = spec.version if spec.platform == Gem::Platform::RUBY
      result[spec.name][spec.platform] = spec
    end

    result.map(&:last).map(&:values).flatten.reject { |spec|
      minimum = native[spec.name]
      minimum && spec.version < minimum
    }.sort_by{ |tup| tup.name }
  end
Register or log in to add new notes.