Apparently I wasn’t programming ruby the right way. I actually enjoyed the and
and or
statements, even in if-statements, and preferr them over the more classical programming constructs of &&
and ||
… but this article explains the ‘right’ way:
and
and or
for control (e.g. do this and that, or this or that)&&
and ||
for boolean checks (e.g. if this is true and that is true)But on the other hand, hey, both works, do what you like. Ruby is a friend, not a compiler.