ruby-changes:31295
From: nobu <ko1@a...>
Date: Mon, 21 Oct 2013 23:53:37 +0900 (JST)
Subject: [ruby-changes:31295] nobu:r43374 (trunk): assertions.rb: fix omitted message
nobu 2013-10-21 23:53:31 +0900 (Mon, 21 Oct 2013) New Revision: 43374 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43374 Log: assertions.rb: fix omitted message * lib/test/unit/assertions.rb (assert_raise_with_message): remove omitted message by splatting nil. Modified files: trunk/lib/test/unit/assertions.rb Index: lib/test/unit/assertions.rb =================================================================== --- lib/test/unit/assertions.rb (revision 43373) +++ lib/test/unit/assertions.rb (revision 43374) @@ -98,7 +98,7 @@ module Test https://github.com/ruby/ruby/blob/trunk/lib/test/unit/assertions.rb#L98 raise TypeError, "Expected #{expected.inspect} to be a kind of String or Regexp, not #{expected.class}" end - ex = assert_raise(exception, msg) {yield} + ex = assert_raise(exception, *msg) {yield} msg = message(msg, "") {"Expected Exception(#{exception}) was raised, but the message doesn't match"} __send__(assert, expected, ex.message, msg) ex -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/