In Ruby, there are two sets of logical operators: [!, &&, ||] and [not, and, or]. [!, &&, ||]’s precedence is higher than the assignments (=, %=, ~=, /=, etc.) while [not, and, or]’s precedence is lower. Also note that while &&’s precedence is higher than ||’s, the and’s precedence is the same as the or’s.