“and” vs && and “or” vs || in Ruby
If you use Ruby long enough, you will discover the
oroperators. These appear at first glance to be synonyms for
||. You will then be tempted to use these English oprators in place of
||, for the sake of improved readability. Assuming you yield to that temptation, you will eventually find yourself rudely surprised that
ordon’t behave quite like their symbolic kin...
Avdi Grimm presents a concise guide to a matter that confuses the majority of Ruby developers from time to time.