230 Commits
Author SHA1 Message Date
Koichi SasadaandClaude Opus 5.5 6e6f03b9bd Test zero-timeout probes at EOF while another thread wants the GVL
Covers the previous two commits: wait_readable(0) and
IO.select([io], nil, nil, 0) on an io at EOF must always report it,
also while another thread keeps asking for the GVL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 10:08:38 +09:00
Erik Berlin c71329d429 [ruby/io-console] Keep IO#isatty an alias of IO#tty? on JRuby
The C extension defines both tty? and isatty in IO::platform_tty, so
they stay the same method once io/console is loaded. The JRuby
backends' PlatformTty only defined tty?, so after
https://github.com/ruby/io-console/commit/f686b8305 loading
io/console left IO#isatty as the original method, which ruby/spec's
"IO#isatty is an alias of IO#tty?" checks.

https://github.com/ruby/io-console/commit/77d675c69e
2026-10-20 19:12:05 +00:00
Nobuyoshi Nakada 2e93d032ba [ruby/io-console] Run test_input_pending on JRuby
https://github.com/ruby/io-console/commit/7a792b4f37
2026-09-12 15:01:17 +00:00
Nobuyoshi Nakada 158e2d0818 [ruby/io-console] Now module IO::Console is defined on all platforms
https://github.com/ruby/io-console/commit/647900a44f
2026-09-12 15:01:17 +00:00
Nobuyoshi Nakada 8b3924f491 [ruby/io-console] Make IO#tty? enhanced always
https://github.com/ruby/io-console/commit/f686b83053
2026-09-12 15:01:17 +00:00
Hiroshi SHIBATAandClaude Opus 5 167fbe1408 [ruby/io-console] Run test_input_pending on Windows
IO#input_pending? reports a pipe correctly there.

https://github.com/ruby/ruby/commit/6600e7feed98

https://github.com/ruby/io-console/commit/2598c88cec

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-12 13:24:08 +00:00
Hiroshi SHIBATAandClaude Opus 5 3c7eab4258 Re-enable TestIO_Console#test_intr on FreeBSD
Ran 90 times on each of the rubyci FreeBSD 14.5 amd64 and 15.1 arm64
machines, in isolation and with the whole file both serially and under
-j2, with no failure.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 08:30:28 +09:00
Nobuyoshi Nakada e0c69057f2 [ruby/io-console] Define stty backend-specific tests only within the stty backend
https://github.com/ruby/io-console/commit/d2bb01cfcc
2026-09-10 11:41:35 +00:00
Nobuyoshi Nakada 106559f11c [ruby/io-console] Test the getch timeout on an isolated pty with no input
Testing on the default tty should be performed only in the CI
environment.

https://github.com/ruby/io-console/commit/0e04785a7d
2026-09-10 10:16:41 +00:00
Nobuyoshi Nakada c907f6af49 [ruby/io-console] Add some attributes to Console::Mode
https://github.com/ruby/io-console/commit/adfe5c9f37
2026-09-04 11:44:25 +00:00
Nobuyoshi Nakada 28aa571402 [ruby/io-console] Fix getpass to use \n explicitly regardless the RS
https://github.com/ruby/io-console/commit/976eb3c7d4
2026-09-04 11:44:25 +00:00
Nobuyoshi Nakada 1fffdc15e6 [ruby/io-console] Propagate the path of io/console/size
https://github.com/ruby/io-console/commit/9b006071c3
2026-09-04 11:44:25 +00:00
Oskar Eichler f7a08bbd7e [ruby/io-console] Ignore nonpositive console size overrides
https://github.com/ruby/io-console/commit/8c26435cda
2026-09-04 11:44:25 +00:00
Oskar Eichler 6d2cfeea4a [ruby/io-console] Reject incomplete JRuby cursor responses
https://github.com/ruby/io-console/commit/27fde7fdd9
2026-09-04 11:44:25 +00:00
Oskar Eichler 9f8e0e106d [ruby/io-console] Return nil when JRuby has no console device
https://github.com/ruby/io-console/commit/26b35cafcb
2026-09-04 11:44:25 +00:00
Oskar Eichler 2d281a898d [ruby/io-console] Preserve nil from JRuby getpass at EOF
https://github.com/ruby/io-console/commit/4fed496030
2026-09-04 11:44:25 +00:00
Nobuyoshi Nakada d034c51e27 [ruby/io-console] Avoid timing race in noecho test
Read the input before restoring echo mode so slow platforms do not
process it after echo has been re-enabled.

https://github.com/ruby/io-console/commit/664fbc6719
2026-08-11 11:34:50 +00:00
Nobuyoshi Nakada 2cbeb01be8 [ruby/io-console] Define the backend specific test only for the backend
https://github.com/ruby/io-console/commit/60215ae037
2026-08-11 11:34:50 +00:00
Nobuyoshi Nakada 9df02dd550 [ruby/io-console] Improve stty console support
Use stty with redirected terminals and preserve console modes accurately.

https://github.com/ruby/io-console/commit/fcb28a3ff7
2026-08-10 05:06:36 +00:00
Nobuyoshi Nakada b3fe8e9785 [ruby/io-console] Pend Windows console tests without Fiddle
Keep optional Windows console tests from failing when Fiddle cannot be loaded.

https://github.com/ruby/io-console/commit/86e2f33e03
2026-08-08 23:54:52 +00:00
Nobuyoshi Nakada 2d411e3a60 [ruby/io-console] Fix stty redirection on JRuby
Duplicate the terminal descriptor so `IO.popen` can capture output
without redirect conflicts.

Fix ruby/io-console#145.

https://github.com/ruby/io-console/commit/7e9deccdd8
2026-08-08 23:53:01 +00:00
Nobuyoshi Nakada bf1b4710cd Reapply test skips removed unintentionally 2026-08-09 07:31:42 +09:00
Nobuyoshi Nakada 9f50e4e8df Stop checking #include changes [ci skip]
Due to changes in automatic dependency generation, this is no longer
makes sense.
2026-08-08 19:11:28 +09:00
Nobuyoshi Nakada e56f452e46 [ruby/io-console] Fix failures in ruby-core
https://github.com/ruby/io-console/commit/904edf8a63
2026-08-08 08:04:35 +00:00
Nobuyoshi Nakada ce628310ab [ruby/io-console] Add Windows support to FFI backend
Let JRuby use Reline's native Windows path without Fiddle.

https://github.com/ruby/io-console/commit/2b41f0f257
2026-08-08 06:12:52 +00:00
Nobuyoshi Nakada fad4d9d889 [ruby/io-console] Add Windows console constants
Expose Windows input constants for console event consumers.

https://github.com/ruby/io-console/commit/e712668ca2
2026-08-08 06:12:52 +00:00
Nobuyoshi Nakada f0511a8096 [ruby/io-console] Add interruptible console input timeout
Add a `timeout` option to `IO#console_input_events` so callers can
wait for input while remaining responsive to Ruby interrupts.

https://github.com/ruby/io-console/commit/7801e85118
2026-08-08 06:12:52 +00:00
Nobuyoshi Nakada 1c4131cdba [ruby/io-console] Add nonblocking input status
Add `IO#input_pending?` so console users can detect queued input
without consuming it or relying on platform-specific APIs.

https://github.com/ruby/io-console/commit/9c7cb6de0f
2026-08-08 06:12:52 +00:00
Nobuyoshi Nakada 84623ab2e2 [ruby/io-console] Expose Windows output console modes
Expose virtual terminal processing and line wrapping flags so console
users can configure output without calling Win32 APIs directly.

https://github.com/ruby/io-console/commit/dbfb2b0f8d
2026-08-08 06:12:52 +00:00
Nobuyoshi Nakada d5c1e10bf8 [ruby/io-console] Add cursor visibility controls
Add cross-platform cursor visibility operations so console users can
hide the cursor while redrawing without platform-specific code.

https://github.com/ruby/io-console/commit/9db579fcf1
2026-08-08 06:12:51 +00:00
Nobuyoshi Nakada fb97e9c8f1 [ruby/io-console] Deprecate IO#check_winsize_changed
`IO#console_input_events` preserves records that the old size change
helper discards.

https://github.com/ruby/io-console/commit/cea11642b3
2026-08-08 06:12:51 +00:00
Nobuyoshi b02108bfcf [ruby/io-console] Add console input event support on Windows
Preserve native console input event data for Windows consumers.

https://github.com/ruby/io-console/commit/c898eda906
2026-08-08 06:12:51 +00:00
Nobuyoshi Nakada a814061ce5 [ruby/io-console] Introduce the IO::Console namespace
Isolate console modes and version information from `IO` into a common
namespace.

https://github.com/ruby/io-console/commit/62890333ac
2026-08-07 10:41:01 +00:00
Nobuyoshi Nakada 73bfbd23ca [ruby/io-console] Implement FFI console mode support
Add the missing console mode API so JRuby and TruffleRuby match
the native extension.

https://github.com/ruby/io-console/commit/beaf98288b
2026-08-04 15:19:16 +00:00
Nobuyoshi Nakada 12ce446453 [ruby/io-console] Treat nil as the default tty type
Allow the default tty check to be combined with platform-specific tty types.

https://github.com/ruby/io-console/commit/e307d61226
2026-08-02 09:00:37 +00:00
Nobuyoshi Nakada d1bfedce7f [ruby/io-console] Accept multiple mode arguments
https://github.com/ruby/io-console/commit/d140425f9f
2026-08-02 09:00:37 +00:00
Nobuyoshi Nakada 93c3a6bc98 [ruby/io-console] Support tty?(:any) on any platform
https://github.com/ruby/io-console/commit/47dcadc644
2026-08-02 09:00:37 +00:00
Takashi Kokubun dea0cae04a [ruby/io-wait] Fix race condition in TestIOWait#test_wait
Replace `sleep 0.1` with `IO.select([@r])` to reliably wait for data
to arrive before asserting readability with a zero timeout. The fixed
sleep was insufficient on slow Windows CI runners, causing sporadic
failures. This matches the approach already used in test_wait_readable.

https://github.com/ruby/io-wait/commit/dd32ec3682
2026-05-07 09:28:48 +09:00
Nobuyoshi Nakada b70f5afb68 [ruby/io-wait] Remove IO#nread and `IO#ready?
https://github.com/ruby/io-wait/commit/1decadc7f9
2025-11-12 13:48:18 +00:00
Nobuyoshi Nakada 12350eb9e0 [Bug #21625] Allow io/wait methods with IO#ungetc in text mode 2025-10-29 17:23:00 +09:00
Takashi Kokubun de6df7508d test_io_wait.rb: Increase a timeout for a flaky test
like 68682a5d2b

https://github.com/ruby/ruby/actions/runs/17417763247/job/49449895757?pr=14433
2025-09-02 16:21:08 -07:00
Takashi Kokubun 68682a5d2b Increase timeout for failing tests
https://github.com/ruby/ruby/actions/runs/16969921157/job/48103809963
https://github.com/ruby/ruby/actions/runs/16969655024/job/48102876839
2025-08-14 11:23:12 -07:00
Nobuyoshi Nakada d3d249b904 [ruby/io-console] Fix removing unexpected control chars
`cc` is created as `"\C-x"`, it is a String since ruby 1.9.

https://github.com/ruby/io-console/commit/65c9266feb
2025-07-01 08:36:19 +00:00
Nobuyoshi Nakada 06f9fc20ec [ruby/io-console] Use host_os in RbConfig instead of RUBY_PLATFORM for JRuby
https://github.com/ruby/io-console/commit/f8b33f38ae
2025-07-01 08:32:29 +00:00
Nobuyoshi Nakada 64a52c25fe [ruby/io-console] Fix a name error
https://github.com/ruby/io-console/commit/e0398acad4
2025-06-27 07:25:37 +00:00
Nobuyoshi Nakada 528b75cc14 [ruby/io-console] Ignore printed control char
It's something we don't expect and might be coming from somewhere
else.

https://github.com/ruby/io-console/commit/c5e47a900c
2025-06-27 07:23:09 +00:00
Nobuyoshi Nakada 495613ffd3 [ruby/io-console] Revert "Ignore ^C at interrupt"
This reverts commit https://github.com/ruby/io-console/commit/f0646b2b6ae3.

https://github.com/ruby/io-console/commit/2e0e01263a
2025-06-27 07:23:09 +00:00
Nobuyoshi Nakada ce38cba528 Merge blocks for the same condition 2025-06-23 11:08:22 +09:00
Nobuyoshi Nakada d9efc56c16 [ruby/io-console] Ignore ^C at interrupt
It's something we don't expect and might be coming from somewhere
else.

https://github.com/ruby/io-console/commit/f0646b2b6a
2025-06-20 09:39:29 +00:00
Hiroshi SHIBATA 6609ba0514 [ruby/io-wait] Alias value or join to take in old Ruby
https://github.com/ruby/io-wait/commit/cf84aea70d
2025-06-03 08:24:14 +00:00