Last Updated: February 25, 2016
·
195
· deepakhb2

nil in Ruby

'nil || false' returns false and 'false || nil' returns nil.

In ruby both nil and false are evaluated as false value. So the right hand side value is been returned.