提交 36121d29 编写于 作者: J Jeremy Kemper

Ruby 1.9 doesn't recognize EM SPACE as whitespace, breaking String#strip

上级 13004c37
......@@ -102,7 +102,13 @@ def setup
# NEWLINE, SPACE, EM SPACE
@whitespace = "\n#{[32, 8195].pack('U*')}"
@whitespace.force_encoding(Encoding::UTF_8) if @whitespace.respond_to?(:force_encoding)
# Ruby 1.9 doesn't recognize EM SPACE as whitespace!
if @whitespace.respond_to?(:force_encoding)
@whitespace.slice!(2)
@whitespace.force_encoding(Encoding::UTF_8)
end
@byte_order_mark = [65279].pack('U')
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册