Skip to content

Commit a16dbca

Browse files
herwinweregon
authored andcommitted
Add spec for IO.select with NaN as timeout
1 parent 3fc2d19 commit a16dbca

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

core/io/select_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@
121121
end
122122
end
123123

124+
it "raises an RangeError when passed NaN as timeout" do
125+
-> { IO.select(nil, nil, nil, Float::NAN)}.should raise_error(RangeError, "NaN out of Time range")
126+
end
127+
124128
describe "returns the available descriptors when the file descriptor" do
125129
it "is in both read and error arrays" do
126130
@wr.write("foobar")

0 commit comments

Comments
 (0)