summaryrefslogtreecommitdiff
path: root/test/ruby/envutil.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/envutil.rb')
-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