From a88b19d3d08447eeb7045621f02a844173d64203 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 23 Nov 2021 16:08:53 +0900 Subject: [PATCH] =?UTF-8?q?Suppress=20the=20=E2=80=9Cexperimental"=20warni?= =?UTF-8?q?ngs=20for=20`IO::Buffer`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As this warning is emitted just once per processes, needs in each files when parallel testing. --- test/fiber/scheduler.rb | 8 ++++++++ test/ruby/test_io_buffer.rb | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/test/fiber/scheduler.rb b/test/fiber/scheduler.rb index 8c2fdcb0e0..a6e1325259 100644 --- a/test/fiber/scheduler.rb +++ b/test/fiber/scheduler.rb @@ -14,6 +14,14 @@ rescue LoadError end class Scheduler + experimental = Warning[:experimental] + begin + Warning[:experimental] = false + IO::Buffer.new(0) + ensure + Warning[:experimental] = experimental + end + def initialize @readable = {} @writable = {} diff --git a/test/ruby/test_io_buffer.rb b/test/ruby/test_io_buffer.rb index 57d1867b25..f7c175b589 100644 --- a/test/ruby/test_io_buffer.rb +++ b/test/ruby/test_io_buffer.rb @@ -1,6 +1,14 @@ # frozen_string_literal: false 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) assert(value < 0, "Expected #{value} to be negative!") end