envutil.rb: EnvUtil.gc_stress_to_class
* test/lib/envutil.rb (EnvUtil.gc_stress_to_class): check if GC.stress_to_class is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b38b920ae5
commit
2df5bb9ac1
@ -238,6 +238,14 @@ module EnvUtil
|
|||||||
def self.diagnostic_reports(signame, cmd, pid, now)
|
def self.diagnostic_reports(signame, cmd, pid, now)
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
||||||
module Test
|
module Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user