It’s always confusing when you have similar methods that have slightly different meaning. What’s the difference between not vs !, and and &&?
The difference between is subtle enough that it might not matter most of the time, but it might bite you in the ass one day. It doesn’t say which is which, this post gives the example of precedence order. But just by experimenting, you can see that it’s and, or, and not that form statements, which can’t be used in arguments
String.new(“hey” || “hello”) #=> “hey”
String.new(nil || “hello”) #=> “hello”
String.new(nil or “hello”) #=> error: can’t used statements in arguments
String.new((nil or “hello”)) #=> “hello” putting it in parens makes it ok, but ugly