From 517f06f66d533175d8586d222156323b89a43909 Mon Sep 17 00:00:00 2001 From: Andrew Konchin Date: Fri, 7 Jun 2024 18:42:55 +0300 Subject: [PATCH] Fix rubocop warnings --- library/io-wait/wait_readable_spec.rb | 4 ++-- library/io-wait/wait_writable_spec.rb | 4 ++-- library/rbconfig/rbconfig_spec.rb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/io-wait/wait_readable_spec.rb b/library/io-wait/wait_readable_spec.rb index c4340846b..df25fdb93 100644 --- a/library/io-wait/wait_readable_spec.rb +++ b/library/io-wait/wait_readable_spec.rb @@ -26,7 +26,7 @@ end it "can be interrupted" do - rd, _wr = IO.pipe + rd, wr = IO.pipe start = Process.clock_gettime(Process::CLOCK_MONOTONIC) t = Thread.new do @@ -41,6 +41,6 @@ (finish - start).should < 9 ensure rd.close - _wr.close + wr.close end end diff --git a/library/io-wait/wait_writable_spec.rb b/library/io-wait/wait_writable_spec.rb index 6012d686e..8639dd717 100644 --- a/library/io-wait/wait_writable_spec.rb +++ b/library/io-wait/wait_writable_spec.rb @@ -20,7 +20,7 @@ end it "can be interrupted" do - _rd, wr = IO.pipe + rd, wr = IO.pipe IOSpec.exhaust_write_buffer(wr) start = Process.clock_gettime(Process::CLOCK_MONOTONIC) @@ -35,7 +35,7 @@ finish = Process.clock_gettime(Process::CLOCK_MONOTONIC) (finish - start).should < 9 ensure - _rd.close unless _rd.closed? + rd.close unless rd.closed? wr.close unless wr.closed? end end diff --git a/library/rbconfig/rbconfig_spec.rb b/library/rbconfig/rbconfig_spec.rb index 5d75f759e..8e38227c2 100644 --- a/library/rbconfig/rbconfig_spec.rb +++ b/library/rbconfig/rbconfig_spec.rb @@ -104,11 +104,11 @@ guard -> { platform_is(:linux) || platform_is(:darwin) } do it "['host_os'] returns a proper OS name or platform" do platform_is :darwin do - RbConfig::CONFIG['host_os'].should.match? /darwin/ + RbConfig::CONFIG['host_os'].should.match?(/darwin/) end platform_is :linux do - RbConfig::CONFIG['host_os'].should.match? /linux/ + RbConfig::CONFIG['host_os'].should.match?(/linux/) end end end