diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2011-05-07 12:13:38 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2011-05-07 12:13:38 +0530 |
commit | 162bf8ffb1bef8729f22e2adfae7b1a5d096173d (patch) | |
tree | ee23bd57f775c6cff7436416e92c205dc5b71882 /activesupport/lib | |
parent | 5e235278c479b9060f8dd1eb32a1abd0894b7070 (diff) | |
download | rails-162bf8ffb1bef8729f22e2adfae7b1a5d096173d.tar.gz rails-162bf8ffb1bef8729f22e2adfae7b1a5d096173d.tar.bz2 rails-162bf8ffb1bef8729f22e2adfae7b1a5d096173d.zip |
revises comment for blank? method
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/blank.rb | 6 |
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 |