>       return false if (self ^ 4).zero?
>       return true  if (self ^ 1).zero?

Okay, these two lines were silly; replace with:

return false if self == 4
return true if self == 1