Skip to content

Commit

Permalink
Use append_features instead of included to get the inclusion order right
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Apr 20, 2008
1 parent 3b93ca2 commit 59f5d4f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion activesupport/lib/active_support/core_ext/string/unicode.rb
Expand Up @@ -4,10 +4,11 @@ module String #:nodoc:
unless '1.9'.respond_to?(:force_encoding)
# Define methods for handling unicode data.
module Unicode
def self.included(base)
def self.append_features(base)
if '1.8.7'.respond_to?(:chars)
base.class_eval { remove_method :chars }
end
super
end

# +chars+ is a Unicode safe proxy for string methods. It creates and returns an instance of the
Expand Down

0 comments on commit 59f5d4f

Please sign in to comment.