From fa0f3eff228bb26de6d5b0e1238b1f358165dbd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Sat, 30 Nov 2019 14:01:18 +0100 Subject: [PATCH] [ruby/fileutils] Fix error printing test failure `exception_details` is not defined anywhere. This commit fixes the following test crash in ruby 2.4 ``` Error: test_assert_output_lines(TestFileUtils): NoMethodError: undefined method `exception_details' for # ``` And replaces it with an actual test failure: ``` [Test::Unit::CoreAssertions::MiniTest::Assertion] exception expected, not # Did you mean? message>. ``` https://github.com/ruby/fileutils/commit/2f38ba6e82 --- tool/lib/test/unit/core_assertions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/lib/test/unit/core_assertions.rb b/tool/lib/test/unit/core_assertions.rb index 63d79ae2aa..b2566561ce 100644 --- a/tool/lib/test/unit/core_assertions.rb +++ b/tool/lib/test/unit/core_assertions.rb @@ -216,7 +216,7 @@ eom } assert expected, proc { - exception_details(e, message(msg) {"#{mu_pp(exp)} exception expected, not"}.call) + flunk(message(msg) {"#{mu_pp(exp)} exception expected, not #{mu_pp(e)}"}) } return e