diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-09 16:46:17 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-09 16:46:17 +0000 |
commit | 0a5b32c45aad3317d9902b68ddeb0cdda850bb66 (patch) | |
tree | 60960ee1a124881cfedebdb53b6cc55258dccf2c /test | |
parent | e72ca2e04457bfbfffb92bdfb30123852930e030 (diff) | |
download | ruby-0a5b32c45aad3317d9902b68ddeb0cdda850bb66.tar.gz |
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')
-rw-r--r-- | test/ruby/envutil.rb | 4 |
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 |