http://devblog.avdi.org/2010/08/02/using-and-and-or-in-ruby/

this is a good post explaining their precedence and also the cases you're most likely to use them.