summaryrefslogtreecommitdiff
path: root/lib/rubygems/resolver.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-06-10 19:46:05 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-15 21:20:37 +0900
commit955f1837a180d8936f90ab6cf039ccb8f751be72 (patch)
tree0d48749501febfccefda3b1376511c421d4118e4 /lib/rubygems/resolver.rb
parentef481c120c55bf0351a586739f9b5d704f3f7a7d (diff)
Use space inside block braces everywhere
To make rubygems code style consistent with bundler.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3229
Diffstat (limited to 'lib/rubygems/resolver.rb')
-rw-r--r--lib/rubygems/resolver.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/rubygems/resolver.rb b/lib/rubygems/resolver.rb
index ea9687bdbf..fd5cf3d712 100644
--- a/lib/rubygems/resolver.rb
+++ b/lib/rubygems/resolver.rb
@@ -116,7 +116,7 @@ class Gem::Resolver
def explain(stage, *data) # :nodoc:
return unless DEBUG_RESOLVER
- d = data.map { |x| x.pretty_inspect }.join(", ")
+ 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
+ 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 }
+ 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] = [] }
+ 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 }
+ 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