diff options
| author | Jack Nagel | 2013-12-08 16:39:59 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-12-08 16:41:35 -0600 |
| commit | b45cadd19a7acc17de456289951bd3f7301c5325 (patch) | |
| tree | bc576967e12a8d70a20929229bc3c24f41b458be /Library | |
| parent | b30f4099955063b74a4744515536bf78042ebe71 (diff) | |
| download | brew-b45cadd19a7acc17de456289951bd3f7301c5325.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.rb | 6 |
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 |
