diff options
| author | Adam Vandenberg | 2010-08-08 09:13:27 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-08-08 09:13:27 -0700 |
| commit | 013fe4bf38d0ae950fe6a14e8b70ee74370fc3eb (patch) | |
| tree | 796135684aca8e5573d277d26c2da7a51c09398b /Library/Contributions/examples | |
| parent | eca31da253471f2f8fc2893e35281aa0c7a357ed (diff) | |
| download | brew-013fe4bf38d0ae950fe6a14e8b70ee74370fc3eb.tar.bz2 | |
Move Pathname.starts_with? into Pathname
Diffstat (limited to 'Library/Contributions/examples')
| -rwxr-xr-x | Library/Contributions/examples/brew-which.rb | 9 |
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 |
