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

ruby-changes:59006

From: David <ko1@a...>
Date: Sun, 1 Dec 2019 08:30:24 +0900 (JST)
Subject: [ruby-changes:59006] a2fc6a51dd (master): [ruby/fileutils] Fix test failure under ruby 2.4

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

From a2fc6a51dd2e1a153559038795e1e2509f9c6a94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Sat, 30 Nov 2019 14:03:12 +0100
Subject: [ruby/fileutils] Fix test failure under ruby 2.4

`Exception#full_message` is only defined on ruby 2.5.0 and above.

https://github.com/ruby/fileutils/commit/a8968f41ed

diff --git a/tool/lib/test/unit/core_assertions.rb b/tool/lib/test/unit/core_assertions.rb
index b256656..00555d6 100644
--- a/tool/lib/test/unit/core_assertions.rb
+++ b/tool/lib/test/unit/core_assertions.rb
@@ -381,7 +381,7 @@ eom https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/core_assertions.rb#L381
           msg = "exceptions on #{errs.length} threads:\n" +
             errs.map {|t, err|
             "#{t.inspect}:\n" +
-              err.full_message(highlight: false, order: :top)
+              RUBY_VERSION >= "2.5.0" ? err.full_message(highlight: false, order: :top) : err.message
           }.join("\n---\n")
           if message
             msg = "#{message}\n#{msg}"
-- 
cgit v0.10.2


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

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