diff options
author | Patrick Metcalfe <git@patrickmetcalfe.com> | 2015-07-01 13:28:14 -0500 |
---|---|---|
committer | Patrick Metcalfe <git@patrickmetcalfe.com> | 2015-07-01 13:28:14 -0500 |
commit | f0aa518a8d859b31a4bc4489afbed5d597289e9a (patch) | |
tree | b51eaa6bf18966eb6d818d0dba077a92fae6bf8c | |
parent | 6243269a8598b9446f14c21ac272e2de7af26d77 (diff) | |
download | bundler-f0aa518a8d859b31a4bc4489afbed5d597289e9a.tar.gz |
switch reject to select
Reject is clearly not the right method to use here, now I’m trying to
figure out what state of mind I was in when I wrote something that is
so obviously wrong.
-rw-r--r-- | lib/bundler/installer/parallel_installer.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/bundler/installer/parallel_installer.rb b/lib/bundler/installer/parallel_installer.rb index 9c08c83b4c..373700638f 100644 --- a/lib/bundler/installer/parallel_installer.rb +++ b/lib/bundler/installer/parallel_installer.rb @@ -35,10 +35,9 @@ class ParallelInstaller # Checks installed dependencies against spec's dependencies to make # sure needed dependencies have been installed. - def dependencies_installed?(remaining_specs) - installed_specs = remaining_specs.reject(&:installed?).map(&:name) - already_installed = lambda {|dep| installed_specs.include? dep.name } - dependencies.all? {|d| already_installed[d] } + def dependencies_installed?(all_specs) + installed_specs = all_specs.select(&:installed?).map(&:spec) + dependencies.all? {|d| installed_specs.include? d } end # Represents only the non-development dependencies and the ones that |