Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Expand double-negative in String#blank? regex

  • Loading branch information...
commit 30ba7ee5961bc2c424f28e0319b65f37381d623f 1 parent 64b9e93
@tmm1 tmm1 authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activesupport/lib/active_support/core_ext/object/blank.rb
View
2  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
Please sign in to comment.
Something went wrong with that request. Please try again.