Last Updated: February 25, 2016
·
146
· 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.