diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-08 07:09:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-08 07:09:14 +0000 |
commit | 1a633537f8ca8210cb851ef34103c8befecb6c03 (patch) | |
tree | 98f8cbf9649183c55d310886585cad04db666df0 /lib/test/unit | |
parent | 3d881966322458abe94cfb409b1606ceaaad49d7 (diff) | |
download | ruby-1a633537f8ca8210cb851ef34103c8befecb6c03.tar.gz |
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
Diffstat (limited to 'lib/test/unit')
-rw-r--r-- | lib/test/unit/assertions.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |