aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2013-11-20 14:55:55 -0800
committerAman Gupta <aman@tmm1.net>2013-11-20 14:55:55 -0800
commit30ba7ee5961bc2c424f28e0319b65f37381d623f (patch)
tree7db648a0bbe7a52c41b22df16a2c624fb4a554b8 /activesupport
parent64b9e93bb571160315987862583a83222e506734 (diff)
downloadrails-30ba7ee5961bc2c424f28e0319b65f37381d623f.tar.gz
rails-30ba7ee5961bc2c424f28e0319b65f37381d623f.tar.bz2
rails-30ba7ee5961bc2c424f28e0319b65f37381d623f.zip
Expand double-negative in String#blank? regex
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/object/blank.rb2
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