diff options
author | Aman Gupta <aman@tmm1.net> | 2013-11-20 14:55:55 -0800 |
---|---|---|
committer | Aman Gupta <aman@tmm1.net> | 2013-11-20 14:55:55 -0800 |
commit | 30ba7ee5961bc2c424f28e0319b65f37381d623f (patch) | |
tree | 7db648a0bbe7a52c41b22df16a2c624fb4a554b8 /activesupport/lib/active_support | |
parent | 64b9e93bb571160315987862583a83222e506734 (diff) | |
download | rails-30ba7ee5961bc2c424f28e0319b65f37381d623f.tar.gz rails-30ba7ee5961bc2c424f28e0319b65f37381d623f.tar.bz2 rails-30ba7ee5961bc2c424f28e0319b65f37381d623f.zip |
Expand double-negative in String#blank? regex
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/blank.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/blank.rb b/activesupport/lib/active_support/core_ext/object/blank.rb index 8a5eb4bc93..f9ff4d9567 100644 --- a/activesupport/lib/active_support/core_ext/object/blank.rb +++ b/activesupport/lib/active_support/core_ext/object/blank.rb @@ -90,7 +90,7 @@ class String # ' '.blank? # => true # ' something here '.blank? # => false def blank? - self !~ /[^[:space:]]/ + self =~ /\A[[:space:]]*\z/ end end |