method
matching_specs
v2_2_9 -
Show latest stable
- Class:
Gem::Dependency
matching_specs(platform_only = false)public
No documentation available.
# File lib/rubygems/dependency.rb, line 272
def matching_specs platform_only = false
matches = Gem::Specification.stubs.find_all { |spec|
self.name === spec.name and # TODO: == instead of ===
requirement.satisfied_by? spec.version
}.map(&:to_spec)
if platform_only
matches.reject! { |spec|
not Gem::Platform.match spec.platform
}
end
matches.sort_by { |s| s.sort_obj } # HACK: shouldn't be needed
end