RuboCop::Cop
This cop checks for comparison of something with nil using ==.
@example
# bad if x == nil # good if x.nil?
# File lib/rubocop/cop/style/nil_comparison.rb, line 21 def on_send(node) _receiver, method, args = *node return unless OPS.include?(method) add_offense(node, :selector) if args == NIL_NODE end
[Validate]
Generated with the Darkfish Rdoc Generator 2.