[ruby/io-console] Fix mixing declarations and code for older versions

https://github.com/ruby/io-console/commit/504292b487
This commit is contained in:
Nobuyoshi Nakada 2024-09-01 12:37:02 +09:00 committed by git
parent 37db194c02
commit 185602e696

View File

@ -1538,10 +1538,8 @@ console_clear_screen(VALUE io)
static VALUE
io_open_descriptor_fallback(VALUE klass, int descriptor, int mode, VALUE path, VALUE timeout, void *encoding)
{
rb_update_max_fd(descriptor);
VALUE arguments[2] = {
INT2NUM(descriptor),
(rb_update_max_fd(descriptor), INT2NUM(descriptor)),
INT2FIX(mode),
};