aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/string.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/string.rb b/activesupport/lib/active_support/core_ext/string.rb
index b3e1b1189a..5497b6f6f6 100644
--- a/activesupport/lib/active_support/core_ext/string.rb
+++ b/activesupport/lib/active_support/core_ext/string.rb
@@ -10,7 +10,12 @@ class String #:nodoc:
include ActiveSupport::CoreExtensions::String::Access
include ActiveSupport::CoreExtensions::String::Conversions
include ActiveSupport::CoreExtensions::String::Inflections
- include ActiveSupport::CoreExtensions::String::StartsEndsWith
+ if RUBY_VERSION < '1.9'
+ include ActiveSupport::CoreExtensions::String::StartsEndsWith
+ else
+ alias starts_with? start_with?
+ alias ends_with? end_with?
+ end
if defined? ActiveSupport::CoreExtensions::String::Iterators
include ActiveSupport::CoreExtensions::String::Iterators
end