ruby / io-console

add console capabilities to IO instance

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`IO.console` is missing with JRuby on Linux aarch64

PChambino opened this issue · comments

I am testing this on a Linux aarch64 with JRuby.

I can see the io/console/ffi/stty_console is being loaded based on the warning message:
"io/console on JRuby shells out to stty for most operations"

If I manually require io/console/ffi/native_console it fails due to the platform guard at the top of the file.

However, if I remove that guard it, it loads and works fine in my brief testing.

So I have two questions:

  1. Is there any reason to not allow aarch64 in the io/console/ffi/linux_console guard?

  2. Even if it falls back to io/console/ffi/stty_console, is there any reason not to support IO.console? I think it could return File.new("/dev/tty/", "r+") similar to the one in io/console/ffi/native_console?

There's no reason not to allow aarch64! Could you put together a PR?