RubyFlow The Ruby and Rails community linklog

How to use Ruby's English "and"/"or" operators without going nuts

Ruby has both symbolic (&&/||) and English logical and/or operators. The differences between these operators can be confusing, to the point that many programmers simply avoid using the English versions entirely rather than deal with their sometimes surprising behavior. I’ve made a screencast which explains why the very features which make these operators problematic in a boolean logic setting also make them perfect for certain elegant control flow idioms.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in