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

ruby-changes:38568

From: nobu <ko1@a...>
Date: Wed, 27 May 2015 17:02:36 +0900 (JST)
Subject: [ruby-changes:38568] nobu:r50649 (trunk): envutil.rb: EnvUtil.gc_stress_to_class

nobu	2015-05-27 17:02:20 +0900 (Wed, 27 May 2015)

  New Revision: 50649

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50649

  Log:
    envutil.rb: EnvUtil.gc_stress_to_class
    
    * test/lib/envutil.rb (EnvUtil.gc_stress_to_class): check if
      GC.stress_to_class is available.

  Modified files:
    trunk/test/lib/envutil.rb
Index: test/lib/envutil.rb
===================================================================
--- test/lib/envutil.rb	(revision 50648)
+++ test/lib/envutil.rb	(revision 50649)
@@ -238,6 +238,14 @@ module EnvUtil https://github.com/ruby/ruby/blob/trunk/test/lib/envutil.rb#L238
     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

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

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