aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-05-07 12:13:38 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-05-07 12:13:38 +0530
commit162bf8ffb1bef8729f22e2adfae7b1a5d096173d (patch)
treeee23bd57f775c6cff7436416e92c205dc5b71882 /activesupport/lib/active_support/core_ext
parent5e235278c479b9060f8dd1eb32a1abd0894b7070 (diff)
downloadrails-162bf8ffb1bef8729f22e2adfae7b1a5d096173d.tar.gz
rails-162bf8ffb1bef8729f22e2adfae7b1a5d096173d.tar.bz2
rails-162bf8ffb1bef8729f22e2adfae7b1a5d096173d.zip
revises comment for blank? method
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-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