aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils
diff options
context:
space:
mode:
authorJason Whittle2013-08-16 19:50:52 -0400
committerAdam Vandenberg2013-08-17 07:40:27 -0700
commit2c23e71be36731b1abe0e3850c17c45268a08371 (patch)
tree71e951f9771482ea073ad0ea269bea6f4214fc51 /Library/Homebrew/utils
parentecb78d54c03b030fa3d1bc7be202f1d85e89bdc5 (diff)
downloadbrew-2c23e71be36731b1abe0e3850c17c45268a08371.tar.bz2
let inreplace take a symbol
As discussed in https://github.com/mxcl/homebrew/pull/21936 Closes Homebrew/homebrew#21942. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Homebrew/utils')
-rw-r--r--Library/Homebrew/utils/inreplace.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/utils/inreplace.rb b/Library/Homebrew/utils/inreplace.rb
index 4b3cf9587..accb7d83c 100644
--- a/Library/Homebrew/utils/inreplace.rb
+++ b/Library/Homebrew/utils/inreplace.rb
@@ -9,6 +9,7 @@ module Utils
s.extend(StringInreplaceExtension)
yield s
else
+ after = after.to_s if Symbol === after
sub = s.gsub!(before, after)
if sub.nil?
opoo "inreplace in '#{path}' failed"