diff options
| author | Jack Nagel | 2014-03-26 16:07:49 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-03-26 16:07:49 -0500 |
| commit | 4fe0be37c0311c24aa2df6287dabb7505b587f27 (patch) | |
| tree | 6d42646b467ac9d1d1b0fdb4c2259466737d239d /Library | |
| parent | 91d31ae1f43cade6fac808b6042133c328638274 (diff) | |
| download | brew-4fe0be37c0311c24aa2df6287dabb7505b587f27.tar.bz2 | |
Drop intermediate variable
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/utils/inreplace.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Library/Homebrew/utils/inreplace.rb b/Library/Homebrew/utils/inreplace.rb index 287058021..4fa2fbe7c 100644 --- a/Library/Homebrew/utils/inreplace.rb +++ b/Library/Homebrew/utils/inreplace.rb @@ -10,8 +10,7 @@ module Utils yield s else after = after.to_s if Symbol === after - sub = s.gsub!(before, after) - if sub.nil? + unless s.gsub!(before, after) message = <<-EOS.undent inreplace in '#{path}' failed Expected replacement of '#{before}' with '#{after}' |
