mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Suppress the “experimental" warnings for IO::Buffer
As this warning is emitted just once per processes, needs in each files when parallel testing.
This commit is contained in:
parent
da832d6c2a
commit
a88b19d3d0
2 changed files with 16 additions and 0 deletions
|
@ -14,6 +14,14 @@ rescue LoadError
|
||||||
end
|
end
|
||||||
|
|
||||||
class Scheduler
|
class Scheduler
|
||||||
|
experimental = Warning[:experimental]
|
||||||
|
begin
|
||||||
|
Warning[:experimental] = false
|
||||||
|
IO::Buffer.new(0)
|
||||||
|
ensure
|
||||||
|
Warning[:experimental] = experimental
|
||||||
|
end
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
@readable = {}
|
@readable = {}
|
||||||
@writable = {}
|
@writable = {}
|
||||||
|
|
|
@ -1,6 +1,14 @@
|
||||||
# frozen_string_literal: false
|
# frozen_string_literal: false
|
||||||
|
|
||||||
class TestIOBuffer < Test::Unit::TestCase
|
class TestIOBuffer < Test::Unit::TestCase
|
||||||
|
experimental = Warning[:experimental]
|
||||||
|
begin
|
||||||
|
Warning[:experimental] = false
|
||||||
|
IO::Buffer.new(0)
|
||||||
|
ensure
|
||||||
|
Warning[:experimental] = experimental
|
||||||
|
end
|
||||||
|
|
||||||
def assert_negative(value)
|
def assert_negative(value)
|
||||||
assert(value < 0, "Expected #{value} to be negative!")
|
assert(value < 0, "Expected #{value} to be negative!")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue