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>
This commit is contained in:
parent
ecb78d54c0
commit
2c23e71be3
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user