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

ruby-changes:67874

From: Hiroshi <ko1@a...>
Date: Sat, 11 Sep 2021 08:48:21 +0900 (JST)
Subject: [ruby-changes:67874] df86d78a26 (master): Use self class for diff

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

From df86d78a26edaafbaf317e86db946ab09700a920 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Tue, 7 Sep 2021 17:23:43 +0900
Subject: Use self class for diff

---
 tool/lib/test/unit/assertions.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tool/lib/test/unit/assertions.rb b/tool/lib/test/unit/assertions.rb
index c179f11..29ace55 100644
--- a/tool/lib/test/unit/assertions.rb
+++ b/tool/lib/test/unit/assertions.rb
@@ -45,7 +45,7 @@ module Test https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/assertions.rb#L45
         result = nil
 
         need_to_diff =
-          MiniTest::Assertions.diff &&
+          self.class.diff &&
           (expect.include?("\n")    ||
           butwas.include?("\n")    ||
           expect.size > 30         ||
@@ -68,7 +68,7 @@ module Test https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/assertions.rb#L68
             b.puts butwas
             b.flush
 
-            result = `#{MiniTest::Assertions.diff} #{a.path} #{b.path}`
+            result = `#{self.class.diff} #{a.path} #{b.path}`
             result.sub!(/^\-\-\- .+/, "--- expected")
             result.sub!(/^\+\+\+ .+/, "+++ actual")
 
-- 
cgit v1.1


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

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