aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb
diff options
context:
space:
mode:
authorMikel Lindsaar <raasdnil@gmail.com>2009-11-24 21:45:14 +1100
committerMikel Lindsaar <raasdnil@gmail.com>2009-11-24 21:45:14 +1100
commit5f2395041d1578433fa825ed5c6f26a201f2203d (patch)
tree3b78531ae77a2173ad0df1103543bdfea0b1f60f /activesupport/lib/active_support/core_ext/string/starts_ends_with.rb
parent3a72923e27195983d37bdb39ef26b29cf03d3483 (diff)
parente62e6d409986cd5c99234689aa49e3162d7b3a59 (diff)
downloadrails-5f2395041d1578433fa825ed5c6f26a201f2203d.tar.gz
rails-5f2395041d1578433fa825ed5c6f26a201f2203d.tar.bz2
rails-5f2395041d1578433fa825ed5c6f26a201f2203d.zip
Merge branch 'master' of git://github.com/rails/rails into rails_master
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string/starts_ends_with.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/string/starts_ends_with.rb14
1 files changed, 0 insertions, 14 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb b/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb
index f65bb8f75b..641acf62d0 100644
--- a/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb
+++ b/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb
@@ -1,18 +1,4 @@
class String
- unless '1.8.7 and up'.respond_to?(:start_with?)
- # Does the string start with the specified +prefix+?
- def start_with?(prefix)
- prefix = prefix.to_s
- self[0, prefix.length] == prefix
- end
-
- # Does the string end with the specified +suffix+?
- def end_with?(suffix)
- suffix = suffix.to_s
- self[-suffix.length, suffix.length] == suffix
- end
- end
-
alias_method :starts_with?, :start_with?
alias_method :ends_with?, :end_with?
end