ruby-changes:21717
From: naruse <ko1@a...>
Date: Wed, 16 Nov 2011 10:00:06 +0900 (JST)
Subject: [ruby-changes:21717] naruse:r33766 (trunk): * lib/minitest/unit.rb (assert_raises): experimental fix to run
naruse 2011-11-16 09:59:56 +0900 (Wed, 16 Nov 2011) New Revision: 33766 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33766 Log: * lib/minitest/unit.rb (assert_raises): experimental fix to run correctly on chkbuild over 64bit linux. call exception_details only when the detail is really needed to avoid create needless inspect under ulimit-ed environment. Modified files: trunk/ChangeLog trunk/lib/minitest/unit.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 33765) +++ ChangeLog (revision 33766) @@ -1,3 +1,10 @@ +Wed Nov 16 09:39:27 2011 NARUSE, Yui <naruse@r...> + + * lib/minitest/unit.rb (assert_raises): experimental fix to run + correctly on chkbuild over 64bit linux. call exception_details only + when the detail is really needed to avoid create needless inspect + under ulimit-ed environment. + Wed Nov 16 06:34:30 2011 Tanaka Akira <akr@f...> * test/ruby/test_thread.rb (test_condvar_timed_wait): use Index: lib/minitest/unit.rb =================================================================== --- lib/minitest/unit.rb (revision 33765) +++ lib/minitest/unit.rb (revision 33766) @@ -357,9 +357,10 @@ end rescue Exception => e details = "#{msg}#{mu_pp(exp)} exception expected, not" - assert(exp.any? { |ex| - ex.instance_of?(Module) ? e.kind_of?(ex) : ex == e.class - }, exception_details(e, details)) + bool = exp.any? { |ex| + ex.instance_of?(Module) ? e.kind_of?(ex) : ex == e.class + } + assert(bool, exception_details(e, details)) unless bool return e end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/