I find myself repeatedly looking for a clear definition of the differences of nil?, blank?, and empty? in Ruby on Rails. Here\'s the
nil?
blank?
empty?
Just a little note about the any? recommendation: He's right that it's generally equivalent to !empty?. However, any? will return true to a string of just whitespace (ala " ").
any?
!empty?
true
" "
And of course, see the 1.9 comment above, too.