diff options
author | Alexey Gaziev <alex.gaziev@gmail.com> | 2012-10-30 10:23:41 +0800 |
---|---|---|
committer | Alexey Gaziev <alex.gaziev@gmail.com> | 2012-10-30 10:23:41 +0800 |
commit | b955939d55b71905fa3e5036149ee4c84943c599 (patch) | |
tree | faceebca94859de69e12f4d7b48e9958b1631575 /activesupport/lib/active_support/core_ext/array/uniq_by.rb | |
parent | 4e23c0ef341c2cba6a4b21022d4ffbabdaa6e3da (diff) | |
download | rails-b955939d55b71905fa3e5036149ee4c84943c599.tar.gz rails-b955939d55b71905fa3e5036149ee4c84943c599.tar.bz2 rails-b955939d55b71905fa3e5036149ee4c84943c599.zip |
Make caller attribute in deprecation methods optional
Diffstat (limited to 'activesupport/lib/active_support/core_ext/array/uniq_by.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/array/uniq_by.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 c1d5a355a4..ca3b7748cd 100644 --- a/activesupport/lib/active_support/core_ext/array/uniq_by.rb +++ b/activesupport/lib/active_support/core_ext/array/uniq_by.rb @@ -5,7 +5,7 @@ class Array # # [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', caller + ActiveSupport::Deprecation.warn 'uniq_by is deprecated. Use Array#uniq instead' uniq(&block) end @@ -13,7 +13,7 @@ class Array # # Same as +uniq_by+, but modifies +self+. def uniq_by!(&block) - ActiveSupport::Deprecation.warn 'uniq_by! is deprecated. Use Array#uniq! instead', caller + ActiveSupport::Deprecation.warn 'uniq_by! is deprecated. Use Array#uniq! instead' uniq!(&block) end end |