1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Expand double-negative in String#blank? regex

This commit is contained in:
Aman Gupta 2013-11-20 14:55:55 -08:00
parent 64b9e93bb5
commit 30ba7ee596

View file

@ -90,7 +90,7 @@ class String
# ' '.blank? # => true # ' '.blank? # => true
# ' something here '.blank? # => false # ' something here '.blank? # => false
def blank? def blank?
self !~ /[^[:space:]]/ self =~ /\A[[:space:]]*\z/
end end
end end