diff options
author | Nobuyoshi Nakada <[email protected]> | 2023-03-12 18:40:41 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2023-03-12 18:40:41 +0900 |
commit | 781222a8bc61597a72d6f64b15734a5fae38146a (patch) | |
tree | 209fbe01f2a03c9e47c7a30538073d7edc4be134 /tool/lib | |
parent | c9db9c8abd1f1191efbfd2e332010f0ae2e53c9c (diff) |
core_assertions.rb: Consider backward compatibilities
This file is copied to default gems, which might support older
versions.
Diffstat (limited to 'tool/lib')
-rw-r--r-- | tool/lib/core_assertions.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb index c646281549..872402727a 100644 --- a/tool/lib/core_assertions.rb +++ b/tool/lib/core_assertions.rb @@ -113,6 +113,8 @@ module Test def assert_no_memory_leak(args, prepare, code, message=nil, limit: 2.0, rss: false, **opt) # TODO: consider choosing some appropriate limit for RJIT and stop skipping this once it does not randomly fail pend 'assert_no_memory_leak may consider RJIT memory usage as leak' if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? + # For previous versions which implemented MJIT + pend 'assert_no_memory_leak may consider MJIT memory usage as leak' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? require_relative 'memory_status' raise Test::Unit::PendedError, "unsupported platform" unless defined?(Memory::Status) @@ -701,7 +703,7 @@ eom msg = "exceptions on #{errs.length} threads:\n" + errs.map {|t, err| "#{t.inspect}:\n" + - err.full_message(highlight: false, order: :top) + (err.respond_to?(:full_message) ? err.full_message(highlight: false, order: :top) : err.message) }.join("\n---\n") if message msg = "#{message}\n#{msg}" |