lib/rspec/matchers/built_in/eql.rb in rspec-expectations-3.12.4 vs lib/rspec/matchers/built_in/eql.rb in rspec-expectations-3.13.0

- old
+ new

@@ -6,10 +6,14 @@ # Not intended to be instantiated directly. class Eql < BaseMatcher # @api private # @return [String] def failure_message - "\nexpected: #{expected_formatted}\n got: #{actual_formatted}\n\n(compared using eql?)\n" + if string_encoding_differs? + "\nexpected: #{format_encoding(expected)} #{expected_formatted}\n got: #{format_encoding(actual)} #{actual_formatted}\n\n(compared using eql?)\n" + else + "\nexpected: #{expected_formatted}\n got: #{actual_formatted}\n\n(compared using eql?)\n" + end end # @api private # @return [String] def failure_message_when_negated