summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-09 16:46:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-09 16:46:17 +0000
commit0a5b32c45aad3317d9902b68ddeb0cdda850bb66 (patch)
tree60960ee1a124881cfedebdb53b6cc55258dccf2c /test/ruby
parente72ca2e04457bfbfffb92bdfb30123852930e030 (diff)
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/envutil.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb
index 4df8953179..c344c9ae1f 100644
--- a/test/ruby/envutil.rb
+++ b/test/ruby/envutil.rb
@@ -124,8 +124,8 @@ module EnvUtil
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