aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-12-08 16:39:59 -0600
committerJack Nagel2013-12-08 16:41:35 -0600
commit560aebc0f4638afdb7cb53d0b35d55b678bde0fe (patch)
tree8a25cbaf6e73a56987f8d84786d23bfa20fa8974 /Library
parent6a9a051a725b68989020da7a9cb6bd531309da1b (diff)
downloadhomebrew-560aebc0f4638afdb7cb53d0b35d55b678bde0fe.tar.bz2
bottles: fix options hashes
Defaults can't be specified in the parameter list, as they will be overwritten by whatever is passed in. Instead the defaults must be merged with the argument in the method body.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/bottles.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb
index 3838d4a50..2888a09c4 100644
--- a/Library/Homebrew/bottles.rb
+++ b/Library/Homebrew/bottles.rb
@@ -3,7 +3,8 @@ require 'os/mac'
require 'extend/ARGV'
require 'bottle_version'
-def bottle_filename f, options={:tag=>bottle_tag}
+def bottle_filename f, options={}
+ options = { :tag => bottle_tag }.merge(options)
name = f.name.downcase
version = f.stable.version
options[:revision] ||= f.bottle.revision.to_i if f.bottle
@@ -48,7 +49,8 @@ def bottle_file_outdated? f, file
bottle_ext && bottle_url_ext && bottle_ext != bottle_url_ext
end
-def bottle_native_suffix options={:tag=>bottle_tag}
+def bottle_native_suffix options={}
+ options = { :tag => bottle_tag }.merge(options)
".#{options[:tag]}#{bottle_suffix(options[:revision])}"
end