diff --git a/lib/rubocop/cop/custom/ip_ranges.rb b/lib/rubocop/cop/custom/ip_ranges.rb index 9748ed7..014118d 100644 --- a/lib/rubocop/cop/custom/ip_ranges.rb +++ b/lib/rubocop/cop/custom/ip_ranges.rb @@ -75,7 +75,7 @@ def read_node_ips(value) end def normalise_list(ips) - ips.sort_by(&IPAddr.method(:new)) + ips.uniq.sort_by(&IPAddr.method(:new)) end def register_offense(node, new_ips, **params)