mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
[ruby/fiddle] Use test-unit gem (https://github.com/ruby/fiddle/pull/69)
e08c4c635e
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
This commit is contained in:
parent
afa33da72b
commit
8f752c95d2
Notes:
git
2021-09-05 19:26:21 +09:00
8 changed files with 79 additions and 37 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue