mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
e72ca2e044
commit
0a5b32c45a
1 changed files with 2 additions and 2 deletions
|
@ -124,8 +124,8 @@ module EnvUtil
|
||||||
end
|
end
|
||||||
module_function :suppress_warning
|
module_function :suppress_warning
|
||||||
|
|
||||||
def under_gc_stress
|
def under_gc_stress(stress = true)
|
||||||
stress, GC.stress = GC.stress, true
|
stress, GC.stress = GC.stress, stress
|
||||||
yield
|
yield
|
||||||
ensure
|
ensure
|
||||||
GC.stress = stress
|
GC.stress = stress
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue