aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorJack Nagel2014-07-09 16:53:37 -0500
committerJack Nagel2014-07-09 17:04:52 -0500
commitca37b74c0731fdfe6b31b4801213d350bb47c28e (patch)
tree694e57dce721c6a715583c3bd3f4fa9f7203a4df /Library/Homebrew/cmd
parentfd4a54dad7d7ff7ca8230dae92d6bb887bf12a50 (diff)
downloadhomebrew-ca37b74c0731fdfe6b31b4801213d350bb47c28e.tar.bz2
Clean up /bin/df regexp
- remove unnecessary captures - '%' is not a metacharacter so it doesn't need to be escaped - match using '+' instead of '*'
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/doctor.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 5f385556e..757dc0c46 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -35,8 +35,8 @@ class Volumes
io.each_line do |line|
case line.chomp
# regex matches: /dev/disk0s2 489562928 440803616 48247312 91% /
- when /^(.*)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]{1,3}\%)\s+(.*)/
- vols << $6
+ when /^.+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]{1,3}%\s+(.+)/
+ vols << $1
end
end
end