Possible Duplicate:
Is there any wisdom behind “and”, “or” operators in Ruby?
Ruby logical operators
Looking for an explanation of Ruby's and
operator, contrasted with the &&
operator. I get from this post that there's a precedence difference, but the author simply recommends against using and
, rather than revealing what meaningful purpose it might serve in the language.
Additionally, what's the practical reason for using one over the other?