Skip to content

Commit

Permalink
Fix rubocop warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
andrykonchin committed Jun 7, 2024
1 parent 4c7ac34 commit 517f06f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions library/io-wait/wait_readable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -41,6 +41,6 @@
(finish - start).should < 9
ensure
rd.close
_wr.close
wr.close
end
end
4 changes: 2 additions & 2 deletions library/io-wait/wait_writable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
4 changes: 2 additions & 2 deletions library/rbconfig/rbconfig_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 517f06f

Please sign in to comment.