From 1a633537f8ca8210cb851ef34103c8befecb6c03 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 8 Mar 2013 07:09:14 +0000 Subject: [PATCH] assertions.rb: split lines * lib/test/unit/assertions.rb (Test::Unit::Assertions#message): split msg and default procs by period and newline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/test/unit/assertions.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb index f810d5a714..7cfa243204 100644 --- a/lib/test/unit/assertions.rb +++ b/lib/test/unit/assertions.rb @@ -322,7 +322,9 @@ EOT def message(msg = nil, *args, &default) if Proc === msg - super(nil, *args) {"#{msg.call}#{default.call if default}"} + super(nil, *args) do + [msg.call, (default.call if default)].compact.reject(&:empty?).join(".\n") + end else super end