aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/object/blank.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/blank.rb b/activesupport/lib/active_support/core_ext/object/blank.rb
index 20085c4fb3..fb5abf2aa5 100644
--- a/activesupport/lib/active_support/core_ext/object/blank.rb
+++ b/activesupport/lib/active_support/core_ext/object/blank.rb
@@ -1,14 +1,14 @@
class Object
# An object is blank if it's false, empty, or a whitespace string.
- # For example, "", " ", +nil+, [], and {} are blank.
+ # For example, "", " ", +nil+, [], and {} are all blank.
#
# This simplifies:
#
- # if !address.nil? && !address.empty?
+ # if address.nil? || address.empty?
#
# ...to:
#
- # if !address.blank?
+ # if address.blank?
def blank?
respond_to?(:empty?) ? empty? : !self
end