Ruby “or” vs. “||” gotcha
In irb:
>> truth = nil or true
=> true
>> truth
=> nil
>> truth = nil || true
=> true
>> truth
=> true
This is a tumblelog, kinda like a blog but with short-form, mixed-media posts with stuff I like. Scroll down a bit to start reading, or a bit more to read more about me.
In irb:
>> truth = nil or true
=> true
>> truth
=> nil
>> truth = nil || true
=> true
>> truth
=> true