diff options
| author | Jack Nagel | 2014-06-18 19:23:42 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-18 19:25:35 -0500 |
| commit | 4fd63dc4f8670df9b0ded98eb9a30f004069e4b8 (patch) | |
| tree | 7e5e6b21b7b5d8bb91fcd3e5d20b04fb6fa6b4ad /Library | |
| parent | fb7ce8c4847bc6bacd8b6f3fb684332228847df7 (diff) | |
| download | brew-4fd63dc4f8670df9b0ded98eb9a30f004069e4b8.tar.bz2 | |
Expose inreplace as a class method
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/bottle.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/utils/inreplace.rb | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 8c07a6f8d..7de08761d 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -33,10 +33,6 @@ BOTTLE_ERB = <<-EOS EOS module Homebrew extend self - class << self - include Utils::Inreplace - end - def keg_contains string, keg if not ARGV.homebrew_developer? return quiet_system 'fgrep', '--recursive', '--quiet', '--max-count=1', string, keg @@ -236,7 +232,7 @@ module Homebrew extend self f = Formula.factory formula_name update_or_add = nil - inreplace f.path do |s| + Utils::Inreplace.inreplace(f.path) do |s| if s.include? 'bottle do' update_or_add = 'update' string = s.sub!(/ bottle do.+?end\n/m, output) diff --git a/Library/Homebrew/utils/inreplace.rb b/Library/Homebrew/utils/inreplace.rb index a6451c49f..52a43ece9 100644 --- a/Library/Homebrew/utils/inreplace.rb +++ b/Library/Homebrew/utils/inreplace.rb @@ -20,5 +20,6 @@ module Utils Pathname(path).atomic_write(s) end end + module_function :inreplace end end |
