diff --git a/test/lib/test/unit/assertions.rb b/test/lib/test/unit/assertions.rb index 435719a22e..6d255f5869 100644 --- a/test/lib/test/unit/assertions.rb +++ b/test/lib/test/unit/assertions.rb @@ -450,7 +450,11 @@ EOT def message(msg = nil, *args, &default) # :nodoc: if Proc === msg super(nil, *args) do - [msg.call, (default.call if default)].compact.reject(&:empty?).join(".\n") + ary = [msg.call, (default.call if default)].compact.reject(&:empty?) + if 1 < ary.length + ary[0...-1] = ary[0...-1].map {|str| str.sub(/(?