diff --git a/ext/io/console/console.c b/ext/io/console/console.c index 8a3f3b3..4475953 100644 --- a/ext/io/console/console.c +++ b/ext/io/console/console.c @@ -827,14 +827,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))); }