General

Profile

YO4 (Yoshinao Muramatsu)

  • Login: YO4
  • Registered on: 02/17/2021
  • Last sign in: 07/31/2026

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 17 9 26

Activity

08/10/2026

11:41 PM Ruby Revision 079e6d52 (git): io.c: reset the buffer state in free_io_buffer
In io.c, free_io_buffer only clears ptr and left off, len and capa as they were.
Since clear_readconv releases the character buffer through it, READ_CHAR_PENDING() kept reporting pending characters after the buffer had been released.
As ...
YO4 (Yoshinao Muramatsu)
11:41 PM Ruby Revision 9da50098 (git): io.c: discard the read buffer of a writable IO in IO#reopen(io)
IO#reopen(io) only flushes the write buffer when the IO is writable, and never unreads the read buffer.
The buffer happens to be dropped by the io_seek after dup2, but only when the other stream is readable and seekable, otherwise the IO...
YO4 (Yoshinao Muramatsu)
11:41 PM Ruby Revision 627de64c (git): io.c: clear the code converter in IO#reopen
IO#reopen(name) discards the byte buffer but keeps the code converter and the character buffer, so characters left over from the previous stream leak into the reopened one.
The code converter itself also has to go, since fptr->encs may h...
YO4 (Yoshinao Muramatsu)
11:41 PM Ruby Revision beeacd38 (git): io.c: clear the code converter in IO#reopen(io)
IO#reopen(io) relies on flush_before_seek to drop the buffers, but io_unread returns at once when rbuf is empty and therefore never reaches clear_codeconv.
With characters pending in cbuf and nothing in rbuf they leak into the reopened s...
YO4 (Yoshinao Muramatsu)
11:41 PM Ruby Revision fa0edeb7 (git): io.c: clear the character buffer in IO#seek and IO#pos=
Unlike IO#rewind, IO#seek and IO#pos= do not clear the character buffer.
As io_unread returns at once when rbuf is empty, an ungotten character survives the repositioning while it does not in binary mode.
Clear the read converter after r...
YO4 (Yoshinao Muramatsu)
12:18 PM Ruby Bug #22239: Multiple buffer clear errors in IO
GH PR created. https://github.com/ruby/ruby/pull/18276 YO4 (Yoshinao Muramatsu)
11:40 AM Ruby Bug #22239 (Open): Multiple buffer clear errors in IO
While testing my changes on the Windows platform to use an encoding converter for newline conversion for "r", I discovered a failure in test_reopen. This corresponds to case (3) below.
I asked an LLM to investigate similar cases and r...
YO4 (Yoshinao Muramatsu)

08/06/2026

03:54 AM Ruby Misc #22230: Should Ruby specs define byte oriented read behavior when the character buffer is not empty?
This may overlap with the discussion in ruby/spec, but I'll share my understanding of the current situation with CRuby.
The following illustrates the read model for IO in CRuby's implementation.
```
device -> [rbuf] -> encoding conv...
YO4 (Yoshinao Muramatsu)

07/31/2026

02:21 PM Ruby Bug #21682: The result of IO#pos is inconsistent after using IO#ungetc.
I haven't heard anything.
There was no response to the PR either, but if I can point out one thing, I think the CI failure was accidental.
I may be overthinking this, but by limiting the scope of this issue too much, we might be miss...
YO4 (Yoshinao Muramatsu)

07/24/2026

08:31 AM Ruby Revision 3da63e6a (git): add test for ENV.keys encoding
YO4 (Yoshinao Muramatsu)

Also available in: Atom