What's the difference between "or" and | in ruby?

Viewed 544

I thought the only difference was between | and || where | would be equivalent to or. But I realised the latter is incorrect and now I'm confused.

AMEND: I understand this question to be different from ruby bitwise or while mine is about the lack of understanding of the difference between bitwise and boolean operators as pointed out here in comments and answers. Besides, in my opinion the answers to this question have been more relevant and clearer to the problem itself. Flagging as duplicate would dissuade users from the better answers.

2 Answers
Related