From the docs:
uniq → new_aryuniq { |item| ... } → new_aryReturns a new array by removing duplicate values in self.If a block is given, it will use the return value of the block for comparison. It compares values using their
hashandeql?methods for efficiency.