提交 7657a033 编写于 作者: R Rafael Mendonça França

Merge pull request #16345 from robin850/rbx-tidy-bytes

Prevent using String#scrub on Rubinius
......@@ -213,7 +213,8 @@ def compose(codepoints)
end
# Ruby >= 2.1 has String#scrub, which is faster than the workaround used for < 2.1.
if '<3'.respond_to?(:scrub)
# Rubinius' String#scrub, however, doesn't support ASCII-incompatible chars.
if '<3'.respond_to?(:scrub) && !defined?(Rubinius)
# Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent
# resulting in a valid UTF-8 string.
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册