lib/fasterer/scanners/method_call_scanner.rb in fasterer-0.1.10 vs lib/fasterer/scanners/method_call_scanner.rb in fasterer-0.1.11

- old
+ new

@@ -39,10 +39,12 @@ check_fetch_offense when :merge! check_merge_bang_offense when :last check_last_offense + when :include? + check_range_include_offense end end def check_module_eval_offense first_argument = method_call.arguments.first @@ -153,7 +155,12 @@ when :select add_offense(:select_last_vs_reverse_detect) end end + def check_range_include_offense + if method_call.receiver.is_a?(Primitive) && method_call.receiver.range? + add_offense(:include_vs_cover_on_range) + end + end end end