289 Commits

Author SHA1 Message Date
Nobuyoshi Nakada
6a9a387b96 [ruby/io-console] [DOC] Prevent RDoc from referencing internal modules
https://github.com/ruby/io-console/commit/04e3f33df6
2026-08-03 03:08:09 +00:00
Nobuyoshi Nakada
dcf8847461 [ruby/io-console] IO#tty? extension is unsupported on Cygwin
`rb_w32_open_osfhandle` is defined only on mingw/mswin.

https://github.com/ruby/io-console/commit/3043df5241
2026-08-03 03:08:09 +00:00
Nobuyoshi Nakada
63c7beb2ef [ruby/io-console] Enable tty type checks on TruffleRuby
Use Ruby-level `Module#prepend` because TruffleRuby declares but does
not export `rb_prepend_module`.

https://github.com/ruby/io-console/commit/3708c0ce8a
2026-08-02 09:00:37 +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
f407596837 [ruby/io-console] [DOC] IO.tty? optional argument
https://github.com/ruby/io-console/commit/f06f2d9784
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
Nobuyoshi Nakada
6c86149af4 [ruby/io-console] Do nothing on old TruffleRuby
https://github.com/ruby/io-console/commit/27754105c7
2026-08-02 09:00:36 +00:00
Nobuyoshi Nakada
b53d7e554e [ruby/io-console] Win32: ttyname will not be used
https://github.com/ruby/io-console/commit/28cdf86e81
2026-08-02 09:00:36 +00:00
Nobuyoshi Nakada
105878ecd0 [ruby/io-console] Rename the internal term "wintty" as "platform"
https://github.com/ruby/io-console/commit/4cfaca6ad6
2026-08-02 09:00:36 +00:00
Nobuyoshi Nakada
1aa7f89378 [ruby/io-console] Extend IO#tty? for cygwin/msys terminals
https://github.com/ruby/io-console/commit/989ee71140
2026-08-02 09:00:36 +00:00
Nobuyoshi Nakada
1d7e8051d3 [ruby/io-console] [DOC] Ruby C API availability
Record the Ruby releases that made the checked C APIs available.

https://github.com/ruby/io-console/commit/f098c8b5ff
2026-07-31 06:23:46 +00:00
Nobuyoshi Nakada
3914adedf7 [ruby/io-console] Remove stale checks
* rb_io_get_write_io: 1.9.3
* rb_syserr_fail_str: 2.0.0 and backported to 1.9.3

https://github.com/ruby/io-console/commit/60c81c6162
2026-07-31 06:23:46 +00:00
Nobuyoshi Nakada
bfb05e41be
[Misc #22206] Unify dependency output mappings
Use depends declarations for emitted dependency names instead of
overloading generated declarations or rewriting thread headers in
code.  This keeps scanning, generation, and dependency expansion
separate and makes platform-selected thread dependencies explicit.
2026-07-23 00:54:12 +09:00
Nobuyoshi Nakada
7d4461e162
[Misc #22206] Generate dependencies without compiler builds
Replace `tool/update-deps` with a Ruby source scanner so dependency
updates no longer require GNU make, a configured build, or compiler
preprocessor output.

Keep compact source mappings and scanner declarations in dependency
files, and expand complete rules into the build directory.  Avoid the
temporary fixture headers required by the compiler-driven prototype.

Use the generated rules from GNU make, BSD make, and NMake builds.
Support out-of-tree and read-only source trees, and retain expanded
dependencies shipped in release archives when baseruby is unavailable.
2026-07-23 00:04:47 +09:00
Nobuyoshi Nakada
ceacc1eb50
[ruby/io-console] Make win32_vk generator portable to cmd.exe
Avoid shell single quotes and Ruby command-line globals in the
generator. Keep the fallback definition in the gperf input so the same
recipe works under both POSIX shells and cmd.exe.

https://github.com/ruby/io-console/commit/7a6f2545d3
2026-07-19 16:19:54 +09:00
Nobuyoshi Nakada
009a5fde60 [ruby/io-console] Make win32_vk generator portable to cmd.exe
Avoid shell single quotes and Ruby command-line globals in the
generator. Keep the fallback definition in the gperf input so the same
recipe works under both POSIX shells and cmd.exe.

https://github.com/ruby/io-console/commit/7a6f2545d3
2026-07-19 07:12:13 +00:00
USAMI Kenta
8e550d9312 [ruby/io-console] Document that getch can return nil on EOF or timeout
https://github.com/ruby/io-console/commit/962b518a45
2026-07-13 05:24:26 +00:00
Stan Lo
3db9c22f29 [ruby/io-console] Use :nodoc: instead of :stopdoc: for internal
C-defined classes
(https://github.com/ruby/io-console/pull/123)

RDoc does not officially support :stopdoc:/:startdoc: in C files,
and recent RDoc changes cause :stopdoc: to be incorrectly undone
during file processing, making these classes appear as undocumented
in coverage reports.

Switch to :nodoc: which is properly supported in C comments and
correctly marks these internal classes as intentionally undocumented.

https://github.com/ruby/io-console/commit/451630c6ce
2026-03-23 20:38:51 +00:00
Nobuyoshi Nakada
697eb6d828
[ruby/io-console] Do not use C99 style comment [ci skip]
The minimum required ruby version of this library is still 2.6.
C99 has been adopted since ruby 2.7.

https://github.com/ruby/io-console/commit/f907e5a237
2026-03-15 14:42:01 +09:00
Nobuyoshi Nakada
1e5a4434bb [ruby/io-console] Remove no longer used variable
https://github.com/ruby/io-console/commit/d0ee6034a9
2026-03-15 05:36:31 +00:00
Nobuyoshi Nakada
8ca2f6489b
Revert "Fix rb_interned_str: create strings with BINARY (akak ASCII_8BIT) encoding"
This reverts commit 1f3c52dc155fb7fbc42fc8e146924091ba1dfa20.
2026-01-17 13:38:55 +09:00
Jean Boussier
1f3c52dc15 Fix rb_interned_str: create strings with BINARY (akak ASCII_8BIT) encoding
[Bug #21842]

The documentation always stated as much, and it's consistent with the
rb_str_* family of functions.
2026-01-16 22:44:38 +01:00
Nobuyoshi Nakada
9e22037eb5 [ruby/io-console] bump up to 0.8.2
https://github.com/ruby/io-console/commit/fbc7e1f31f
2025-12-14 02:59:10 +00:00
Nobuyoshi Nakada
8f2c479fa5
[ruby/io-console] strip trailing spaces [ci skip]
https://github.com/ruby/io-console/commit/379e7c17ed
2025-12-13 21:37:52 +09:00
YO4
3a4ad76f9d
[ruby/io-console] console_cursor_pos respects scroll position on windows
https://github.com/ruby/io-console/commit/ae33785820
2025-12-13 21:37:51 +09:00
YO4
c8fd840599
[ruby/io-console] console_goto respects scroll position on windows
https://github.com/ruby/io-console/commit/d2a6c69697
2025-12-13 21:37:51 +09:00
YO4
2912825829
[ruby/io-console] avoid jumping scroll position when winsize changed
On windows, IO.console.winsize= now respects the current view area and screen buffer size.

https://github.com/ruby/io-console/commit/817aa65ea3
2025-12-13 21:37:51 +09:00
Nobuyoshi Nakada
9dbbdcc33f [ruby/io-console] Remove useless rb_check_arity() call
https://github.com/ruby/io-console/commit/df444b93f1
2025-12-13 11:34:11 +00:00
Hiroshi SHIBATA
8ea57040f0 [ruby/io-console] Bump up 0.8.1
https://github.com/ruby/io-console/commit/01071a174a
2025-07-15 06:01:01 +00:00
Jeremy Evans
0b23a8db60 Update dependencies for addition of set.h to public headers 2025-07-11 15:24:23 +09:00
Nobuyoshi Nakada
134bdf2d34 [ruby/io-console] Run have_func with the header providing the declarations
https://github.com/ruby/io-console/commit/dd013030dd
2025-07-01 11:00:58 +00:00
Hiroshi SHIBATA
ddf0080fd3 [ruby/io-console] Bump up 0.8.0
https://github.com/ruby/io-console/commit/467508a0c6
2024-12-03 05:05:14 +00:00
Nobuyoshi Nakada
8ec58a91f7 [ruby/io-console] Add IO#ttyname that returns the tty name or nil
https://github.com/ruby/io-console/commit/fdad351501
2024-12-02 08:03:30 +00:00
Nobuyoshi Nakada
9948a8c8df [ruby/io-console] Freeze the version string
https://github.com/ruby/io-console/commit/aa79919f79
2024-12-02 05:00:47 +00:00
Nobuyoshi Nakada
decc02996a [ruby/io-console] Check if rb_syserr_fail_str is available
Truffle ruby seems to lack it.

https://github.com/ruby/io-console/commit/839c1e80eb
2024-12-02 03:37:15 +00:00
Alan Wu
c41af37ee6 [ruby/io-console] Read errno before calling rb_io_path()
Possible fix for recent crashes seen on CI.

     [BUG] rb_sys_fail_str(<STDIN>) - errno == 0

rb_io_path() calls rb_obj_dup(), which could call initialize_dup in Ruby
and clobber errno before rb_sys_fail_str() gets to read errno. So
save it out first.

(Using separate statements because order of evaluation in function call
list is unspecified, and order is important here.)

https://github.com/ruby/io-console/commit/0ba400b5e7
2024-11-27 03:19:39 +00:00
Yusuke Endoh
3face42d8a Revert "Add a temporal debugging code"
This reverts commit 5bd144c1bb20e22e4d9f5e5e0264820fd3ef8137.
2024-11-27 11:43:02 +09:00
Yusuke Endoh
5bd144c1bb Add a temporal debugging code
... to check the return value of ioctl

http://ci.rvm.jp/results/trunk_asan@ruby-sp1/5423172
```
/tmp/ruby/src/trunk_asan/lib/reline/io/ansi.rb:192: [BUG] rb_sys_fail_str(<STDIN>) - errno == 0
```
2024-11-22 15:00:20 +09:00
Hiroshi SHIBATA
da151ab1e7 [ruby/io-console] Bump up v0.8.0.beta1
https://github.com/ruby/io-console/commit/8ec27d403e
2024-11-12 06:04:57 +00:00
Hiroshi SHIBATA
0452b3fabb [ruby/io-console] Update license files same as ruby/ruby
https://github.com/ruby/io-console/commit/c9e3f44268
2024-11-12 05:25:15 +00:00
Nobuyoshi Nakada
185602e696 [ruby/io-console] Fix mixing declarations and code for older versions
https://github.com/ruby/io-console/commit/504292b487
2024-09-01 03:46:44 +00:00
Nobuyoshi Nakada
37db194c02 [ruby/io-console] Support older rubies
https://github.com/ruby/io-console/commit/cad8169568
2024-09-01 03:46:43 +00:00
Nobuyoshi Nakada
afd12873e0
Update dependencies of io-console 2024-09-01 12:00:12 +09:00
Nobuyoshi Nakada
e69945fc57 [ruby/io-console] Workaround for old TruffleRuby
https://github.com/ruby/io-console/commit/f10c946ac7
2024-08-31 08:43:59 +00:00
Nobuyoshi Nakada
4a1ea9b63a [ruby/io-console] Store console IO in Ractor-local storage
Ractor requires a shareable class has shareable constants only, but IO
is not shareable unless frozen.

https://github.com/ruby/io-console/commit/65e0ff895c
2024-08-31 08:43:59 +00:00
Nobuyoshi Nakada
365ededfdf [ruby/io-console] io-console is considered Ractor-safe
https://github.com/ruby/io-console/commit/b1adc15af7
2024-08-31 05:46:05 +00:00
Nobuyoshi Nakada
12a5400a88 [ruby/io-console] Remove no longer used variable
https://github.com/ruby/io-console/commit/651797ff8a
2024-07-31 13:20:01 +00:00
Nobuyoshi Nakada
e428ee7bbe [ruby/io-console] Use locale insensitive casecmp
https://github.com/ruby/io-console/commit/4b2e876dd7
2024-06-24 15:38:11 +00:00
Nobuyoshi Nakada
f4f8aa0f89 [ruby/io-console] Use strcasecmp
https://github.com/ruby/io-console/commit/f8ec8a0617
2024-06-24 15:38:10 +00:00