e08c4c635e

Co-authored-by: Sutou Kouhei <kou@clear-code.com>
This commit is contained in:
Hiroshi SHIBATA 2021-09-05 04:54:25 +09:00 committed by Nobuyoshi Nakada
parent afa33da72b
commit 8f752c95d2
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
Notes: git 2021-09-05 19:26:21 +09:00
8 changed files with 79 additions and 37 deletions

View file

@ -1,4 +1,6 @@
# frozen_string_literal: true
require 'rbconfig/sizeof'
require 'test/unit'
require 'fiddle'
@ -165,5 +167,12 @@ module Fiddle
GC.start
end
end
def under_gc_stress
stress, GC.stress = GC.stress, true
yield
ensure
GC.stress = stress
end
end
end