summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lib/envutil.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lib/envutil.rb b/test/lib/envutil.rb
index dc94a8f02e..eb40272232 100644
--- a/test/lib/envutil.rb
+++ b/test/lib/envutil.rb
@@ -238,6 +238,14 @@ module EnvUtil
def self.diagnostic_reports(signame, cmd, pid, now)
end
end
+
+ def self.gc_stress_to_class?
+ unless defined?(@gc_stress_to_class)
+ _, _, status = invoke_ruby(["-e""exit GC.respond_to?(:add_stress_to_class)"])
+ @gc_stress_to_class = status.success?
+ end
+ @gc_stress_to_class
+ end
end
module Test