diff --git a/activesupport/lib/active_support/core_ext/array/uniq_by.rb b/activesupport/lib/active_support/core_ext/array/uniq_by.rb index edc164dabdd51..ac3dedc0e306b 100644 --- a/activesupport/lib/active_support/core_ext/array/uniq_by.rb +++ b/activesupport/lib/active_support/core_ext/array/uniq_by.rb @@ -1,5 +1,7 @@ class Array - # Returns an unique array based on the criteria given as a +Proc+. + # *DEPRECATED*: Use +Array#uniq+ instead. + # + # Returns a unique array based on the criteria in the block. # # [1, 2, 3, 4].uniq_by { |i| i.odd? } # => [1, 2] # @@ -9,7 +11,9 @@ def uniq_by(&block) uniq(&block) end - # Same as uniq_by, but modifies self. + # *DEPRECATED*: Use +Array#uniq!+ instead. + # + # Same as +uniq_by+, but modifies +self+. def uniq_by!(&block) ActiveSupport::Deprecation.warn "uniq_by! " \ "is deprecated. Use Array#uniq! instead", caller