1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[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
This commit is contained in:
David Rodríguez 2019-11-30 14:03:12 +01:00 committed by Hiroshi SHIBATA
parent fa0f3eff22
commit a2fc6a51dd

View file

@ -381,7 +381,7 @@ eom
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}"