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:
parent
64b9e93bb5
commit
30ba7ee596
1 changed files with 1 additions and 1 deletions
|
@ -90,7 +90,7 @@ class String
|
|||
# ' '.blank? # => true
|
||||
# ' something here '.blank? # => false
|
||||
def blank?
|
||||
self !~ /[^[:space:]]/
|
||||
self =~ /\A[[:space:]]*\z/
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue