lib/rubocop/cop/cop.rb in rubocop-1.48.1 vs lib/rubocop/cop/cop.rb in rubocop-1.49.0

- old
+ new

@@ -136,13 +136,13 @@ end def correction_lambda return unless support_autocorrect? - dedup_on_node(@v0_argument) { autocorrect(@v0_argument) } + dedupe_on_node(@v0_argument) { autocorrect(@v0_argument) } end - def dedup_on_node(node) + def dedupe_on_node(node) @corrected_nodes ||= {}.compare_by_identity yield unless @corrected_nodes.key?(node) ensure @corrected_nodes[node] = true end