提交 59f5d4fc 编写于 作者: J Jeremy Kemper

Use append_features instead of included to get the inclusion order right

上级 3b93ca22
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册