aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-16 00:59:56 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-16 00:59:56 +0000
commit12bde2dfabc3492d490e6c53628cf8cdf04495ff (patch)
tree16853c4c964be6cee88d73bca2a5ddab14db63bb
parentefdcaeaf32b6455e2ff97ae09fb46f7a5b831455 (diff)
downloadruby-12bde2dfabc3492d490e6c53628cf8cdf04495ff.tar.gz
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--lib/minitest/unit.rb7
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 39f066f188..c137bc431d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Wed Nov 16 09:39:27 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * 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@fsij.org>
* test/ruby/test_thread.rb (test_condvar_timed_wait): use
diff --git a/lib/minitest/unit.rb b/lib/minitest/unit.rb
index 38e3f3a83e..677aae767f 100644
--- a/lib/minitest/unit.rb
+++ b/lib/minitest/unit.rb
@@ -357,9 +357,10 @@ module MiniTest
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