From 49a97c280a35fe07bce036467da85ace0c006fa7 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 18 Jul 2014 15:14:42 -0500 Subject: Ask the filename object for the prefix --- Library/Homebrew/cmd/bottle.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 8bd1c4b9e..954f6eb78 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -192,10 +192,7 @@ module Homebrew puts output if ARGV.include? '--rb' - bottle_base = filename.to_s.gsub(bottle_suffix(bottle_revision), '') - File.open "#{bottle_base}.bottle.rb", 'w' do |file| - file.write output - end + File.open("#{filename.prefix}.bottle.rb", "w") { |file| file.write(output) } end end -- cgit v1.2.3