Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "Small edit to the if statement simplification for blank? on t…

…he 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 a4b6e3d.
  • Loading branch information...
commit ef2738472d5c9e6e561d97c9fadbad6b3863017f 1 parent a4b6e3d
@fxn fxn 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
@@ -4,7 +4,7 @@ class Object
#
# This simplifies:
#
- # if !address.nil? || !address.empty?
+ # if !address.nil? && !address.empty?
#
# ...to:
#
Please sign in to comment.
Something went wrong with that request. Please try again.