Permalink
Browse files

Feature check :force_encoding instead of RUBY_VERSION

  • Loading branch information...
1 parent db11ef9 commit 715db1a7973dfc02466207a913bacc4702187dad @jeremy jeremy committed Apr 19, 2008
@@ -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).
@@ -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

0 comments on commit 715db1a

Please sign in to comment.