aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend/string.rb
diff options
context:
space:
mode:
authorJack Nagel2013-02-15 00:35:52 -0600
committerJack Nagel2013-02-15 00:35:52 -0600
commit9fd5953ed931585275d7aa5050a5e7f02561421e (patch)
tree6c56658a86ad1a3a3573c08006d8cddbe21d68c3 /Library/Homebrew/extend/string.rb
parent2ef79d1387745945e8bb06c98f4407bccf52f859 (diff)
downloadbrew-9fd5953ed931585275d7aa5050a5e7f02561421e.tar.bz2
Make this more idiomatic
Diffstat (limited to 'Library/Homebrew/extend/string.rb')
-rw-r--r--Library/Homebrew/extend/string.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/Library/Homebrew/extend/string.rb b/Library/Homebrew/extend/string.rb
index e9f475b6e..8c86f5dbe 100644
--- a/Library/Homebrew/extend/string.rb
+++ b/Library/Homebrew/extend/string.rb
@@ -55,9 +55,7 @@ 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|
+ Array(flags).each do |flag|
# Also remove trailing \n, if present.
sub = gsub! Regexp.new("^#{flag}[ \\t]*=(.*)$\n?"), "", false
opoo "inreplace: removing '#{flag}' failed" if sub.nil?