| is or
|| is logical or
& is and
&& is logical and
the difference between the normal and logical forms is that the logical form performs short curciut evaluation
so if I do this
def test
p "Hello"
return true
end
false && test
you will see that the word Hello isn't produced, likewise if I do this
true || test
the word Hello isn't produced either
bool |= bool2 is the same as bool = bool | bool2
there is also an &= which is the same as bool = bool & bool2