Coerce flags to an array in remove_make_var!
This is needed for Ruby 1.9.x compatibility, but we still don't support running Homebrew with anything other than a system provided 1.8.[67]. Fixes Homebrew/homebrew#6546 Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
e3e7831b48
commit
55791d4c10
@ -22,6 +22,8 @@ module StringInreplaceExtension
|
||||
|
||||
# Removes variable assignments completely.
|
||||
def remove_make_var! flags
|
||||
# Next line is for Ruby 1.9.x compatibility
|
||||
flags = [flags] unless flags.kind_of? Array
|
||||
flags.each do |flag|
|
||||
# Also remove trailing \n, if present.
|
||||
gsub! Regexp.new("^#{flag}[ \\t]*=(.*)$\n?"), ""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user