aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Contributions/examples
diff options
context:
space:
mode:
authorAdam Vandenberg2010-08-08 09:13:27 -0700
committerAdam Vandenberg2010-08-08 09:13:27 -0700
commit013fe4bf38d0ae950fe6a14e8b70ee74370fc3eb (patch)
tree796135684aca8e5573d277d26c2da7a51c09398b /Library/Contributions/examples
parenteca31da253471f2f8fc2893e35281aa0c7a357ed (diff)
downloadbrew-013fe4bf38d0ae950fe6a14e8b70ee74370fc3eb.tar.bz2
Move Pathname.starts_with? into Pathname
Diffstat (limited to 'Library/Contributions/examples')
-rwxr-xr-xLibrary/Contributions/examples/brew-which.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/Library/Contributions/examples/brew-which.rb b/Library/Contributions/examples/brew-which.rb
index a331e9f45..9e5eb64fb 100755
--- a/Library/Contributions/examples/brew-which.rb
+++ b/Library/Contributions/examples/brew-which.rb
@@ -3,19 +3,12 @@ require 'extend/pathname'
REAL_CELLAR = HOMEBREW_CELLAR.realpath
class String
- def starts_with?(prefix)
+ def starts_with? prefix
prefix = prefix.to_s
self[0, prefix.length] == prefix
end
end
-class Pathname
- def starts_with?(prefix)
- prefix = prefix.to_s
- self.to_s[0, prefix.length] == prefix
- end
-end
-
def audit
brew_links = Array.new