aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend/string.rb
diff options
context:
space:
mode:
authorJack Nagel2015-06-19 22:17:29 -0400
committerJack Nagel2015-06-19 22:20:47 -0400
commitec1727a1bed5c431941972aeae064b6345e51321 (patch)
tree12b2e17c26c88cb3625c845ca630ae465ea3615b /Library/Homebrew/extend/string.rb
parent09f8c54f8388412250a6e847989992a78953b63f (diff)
downloadbrew-ec1727a1bed5c431941972aeae064b6345e51321.tar.bz2
Remove backports for Ruby 1.8.6
refs. Homebrew/linuxbrew#438, mistydemeo/tigerbrew#327, mistydemeo/tigerbrew#334
Diffstat (limited to 'Library/Homebrew/extend/string.rb')
-rw-r--r--Library/Homebrew/extend/string.rb27
1 files changed, 0 insertions, 27 deletions
diff --git a/Library/Homebrew/extend/string.rb b/Library/Homebrew/extend/string.rb
index c921a2a7d..17575ca8e 100644
--- a/Library/Homebrew/extend/string.rb
+++ b/Library/Homebrew/extend/string.rb
@@ -15,33 +15,6 @@ class String
# EOS
alias_method :undent_________________________________________________________72, :undent
- def start_with?(*prefixes)
- prefixes.any? do |prefix|
- if prefix.respond_to?(:to_str)
- prefix = prefix.to_str
- self[0, prefix.length] == prefix
- end
- end
- end unless method_defined?(:start_with?)
-
- def end_with?(*suffixes)
- suffixes.any? do |suffix|
- if suffix.respond_to?(:to_str)
- suffix = suffix.to_str
- self[-suffix.length, suffix.length] == suffix
- end
- end
- end unless method_defined?(:end_with?)
-
- # 1.8.7 or later; used in bottle code
- def rpartition(separator)
- if ind = rindex(separator)
- [slice(0, ind), separator, slice(ind+1, -1) || '']
- else
- ['', '', dup]
- end
- end unless method_defined?(:rpartition)
-
# String.chomp, but if result is empty: returns nil instead.
# Allows `chuzzle || foo` short-circuits.
def chuzzle