Revert "Add a temporal debugging code"

This reverts commit 5bd144c1bb20e22e4d9f5e5e0264820fd3ef8137.
This commit is contained in:
Yusuke Endoh 2024-11-27 11:43:02 +09:00
parent 42b1eaf234
commit 3face42d8a

View File

@ -824,14 +824,7 @@ console_winsize(VALUE io)
{
rb_console_size_t ws;
int fd = GetWriteFD(io);
#if defined TIOCGWINSZ
// temporal debugging code
int ret = ioctl(fd, TIOCGWINSZ, &ws);
if (ret == -1) sys_fail(io);
if (ret != 0) rb_bug("ioctl(TIOCGWINSZ) returned %d", ret);
#else
if (!getwinsize(fd, &ws)) sys_fail(io);
#endif
return rb_assoc_new(INT2NUM(winsize_row(&ws)), INT2NUM(winsize_col(&ws)));
}