diff options
author | Patrick Metcalfe <git@patrickmetcalfe.com> | 2015-07-01 13:28:14 -0500 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-07-01 22:19:02 -0700 |
commit | 1fd9d080a73fde2afed709b6a9a9fa4af57aeee7 (patch) | |
tree | 35a83241c9993d640e1a315e8187c93c7e552ef4 | |
parent | b5db5535355e37a9bc23b87acc602e0398b3ec3c (diff) | |
download | bundler-1fd9d080a73fde2afed709b6a9a9fa4af57aeee7.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 |