mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Please use assert_equal instead of diff directly
This commit is contained in:
parent
270d1cfe30
commit
c0c87922ba
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ class Hash
|
|||
# {}.diff(1 => 2) # => {1 => 2}
|
||||
# {1 => 2, 3 => 4}.diff(1 => 2) # => {3 => 4}
|
||||
def diff(other)
|
||||
ActiveSupport::Deprecation.warn "Hash#diff is no longer used inside of Rails, and is being deprecated with no replacement. If you're using it to compare hashes for the purpose of testing, please use MiniTest's diff instead."
|
||||
ActiveSupport::Deprecation.warn "Hash#diff is no longer used inside of Rails, and is being deprecated with no replacement. If you're using it to compare hashes for the purpose of testing, please use MiniTest's assert_equal instead."
|
||||
dup.
|
||||
delete_if { |k, v| other[k] == v }.
|
||||
merge!(other.dup.delete_if { |k, v| has_key?(k) })
|
||||
|
|
Loading…
Reference in a new issue