diff options
-rw-r--r-- | lib/rubygems/resolver.rb | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -116,7 +116,7 @@ class Gem::Resolver def explain(stage, *data) # :nodoc: return unless DEBUG_RESOLVER - d = data.map { |x| x.pretty_inspect }.join(", ") $stderr.printf "%10s %s\n", stage.to_s.upcase, d end @@ -189,7 +189,7 @@ class Gem::Resolver def resolve locking_dg = Molinillo::DependencyGraph.new - Molinillo::Resolver.new(self, self).resolve(@needed.map { |d| DependencyRequest.new d, nil }, locking_dg).tsort.map(&:payload).compact rescue Molinillo::VersionConflict => e conflict = e.conflicts.values.first raise Gem::DependencyResolutionError, Conflict.new(conflict.requirement_trees.first.first, conflict.existing, conflict.requirement) @@ -206,7 +206,7 @@ class Gem::Resolver if (skip_dep_gems = skip_gems[dependency.name]) && !skip_dep_gems.empty? matching = all.select do |api_spec| - skip_dep_gems.any? { |s| api_spec.version == s.version } end all = matching unless matching.empty? @@ -235,7 +235,7 @@ class Gem::Resolver raise exc end - groups = Hash.new { |hash, key| hash[key] = [] } # create groups & sources in the same loop sources = possibles.map do |spec| @@ -248,9 +248,9 @@ class Gem::Resolver sources.each do |source| groups[source]. - sort_by { |spec| [spec.version, Gem::Platform.local =~ spec.platform ? 1 : 0] }. - map { |spec| ActivationRequest.new spec, dependency }. - each { |activation_request| activation_requests << activation_request } end activation_requests |