diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-07-01 22:33:42 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-07-01 22:33:42 -0300 |
commit | 1c06bd17a9faf0ad05bf0336eea4d219c0960bbc (patch) | |
tree | 9f663d30ead3f11d86370b6f1973ce270b70f2fa /activesupport/lib/active_support | |
parent | cad3a1308604c9892c4d1cd5d588d93ca1d43f4c (diff) | |
download | rails-1c06bd17a9faf0ad05bf0336eea4d219c0960bbc.tar.gz rails-1c06bd17a9faf0ad05bf0336eea4d219c0960bbc.tar.bz2 rails-1c06bd17a9faf0ad05bf0336eea4d219c0960bbc.zip |
Remove deprecated Array#uniq_by and Array#uniq_by!
Use native Array#uniq and Array#uniq! instead.
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core_ext/array.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/array/uniq_by.rb | 19 |
2 files changed, 0 insertions, 20 deletions
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 <tt>Array#uniq</tt> 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 <tt>Array#uniq!</tt> 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 |