1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2013-03-08 07:09:14 +00:00
parent 3d88196632
commit 1a633537f8

View file

@ -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