aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-04-19 16:06:30 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-04-19 17:15:50 -0700
commit715db1a7973dfc02466207a913bacc4702187dad (patch)
treecf9599d41ffe802cc0457462d96050eb3fc42ca7 /activesupport
parentdb11ef9546b1ad16cf539395b75450c1c8e9714c (diff)
downloadrails-715db1a7973dfc02466207a913bacc4702187dad.tar.gz
rails-715db1a7973dfc02466207a913bacc4702187dad.tar.bz2
rails-715db1a7973dfc02466207a913bacc4702187dad.zip
Feature check :force_encoding instead of RUBY_VERSION
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/string/access.rb2
-rw-r--r--activesupport/lib/active_support/core_ext/string/unicode.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/access.rb b/activesupport/lib/active_support/core_ext/string/access.rb
index 89999ff136..1a949c0b77 100644
--- a/activesupport/lib/active_support/core_ext/string/access.rb
+++ b/activesupport/lib/active_support/core_ext/string/access.rb
@@ -1,7 +1,7 @@
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module String #:nodoc:
- if RUBY_VERSION < '1.9'
+ unless '1.9'.respond_to?(:force_encoding)
# Makes it easier to access parts of a string, such as specific characters and substrings.
module Access
# Returns the character at the +position+ treating the string as an array (where 0 is the first character).
diff --git a/activesupport/lib/active_support/core_ext/string/unicode.rb b/activesupport/lib/active_support/core_ext/string/unicode.rb
index 0e9770af25..963920d4a6 100644
--- a/activesupport/lib/active_support/core_ext/string/unicode.rb
+++ b/activesupport/lib/active_support/core_ext/string/unicode.rb
@@ -1,7 +1,7 @@
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module String #:nodoc:
- if RUBY_VERSION < '1.9'
+ unless '1.9'.respond_to?(:force_encoding)
# Define methods for handling unicode data.
module Unicode
# +chars+ is a Unicode safe proxy for string methods. It creates and returns an instance of the