Is it better to use obj.nil? or obj == nil and what are the benefits of both?
obj.nil?
obj == nil
Some might suggest that using .nil? is slower than the simple comparison, which makes sense when you think about it.
But if scale and speed are not your concern, then .nil? is perhaps more readable.