aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object/blank.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-05-06 17:30:00 +0200
committerXavier Noria <fxn@hashref.com>2011-05-06 17:30:00 +0200
commitef2738472d5c9e6e561d97c9fadbad6b3863017f (patch)
treefa96c4ea908ed553e6b43f384f601eeeab22374a /activesupport/lib/active_support/core_ext/object/blank.rb
parenta4b6e3d9be338e93320606f7cb14759b26ced8df (diff)
downloadrails-ef2738472d5c9e6e561d97c9fadbad6b3863017f.tar.gz
rails-ef2738472d5c9e6e561d97c9fadbad6b3863017f.tar.bz2
rails-ef2738472d5c9e6e561d97c9fadbad6b3863017f.zip
Revert "Small edit to the if statement simplification for blank? on the Object class. An Object doesn't need to be nil and empty to be blank? just one or the other."
Reason: the original code is correct, see !nil && !empty -> !(nil || empty) -> !blank That said, this example has too many negations for my linking. Think should be revised to be more positive and straightforward to read. This reverts commit a4b6e3d9be338e93320606f7cb14759b26ced8df.
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object/blank.rb')
-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 d756b8cca0..20085c4fb3 100644
--- a/activesupport/lib/active_support/core_ext/object/blank.rb
+++ b/activesupport/lib/active_support/core_ext/object/blank.rb
@@ -4,7 +4,7 @@ class Object
#
# This simplifies:
#
- # if !address.nil? || !address.empty?
+ # if !address.nil? && !address.empty?
#
# ...to:
#