From 1c06bd17a9faf0ad05bf0336eea4d219c0960bbc Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Mon, 1 Jul 2013 22:33:42 -0300 Subject: Remove deprecated Array#uniq_by and Array#uniq_by! Use native Array#uniq and Array#uniq! instead. --- activesupport/lib/active_support/core_ext/array.rb | 1 - .../lib/active_support/core_ext/array/uniq_by.rb | 19 ------------------- 2 files changed, 20 deletions(-) delete mode 100644 activesupport/lib/active_support/core_ext/array/uniq_by.rb (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/core_ext/array.rb b/activesupport/lib/active_support/core_ext/array.rb index 79ba79192a..7d0c1e4c8d 100644 --- a/activesupport/lib/active_support/core_ext/array.rb +++ b/activesupport/lib/active_support/core_ext/array.rb @@ -1,6 +1,5 @@ require 'active_support/core_ext/array/wrap' require 'active_support/core_ext/array/access' -require 'active_support/core_ext/array/uniq_by' require 'active_support/core_ext/array/conversions' require 'active_support/core_ext/array/extract_options' require 'active_support/core_ext/array/grouping' diff --git a/activesupport/lib/active_support/core_ext/array/uniq_by.rb b/activesupport/lib/active_support/core_ext/array/uniq_by.rb deleted file mode 100644 index 23573c97de..0000000000 --- a/activesupport/lib/active_support/core_ext/array/uniq_by.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Array - # *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] - def uniq_by(&block) - ActiveSupport::Deprecation.warn 'uniq_by is deprecated. Use Array#uniq instead' - uniq(&block) - end - - # *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' - uniq!(&block) - end -end -- cgit v1.2.3