Skip to content

Commit 5b45685

Browse files
committed
Set timeout to nil if unspecified
1 parent 4e982ae commit 5b45685

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/io/wait/wait.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ io_wait(int argc, VALUE *argv, VALUE io)
243243
rb_raise(rb_eArgError, "timeout given more than once");
244244
}
245245
}
246+
if (timeout == Qundef) timeout = Qnil;
246247
}
247248
else /* argc == 2 */ {
248249
events = RB_NUM2UINT(argv[0]);

0 commit comments

Comments
 (0)