Actions
Misc #21684
openDoes IO#pos clear the buffer?
Misc #21684:
Does IO#pos clear the buffer?
Status:
Open
Assignee:
-
Description
I'm working on io.c and I'm confused by the difference between how the code looks and how it behaves.
There is a function io_unread(rb_io_t *fptr, bool discard_rbuf) and this seems to discard buffer only if discard_rbuf is truthy.
But they discards the buffer regardless of discard_rbuf in an ordinary code path.
As a result the buffer is discarded when IO#pos is called. Is this intended?
I checked #20869 and DevMeeting-2024-11-07, but I couldn't find a conclusion.
No data to display
Actions