Permalink
Browse files

Please use assert_equal instead of diff directly

  • Loading branch information...
1 parent 270d1cf commit c0c87922baf47eed64a53d3afceba978bb175da9 @zenspider zenspider committed Nov 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/core_ext/hash/diff.rb
View
2 activesupport/lib/active_support/core_ext/hash/diff.rb
@@ -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) })

0 comments on commit c0c8792

Please sign in to comment.