Skip to content

Commit ce95e26

Browse files
committed
Skip test on Windows.
1 parent 7d5f92f commit ce95e26

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/io/event/selector/select.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,7 @@ def io_read(fiber, io, buffer, length, offset = 0)
170170

171171
Selector.nonblock(io) do
172172
while true
173-
Fiber.blocking{$stderr.puts "buffer.read(#{io}, 0, #{offset})"}
174173
result = Fiber.blocking{buffer.read(io, 0, offset)}
175-
Fiber.blocking{$stderr.puts "buffer.read(#{io}, 0, #{offset}) => #{result}"}
176174

177175
if result < 0
178176
if again?(result)

test/io/event/selector/buffered_io.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
let(:output) {pipe.last}
1818

1919
it "can read using a buffer" do
20+
# Non-blocking pipes are probably not implemented in Ruby's compatibility layer.
21+
# https://learn.microsoft.com/en-gb/windows/win32/api/namedpipeapi/nf-namedpipeapi-setnamedpipehandlestate?redirectedfrom=MSDN
22+
skip "Not supported on Windows" if RUBY_PLATFORM =~ /mswin|mingw|cygwin/
23+
2024
writer = Fiber.new do
2125
buffer = IO::Buffer.new(128)
2226
expect(selector.io_write(Fiber.current, output, buffer, 128)).to be == 128
@@ -39,6 +43,8 @@
3943
end
4044

4145
it "can read and write at the specified offset" do
46+
skip "Not supported on Windows" if RUBY_PLATFORM =~ /mswin|mingw|cygwin/
47+
4248
writer = Fiber.new do
4349
buffer = IO::Buffer.new(128)
4450
expect(selector.io_write(Fiber.current, output, buffer, 128, 64)).to be == 64

0 commit comments

Comments
 (0)