提交 9b423c98 编写于 作者: X Xavier Noria

Merge pull request #12976 from tmm1/faster-blank

Faster String#blank?
......@@ -90,7 +90,7 @@ class String
# ' '.blank? # => true
# ' something here '.blank? # => false
def blank?
self !~ /[^[:space:]]/
self =~ /\A[[:space:]]*\z/
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册