aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/python_helper.rb
diff options
context:
space:
mode:
authorJack Nagel2013-08-14 14:13:03 -0500
committerJack Nagel2013-08-14 14:13:03 -0500
commitc9a4e1e1c932bbc69d35a2f544955c956552165d (patch)
treef4510014dd90be600bc741026c69c1a1c6070bf0 /Library/Homebrew/python_helper.rb
parent7ddc432c9e55ea4a2f3244d95c2d0d3b39fa4e90 (diff)
downloadbrew-c9a4e1e1c932bbc69d35a2f544955c956552165d.tar.bz2
Use each instead of while loop
Diffstat (limited to 'Library/Homebrew/python_helper.rb')
-rw-r--r--Library/Homebrew/python_helper.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/Library/Homebrew/python_helper.rb b/Library/Homebrew/python_helper.rb
index c99fce2c7..18dbbe216 100644
--- a/Library/Homebrew/python_helper.rb
+++ b/Library/Homebrew/python_helper.rb
@@ -33,8 +33,7 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block)
# check that no two python binaries are the same (which could be the case
# because more than one `depends_on :python => 'module_name' may be present).
filtered_python_reqs = []
- while !python_reqs.empty?
- py = python_reqs.shift
+ python_reqs.each do |py|
next if filtered_python_reqs.any? { |req| req.binary == py.binary }
next unless py.satisfied?
next unless options[:allowed_major_versions].include?(py.version.major)