diff --git a/lib/rspec/support/differ.rb b/lib/rspec/support/differ.rb index 3072e484..73ce3fd0 100644 --- a/lib/rspec/support/differ.rb +++ b/lib/rspec/support/differ.rb @@ -17,13 +17,9 @@ def diff(actual, expected) unless actual.nil? || expected.nil? if all_strings?(actual, expected) - if any_multiline_strings?(actual, expected) - diff = diff_as_string(coerce_to_string(actual), coerce_to_string(expected)) - end + diff = diff_as_string(coerce_to_string(actual), coerce_to_string(expected)) if any_multiline_strings?(actual, expected) elsif hash_with_anything?(expected) - if no_procs_no_numbers.call(actual, expected) - diff = diff_as_object_with_anything(actual, expected) - end + diff = diff_as_object_with_anything(actual, expected) if no_procs_no_numbers.call(actual, expected) elsif no_procs_no_numbers.call(actual, expected) diff = diff_as_object(actual, expected) end