提交 46579340 编写于 作者: N Norman Clarke

Assume Encoding support

上级 d2a4acdb
......@@ -66,11 +66,7 @@ def respond_to?(method, include_private=false)
# Returns +true+ when the proxy class can handle the string. Returns +false+ otherwise.
def self.consumes?(string)
# Unpack is a little bit faster than regular expressions.
string.unpack('U*')
true
rescue ArgumentError
false
string.encoding == Encoding::UTF_8
end
include Comparable
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册