Nobuyoshi Nakada
185602e696
[ruby/io-console] Fix mixing declarations and code for older versions
...
504292b487
2024-09-01 03:46:44 +00:00
Nobuyoshi Nakada
37db194c02
[ruby/io-console] Support older rubies
...
cad8169568
2024-09-01 03:46:43 +00:00
Nobuyoshi Nakada
e69945fc57
[ruby/io-console] Workaround for old TruffleRuby
...
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.
65e0ff895c
2024-08-31 08:43:59 +00:00
Nobuyoshi Nakada
365ededfdf
[ruby/io-console] io-console is considered Ractor-safe
...
b1adc15af7
2024-08-31 05:46:05 +00:00
Nobuyoshi Nakada
12a5400a88
[ruby/io-console] Remove no longer used variable
...
651797ff8a
2024-07-31 13:20:01 +00:00
Nobuyoshi Nakada
e428ee7bbe
[ruby/io-console] Use locale insensitive casecmp
...
4b2e876dd7
2024-06-24 15:38:11 +00:00
Nobuyoshi Nakada
f4f8aa0f89
[ruby/io-console] Use strcasecmp
...
f8ec8a0617
2024-06-24 15:38:10 +00:00
Hiroshi SHIBATA
af60cdf674
[ruby/io-console] Bump up version to 0.7.2
...
1f2877a185
2024-01-18 01:36:52 +00:00
Nobuyoshi Nakada
73fb9c35ef
[ruby/io-console] IO_CONSOLE_VERSION
is no longer a macro
...
14b35217dc
2024-01-03 02:12:30 +00:00
ima1zumi
8916b81bf4
[ruby/io-console] Define IO::ConsoleMode::VERSION from console.c
...
6302a2082c
2024-01-02 22:17:05 +00:00
Nobuyoshi Nakada
e7f91fd74c
[ruby/io-console] [DOC] Add missing documents
...
44dce34569
2023-12-25 21:12:49 +09:00
Nobuyoshi Nakada
4173c4bcfb
[ruby/io-console] Extract CSI sequence
...
63dbeeecf4
2023-12-25 21:12:49 +09:00
Matheus Richard
d69af4788a
[ruby/io-console] [DOC] Add documentation for IO#cursor
...
ruby/io-console#50
ee752ce771
2023-12-07 10:50:00 +00:00
Nobuyoshi Nakada
f08400a07a
[ruby/io-console] Define IO::ConsoleMode::VERSION from gemspec
...
ebdbebf461
2023-11-10 19:00:46 +09:00
Nobuyoshi Nakada
7578bc35f9
[ruby/io-console] Intersperse Win32 and termios implementations
...
So that the both sources appear in RDoc generated HTMLs.
beec164a47
2023-10-22 03:18:34 +00:00
Nobuyoshi Nakada
412defc7ad
[ruby/io-console] Get rid of address of an rvalue on TruffleRuby
...
653c1cd33f
2023-08-18 03:55:05 +00:00
Nobuyoshi Nakada
818ba30ee9
[ruby/io-console] Avoid the influence of special variable $/
...
5f71354332
2023-08-18 03:55:04 +00:00
Nobuyoshi Nakada
cff8058701
[ruby/io-console] Ensure to put a newline after password
...
15e36af171
2023-08-18 03:55:04 +00:00
Nobuyoshi Nakada
528da4347c
[ruby/io-console] Flush after prompt
...
040a1d6259
2023-08-18 03:55:03 +00:00
Nobuyoshi Nakada
540cf43205
[ruby/io-console] Enable getpass
methods always
...
57f9649df4
2023-08-18 03:55:02 +00:00
Nobuyoshi Nakada
1bbce42964
[ruby/io-console] [DOC] Remove a trailing space from the prompt too
...
85a155f25f
2023-08-18 01:17:03 +00:00
Nobuyoshi Nakada
1107cfd077
[ruby/io-console] * remove trailing spaces [ci skip]
...
a0544eb74f
2023-08-18 01:15:00 +00:00
Olivier Lacan
43802a088e
[ruby/io-console] [DOC] IO::console.getpass usage example
...
There were no clear example of this very useful method's usage anywhere
in the IO or IO::Console docs, which was a shame.
4d324586a8
2023-08-18 01:02:42 +00:00
Samuel Williams
64ec1813ac
Restores the changes in io-console
without breaking backwards compatibility. ( #7882 )
...
This reverts commit 35da41b29b
.
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.
2023-06-01 17:43:45 +09:00
Hiroshi SHIBATA
35da41b29b
Revert https://github.com/ruby/io-console/pull/43
...
This reverts commit 1889133c04
and
commit 764207e47c
.
Followed up with 85dcc4866d
2023-06-01 09:36:55 +09:00
Samuel Williams
764207e47c
[ruby/io-console] Remove trailing whitespace.
...
55f1586463
2023-05-29 12:37:49 +00:00
Samuel Williams
1889133c04
[ruby/io-console] Remove usage of IO internals.
...
(https://github.com/ruby/io-console/pull/43 )
4b839a504f
Co-authored-by: Benoit Daloze <eregontp@gmail.com>
2023-05-29 12:30:32 +00:00
Nobuyoshi Nakada
678bcfcaa6
[ruby/io-console] Check rawmode option names strictly
...
aa8fc7e947
2022-12-02 10:33:35 +00:00
Samuel Williams
f27eb8148f
Sync io-console gem.
2021-12-29 13:27:40 +13:00
Samuel Williams
548c8f5f7a
Prefer to use RTEST when checking result of rb_io_wait
. ( #5341 )
...
* Prefer to use RTEST when checking result of `rb_io_wait`.
* Consistently use false for signifying no events ready.
2021-12-25 02:26:06 +13:00
Nobuyoshi Nakada
5bfca88f76
[ruby/io-console] Fixed typo
2021-02-09 17:39:00 +09:00
Samuel Williams
5f69a7f604
Expose scheduler as public interface & bug fixes. ( #3945 )
...
* 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.
2021-02-09 19:39:56 +13:00
Nobuyoshi Nakada
83e62d7798
[ruby/io-console] Shrink struct query_args
...
720be0a3e5
2021-01-05 21:26:15 +09:00
Nobuyoshi Nakada
4272395982
[ruby/io-console] Pre-define chomp! ID
...
028e1c9497
2021-01-05 21:26:13 +09:00
Nobuyoshi Nakada
ead8d89bd7
[ruby/io-console] Ignore chomp! result and return the modified string
...
09e5ccc729
2021-01-05 21:26:11 +09:00
Marcus Stollsteimer
451b456051
[ruby/io-console] [DOC] Note that IO#getpass returns a chomped string
...
IO#getpass uses String#chomp! on the read input line.
1e98c93bc8
2021-01-05 12:59:53 +09:00
Nobuyoshi Nakada
71428ac264
[ruby/io-console] Refined getch warnings
...
f84e6abcce
2020-10-11 02:00:28 +09:00
Nobuyoshi Nakada
37259e878f
[ruby/io-console] Relaxed min: option warning
...
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.
a2afbe72bd
2020-10-11 02:00:26 +09:00
Nobuyoshi Nakada
a79966743c
[ruby/io-console] Fix timeout type error ( #18 )
...
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>'
```
3bdfaf62df
2020-10-11 02:00:24 +09:00
Nobuyoshi Nakada
b59640e155
[ruby/io-console] Fixed "Rework console to use rb_io_wait
."
...
* Fixed backward compatibility.
* Added missing `rb_scheduler_timeout` declaration.
813806079f
2020-10-11 01:27:15 +09:00
Samuel Williams
7fca274198
Rework console to use rb_io_wait
.
2020-09-14 16:44:09 +12:00
Nobuyoshi Nakada
be575a6eef
[ruby/io-console] Use sys_fail_fptr macro
...
2b8ba023c8
2020-05-09 17:05:14 +09:00
Nobuyoshi Nakada
0ce45db115
[ruby/io-console] Show path name at error
...
6a4b1c1a6d
2020-05-09 13:56:55 +09:00
Nobuyoshi Nakada
dec802d8b5
[ruby/io-console] [DOC] Improved about intr:
...
82b630cd79
2020-02-17 12:05:09 +09:00
Nobuyoshi Nakada
78282d4655
[ruby/io-console] Prefer keyword arguments
...
5facbfc4c8
2020-02-14 20:30:34 +09:00
Nobuyoshi Nakada
4e56ec4ef7
[ruby/io-console] Set OPOST
when intr
is true
...
To enable implementation-defined output processing, for the
compatibility with readline. [Bug #16509 ]
https://bugs.ruby-lang.org/issues/16509
8c8b0b6757
2020-01-18 00:15:02 +09:00
Nobuyoshi Nakada
31e2f03512
[ruby/io-console] Enable only interrupt bits on intr: true
...
baaf929041
2019-12-29 16:26:22 +09:00
Nobuyoshi Nakada
77e3078ede
[ruby/io-console] Set raw mode strictly same as cfmakeraw
...
* Default VMIN and VTIME to minimum input.
* Disable parity check bits explicitly.
* Disable all bits for flow control on input.
Co-Authored-By: NARUSE, Yui <naruse@airemix.jp>
5ce201a686
2019-12-18 10:33:05 +09:00
Yusuke Endoh
b39d5da974
[ruby/io-console] Use TCSANOW to prevent from discarding the input buffer
...
TCSAFLUSH discards the buffer read before the mode change, which makes
IRB ignore the buffer input immediately after invoked. TCSANOW
preserves the buffer.
b362920182
2019-12-17 13:55:05 +09:00