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

ruby-changes:31546

From: nobu <ko1@a...>
Date: Sun, 10 Nov 2013 01:46:21 +0900 (JST)
Subject: [ruby-changes:31546] nobu:r43625 (trunk): envutil.rb: under_gc_stress parameter

nobu	2013-11-10 01:46:17 +0900 (Sun, 10 Nov 2013)

  New Revision: 43625

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

  Log:
    envutil.rb: under_gc_stress parameter
    
    * test/ruby/envutil.rb (EnvUtil#under_gc_stress): add stress parameter
      so that making possible to disable stressing explicitly.

  Modified files:
    trunk/test/ruby/envutil.rb
Index: test/ruby/envutil.rb
===================================================================
--- test/ruby/envutil.rb	(revision 43624)
+++ test/ruby/envutil.rb	(revision 43625)
@@ -124,8 +124,8 @@ module EnvUtil https://github.com/ruby/ruby/blob/trunk/test/ruby/envutil.rb#L124
   end
   module_function :suppress_warning
 
-  def under_gc_stress
-    stress, GC.stress = GC.stress, true
+  def under_gc_stress(stress = true)
+    stress, GC.stress = GC.stress, stress
     yield
   ensure
     GC.stress = stress

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

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