169 Commits

Author SHA1 Message Date
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
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
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
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
Hiroshi SHIBATA
af60cdf674 [ruby/io-console] Bump up version to 0.7.2
https://github.com/ruby/io-console/commit/1f2877a185
2024-01-18 01:36:52 +00:00
Nobuyoshi Nakada
73fb9c35ef [ruby/io-console] IO_CONSOLE_VERSION is no longer a macro
https://github.com/ruby/io-console/commit/14b35217dc
2024-01-03 02:12:30 +00:00
ima1zumi
8916b81bf4 [ruby/io-console] Define IO::ConsoleMode::VERSION from console.c
https://github.com/ruby/io-console/commit/6302a2082c
2024-01-02 22:17:05 +00:00
Nobuyoshi Nakada
e7f91fd74c [ruby/io-console] [DOC] Add missing documents
https://github.com/ruby/io-console/commit/44dce34569
2023-12-25 21:12:49 +09:00
Nobuyoshi Nakada
4173c4bcfb [ruby/io-console] Extract CSI sequence
https://github.com/ruby/io-console/commit/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

https://github.com/ruby/io-console/commit/ee752ce771
2023-12-07 10:50:00 +00:00
Nobuyoshi Nakada
f08400a07a [ruby/io-console] Define IO::ConsoleMode::VERSION from gemspec
https://github.com/ruby/io-console/commit/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.

https://github.com/ruby/io-console/commit/beec164a47
2023-10-22 03:18:34 +00:00
Nobuyoshi Nakada
412defc7ad [ruby/io-console] Get rid of address of an rvalue on TruffleRuby
https://github.com/ruby/io-console/commit/653c1cd33f
2023-08-18 03:55:05 +00:00
Nobuyoshi Nakada
818ba30ee9 [ruby/io-console] Avoid the influence of special variable $/
https://github.com/ruby/io-console/commit/5f71354332
2023-08-18 03:55:04 +00:00
Nobuyoshi Nakada
cff8058701 [ruby/io-console] Ensure to put a newline after password
https://github.com/ruby/io-console/commit/15e36af171
2023-08-18 03:55:04 +00:00
Nobuyoshi Nakada
528da4347c [ruby/io-console] Flush after prompt
https://github.com/ruby/io-console/commit/040a1d6259
2023-08-18 03:55:03 +00:00
Nobuyoshi Nakada
540cf43205 [ruby/io-console] Enable getpass methods always
https://github.com/ruby/io-console/commit/57f9649df4
2023-08-18 03:55:02 +00:00
Nobuyoshi Nakada
1bbce42964 [ruby/io-console] [DOC] Remove a trailing space from the prompt too
https://github.com/ruby/io-console/commit/85a155f25f
2023-08-18 01:17:03 +00:00
Nobuyoshi Nakada
1107cfd077 [ruby/io-console] * remove trailing spaces [ci skip]
https://github.com/ruby/io-console/commit/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.

https://github.com/ruby/io-console/commit/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 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.
2023-06-01 17:43:45 +09:00
Hiroshi SHIBATA
35da41b29b
Revert https://github.com/ruby/io-console/pull/43
This reverts commit 1889133c04f337fec3969cb5040a544088249046 and
  commit 764207e47ce38d1b73774a8e65114c87bc888298.

  Followed up with 85dcc4866d
2023-06-01 09:36:55 +09:00
Samuel Williams
764207e47c [ruby/io-console] Remove trailing whitespace.
https://github.com/ruby/io-console/commit/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)

https://github.com/ruby/io-console/commit/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
https://github.com/ruby/io-console/commit/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