summaryrefslogtreecommitdiff
path: root/ext/io/console/console.c
AgeCommit message (Collapse)Author
2025-07-15Merge io-console 0.8.1Hiroshi SHIBATA
2024-12-03[ruby/io-console] Bump up 0.8.0Hiroshi SHIBATA
https://github.com/ruby/io-console/commit/467508a0c6
2024-12-02[ruby/io-console] Add IO#ttyname that returns the tty name or nilNobuyoshi Nakada
https://github.com/ruby/io-console/commit/fdad351501
2024-12-02[ruby/io-console] Freeze the version stringNobuyoshi Nakada
https://github.com/ruby/io-console/commit/aa79919f79
2024-12-02[ruby/io-console] Check if `rb_syserr_fail_str` is availableNobuyoshi Nakada
Truffle ruby seems to lack it. https://github.com/ruby/io-console/commit/839c1e80eb
2024-11-27[ruby/io-console] Read errno before calling rb_io_path()Alan Wu
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-27Revert "Add a temporal debugging code"Yusuke Endoh
This reverts commit 5bd144c1bb20e22e4d9f5e5e0264820fd3ef8137.
2024-11-22Add a temporal debugging codeYusuke Endoh
... 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 ``` Notes: Merged: https://github.com/ruby/ruby/pull/12147
2024-11-12[ruby/io-console] Bump up v0.8.0.beta1Hiroshi SHIBATA
https://github.com/ruby/io-console/commit/8ec27d403e
2024-09-01[ruby/io-console] Fix mixing declarations and code for older versionsNobuyoshi Nakada
https://github.com/ruby/io-console/commit/504292b487
2024-09-01[ruby/io-console] Support older rubiesNobuyoshi Nakada
https://github.com/ruby/io-console/commit/cad8169568
2024-08-31[ruby/io-console] Workaround for old TruffleRubyNobuyoshi Nakada
https://github.com/ruby/io-console/commit/f10c946ac7
2024-08-31[ruby/io-console] Store console IO in Ractor-local storageNobuyoshi Nakada
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[ruby/io-console] io-console is considered Ractor-safeNobuyoshi Nakada
https://github.com/ruby/io-console/commit/b1adc15af7
2024-07-31[ruby/io-console] Remove no longer used variableNobuyoshi Nakada
https://github.com/ruby/io-console/commit/651797ff8a
2024-06-24[ruby/io-console] Use locale insensitive casecmpNobuyoshi Nakada
https://github.com/ruby/io-console/commit/4b2e876dd7
2024-06-24[ruby/io-console] Use `strcasecmp`Nobuyoshi Nakada
https://github.com/ruby/io-console/commit/f8ec8a0617
2024-01-18[ruby/io-console] Bump up version to 0.7.2Hiroshi SHIBATA
https://github.com/ruby/io-console/commit/1f2877a185
2024-01-03[ruby/io-console] `IO_CONSOLE_VERSION` is no longer a macroNobuyoshi Nakada
https://github.com/ruby/io-console/commit/14b35217dc
2024-01-02[ruby/io-console] Define IO::ConsoleMode::VERSION from console.cima1zumi
https://github.com/ruby/io-console/commit/6302a2082c
2023-12-25[ruby/io-console] [DOC] Add missing documentsNobuyoshi Nakada
https://github.com/ruby/io-console/commit/44dce34569
2023-12-25[ruby/io-console] Extract CSI sequenceNobuyoshi Nakada
https://github.com/ruby/io-console/commit/63dbeeecf4
2023-12-07[ruby/io-console] [DOC] Add documentation for IO#cursorMatheus Richard
ruby/io-console#50 https://github.com/ruby/io-console/commit/ee752ce771
2023-11-10[ruby/io-console] Define IO::ConsoleMode::VERSION from gemspecNobuyoshi Nakada
https://github.com/ruby/io-console/commit/ebdbebf461
2023-10-22[ruby/io-console] Intersperse Win32 and termios implementationsNobuyoshi Nakada
So that the both sources appear in RDoc generated HTMLs. https://github.com/ruby/io-console/commit/beec164a47
2023-08-18[ruby/io-console] Get rid of address of an rvalue on TruffleRubyNobuyoshi Nakada
https://github.com/ruby/io-console/commit/653c1cd33f
2023-08-18[ruby/io-console] Avoid the influence of special variable `$/`Nobuyoshi Nakada
https://github.com/ruby/io-console/commit/5f71354332
2023-08-18[ruby/io-console] Ensure to put a newline after passwordNobuyoshi Nakada
https://github.com/ruby/io-console/commit/15e36af171
2023-08-18[ruby/io-console] Flush after promptNobuyoshi Nakada
https://github.com/ruby/io-console/commit/040a1d6259
2023-08-18[ruby/io-console] Enable `getpass` methods alwaysNobuyoshi Nakada
https://github.com/ruby/io-console/commit/57f9649df4
2023-08-18[ruby/io-console] [DOC] Remove a trailing space from the prompt tooNobuyoshi Nakada
https://github.com/ruby/io-console/commit/85a155f25f
2023-08-18[ruby/io-console] * remove trailing spaces [ci skip]Nobuyoshi Nakada
https://github.com/ruby/io-console/commit/a0544eb74f
2023-08-18[ruby/io-console] [DOC] IO::console.getpass usage exampleOlivier Lacan
There were no clear example of this very useful method's usage anywhere in the IO or IO::Console docs, which was a shame. https://github.com/ruby/io-console/commit/4d324586a8
2023-06-01Restores the changes in `io-console` without breaking backwards ↵Samuel Williams
compatibility. (#7882) This reverts commit 35da41b29bf0a1a8fd2cd7e1d7fcb036ca8c2c7c. This updates `io-console` to avoid accessing the internal details of `rb_io_t` and instead use `rb_io_descriptor` and `rb_io_path` etc. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2023-06-01Revert https://github.com/ruby/io-console/pull/43Hiroshi SHIBATA
This reverts commit 1889133c04f337fec3969cb5040a544088249046 and commit 764207e47ce38d1b73774a8e65114c87bc888298. Followed up with https://github.com/ruby/ruby/commit/85dcc4866d9ff29834596e9186cc97d622ee06f8
2023-05-29[ruby/io-console] Remove trailing whitespace.Samuel Williams
https://github.com/ruby/io-console/commit/55f1586463
2023-05-29[ruby/io-console] Remove usage of IO internals.Samuel Williams
(https://github.com/ruby/io-console/pull/43) https://github.com/ruby/io-console/commit/4b839a504f Co-authored-by: Benoit Daloze <eregontp@gmail.com>
2022-12-02[ruby/io-console] Check rawmode option names strictlyNobuyoshi Nakada
https://github.com/ruby/io-console/commit/aa8fc7e947
2021-12-29Sync io-console gem.Samuel Williams
2021-12-25Prefer to use RTEST when checking result of `rb_io_wait`. (#5341)Samuel Williams
* Prefer to use RTEST when checking result of `rb_io_wait`. * Consistently use false for signifying no events ready. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2021-02-09[ruby/io-console] Fixed typoNobuyoshi Nakada
2021-02-09Expose scheduler as public interface & bug fixes. (#3945)Samuel Williams
* Rename `rb_scheduler` to `rb_fiber_scheduler`. * Use public interface if available. * Use `rb_check_funcall` where possible. * Don't use `unblock` unless the fiber was non-blocking. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2021-01-05[ruby/io-console] Shrink struct query_argsNobuyoshi Nakada
https://github.com/ruby/io-console/commit/720be0a3e5
2021-01-05[ruby/io-console] Pre-define chomp! IDNobuyoshi Nakada
https://github.com/ruby/io-console/commit/028e1c9497
2021-01-05[ruby/io-console] Ignore chomp! result and return the modified stringNobuyoshi Nakada
https://github.com/ruby/io-console/commit/09e5ccc729
2021-01-05[ruby/io-console] [DOC] Note that IO#getpass returns a chomped stringMarcus Stollsteimer
IO#getpass uses String#chomp! on the read input line. https://github.com/ruby/io-console/commit/1e98c93bc8
2020-10-11[ruby/io-console] Refined getch warningsNobuyoshi Nakada
https://github.com/ruby/io-console/commit/f84e6abcce
2020-10-11[ruby/io-console] Relaxed min: option warningNobuyoshi Nakada
When `min: 0` is given to `IO#getch` with `time:` option, it is expected to return nil if timed out, and needed for source code the compatibility with unixen platforms. https://github.com/ruby/io-console/commit/a2afbe72bd
2020-10-11[ruby/io-console] Fix timeout type error (#18)Nobuyoshi Nakada
Fixed TypeError when IO#getch timed out `rb_io_wait` returns a bit-flags Integer representing available events, or Qfalse if timed out. Also the result of `NUM2INT` is not a `VALUE`. ``` $ ./bin/ruby -v -rio/console -e "p IO.console.getch(intr: true, time: 0.1)" ruby 3.0.0dev (2020-10-09T20:27:30Z master 5ea2ea74cc) [x64-mingw32] -e:1:in `getch': no implicit conversion of false into Integer (TypeError) from -e:1:in `<main>' ``` https://github.com/ruby/io-console/commit/3bdfaf62df
2020-10-11[ruby/io-console] Fixed "Rework console to use `rb_io_wait`."Nobuyoshi Nakada
* Fixed backward compatibility. * Added missing `rb_scheduler_timeout` declaration. https://github.com/ruby/io-console/commit/813806079f