aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-10-15 13:26:23 -0500
committerJack Nagel2013-10-15 13:26:23 -0500
commit3df31557c8a378e8a13d2ce36391a7e1c0152acb (patch)
treebfe72932a9e2b54e40bc05a951f3994be6f450cb /Library
parent31e0bf61fa5173c8fb6267961ada71a82e3b9f00 (diff)
downloadbrew-3df31557c8a378e8a13d2ce36391a7e1c0152acb.tar.bz2
Avoid the need to defensively flatten tags array
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/dependency_collector.rb2
-rw-r--r--Library/Homebrew/requirements/python_dependency.rb1
2 files changed, 1 insertions, 2 deletions
diff --git a/Library/Homebrew/dependency_collector.rb b/Library/Homebrew/dependency_collector.rb
index 608852e95..f8bd2d41a 100644
--- a/Library/Homebrew/dependency_collector.rb
+++ b/Library/Homebrew/dependency_collector.rb
@@ -76,7 +76,7 @@ class DependencyCollector
elsif (tag = tags.first) && LANGUAGE_MODULES.include?(tag)
# Next line only for legacy support of `depends_on 'module' => :python`
# It should be replaced by `depends_on :python => 'module'`
- return PythonDependency.new("2", spec) if tag == :python
+ return PythonDependency.new("2", Array(spec)) if tag == :python
LanguageModuleDependency.new(tag, spec)
else
Dependency.new(spec, tags)
diff --git a/Library/Homebrew/requirements/python_dependency.rb b/Library/Homebrew/requirements/python_dependency.rb
index f07d3b212..12e0342b2 100644
--- a/Library/Homebrew/requirements/python_dependency.rb
+++ b/Library/Homebrew/requirements/python_dependency.rb
@@ -34,7 +34,6 @@ class PythonDependency < Requirement
end
def initialize(default_version="2.6", tags=[])
- tags = [tags].flatten
# Extract the min_version if given. Default to default_version else
if /(\d+\.)*\d+/ === tags.first.to_s
@min_version = PythonVersion.new(tags.shift)