From 489c22b17f347d15500931397a1a4c8b66b023dd Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 9 Oct 2021 14:22:18 +0900 Subject: [PATCH] Let `Test::Unit::CoreAssertions::AllFailures#for` yield the key Similar to `Test::Unit::CoreAssertions::AllFailures#foreach`. --- tool/lib/core_assertions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb index 9530187db4..33c49f518b 100644 --- a/tool/lib/core_assertions.rb +++ b/tool/lib/core_assertions.rb @@ -640,7 +640,7 @@ eom def for(key) @count += 1 - yield + yield key rescue Exception => e @failures[key] = [@count, e] end