[前][次][番号順一覧][スレッド一覧]

ruby-changes:68326

From: Nobuyoshi <ko1@a...>
Date: Sat, 9 Oct 2021 14:31:27 +0900 (JST)
Subject: [ruby-changes:68326] 489c22b17f (master): Let `Test::Unit::CoreAssertions::AllFailures#for` yield the key

https://git.ruby-lang.org/ruby.git/commit/?id=489c22b17f

From 489c22b17f347d15500931397a1a4c8b66b023dd Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 9 Oct 2021 14:22:18 +0900
Subject: 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 https://github.com/ruby/ruby/blob/trunk/tool/lib/core_assertions.rb#L640
 
         def for(key)
           @count += 1
-          yield
+          yield key
         rescue Exception => e
           @failures[key] = [@count, e]
         end
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]