End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
IO#check_winsize_changed
check_winsize_changed
ext/io/console/console.c
View on GitHub ↗
_WIN32
static VALUE
console_check_winsize_changed(VALUE io)
{
rb_io_t *fptr;
HANDLE h;
DWORD num;
GetOpenFile(io, fptr);
h = (HANDLE)rb_w32_get_osfhandle(GetReadFD(fptr));
while (GetNumberOfConsoleInputEvents(h, &num) && num > 0) {
INPUT_RECORD rec;
if (ReadConsoleInput(h, &rec, 1, &num)) {
if (rec.EventType == WINDOW_BUFFER_SIZE_EVENT) {
rb_yield(Qnil);
}
}
}
return io;
}
No documentation available