mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Respect the original styles [ci skip]
This commit is contained in:
parent
71428ac264
commit
fddffa4c7a
2 changed files with 29 additions and 25 deletions
|
@ -76,7 +76,8 @@ io_wait_event(VALUE io, int event, VALUE timeout)
|
|||
|
||||
if (mask & event) {
|
||||
return io;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return Qfalse;
|
||||
}
|
||||
}
|
||||
|
@ -237,13 +238,15 @@ io_wait(int argc, VALUE *argv, VALUE io)
|
|||
for (int i = 1; i < argc; i += 1) {
|
||||
events |= wait_mode_sym(argv[i]);
|
||||
}
|
||||
} else if (argc == 2) {
|
||||
}
|
||||
else if (argc == 2) {
|
||||
events = RB_NUM2UINT(argv[0]);
|
||||
|
||||
if (argv[1] != Qnil) {
|
||||
timeout = argv[1];
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// TODO error
|
||||
return Qnil;
|
||||
}
|
||||
|
|
3
io.c
3
io.c
|
@ -1262,7 +1262,8 @@ io_fflush(rb_io_t *fptr)
|
|||
}
|
||||
|
||||
VALUE
|
||||
rb_io_wait(VALUE io, VALUE events, VALUE timeout) {
|
||||
rb_io_wait(VALUE io, VALUE events, VALUE timeout)
|
||||
{
|
||||
VALUE scheduler = rb_thread_current_scheduler();
|
||||
|
||||
if (scheduler != Qnil) {
|
||||
|
|
Loading…
Add table
Reference in a new issue