aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 484ee429b..739322191 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -695,10 +695,16 @@ class Formula
@devel.instance_eval(&block)
end
- def head val=nil, specs={}
- return @head if val.nil?
- @head ||= HeadSoftwareSpec.new
- @head.url(val, specs)
+ def head val=nil, specs={}, &block
+ if block_given?
+ @head ||= HeadSoftwareSpec.new
+ @head.instance_eval(&block)
+ elsif val
+ @head ||= HeadSoftwareSpec.new
+ @head.url(val, specs)
+ else
+ @head
+ end
end
def version val=nil