ruby-changes:44943
From: nobu <ko1@a...>
Date: Wed, 7 Dec 2016 23:26:49 +0900 (JST)
Subject: [ruby-changes:44943] nobu:r57016 (trunk): assertions.rb: defered message in FailDesc
nobu 2016-12-07 23:26:44 +0900 (Wed, 07 Dec 2016) New Revision: 57016 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57016 Log: assertions.rb: defered message in FailDesc * test/lib/test/unit/assertions.rb (FailDesc): allow to defer message generation, as well as other assertion methods. Modified files: trunk/test/lib/test/unit/assertions.rb Index: test/lib/test/unit/assertions.rb =================================================================== --- test/lib/test/unit/assertions.rb (revision 57015) +++ test/lib/test/unit/assertions.rb (revision 57016) @@ -530,6 +530,7 @@ EOT https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit/assertions.rb#L530 sigdesc << " (core dumped)" end full_message = '' + message = message.call if Proc === message if message and !message.empty? full_message << message << "\n" end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/