method
_latest_specs
v2_4_6 -
Show latest stable
-
0 notes -
Class: Specification
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
_latest_specs(specs, prerelease = false)
public
Hide source
# File lib/rubygems/specification.rb, line 1128 def self._latest_specs specs, prerelease = false # :nodoc: result = Hash.new { |h,k| h[k] = {} } native = {} specs.reverse_each do |spec| unless spec raise Gem::Exception, "unexpectedly spec is nil: #{specs}" end 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