diff options
| author | Trevor Wennblom | 2011-07-22 13:52:45 -0500 |
|---|---|---|
| committer | Adam Vandenberg | 2011-07-27 17:38:26 -0700 |
| commit | ee089053b3ff17616e71c0ba3db5d1033b4204c3 (patch) | |
| tree | b97353fc237ab95fad3f5129b0d4bde53198784d /Library | |
| parent | 917bdbc823b933f6db9c4a25ed23261bc44f44c8 (diff) | |
| download | homebrew-ee089053b3ff17616e71c0ba3db5d1033b4204c3.tar.bz2 | |
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 #6546
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/extend/string.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/string.rb b/Library/Homebrew/extend/string.rb index 0246f0c90..3238f97df 100644 --- a/Library/Homebrew/extend/string.rb +++ b/Library/Homebrew/extend/string.rb @@ -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?"), "" |
