Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions library/io-wait/wait_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
@w.wait(IO::WRITABLE, 0).should_not == nil
end

it "does not report READABLE when there is nothing to read" do
events = @r.wait(IO::READABLE | IO::WRITABLE, 0) || 0
(events & IO::READABLE).should == 0
end

it "returns nil when the READABLE event is not ready during the timeout" do
@w.wait(IO::READABLE, 0).should == nil
end
Expand Down