Actions
Bug #8625
closedIO#read(len, buf) shortens buf even if data is not read actually
Bug #8625:
IO#read(len, buf) shortens buf even if data is not read actually
Description
By r34580, IO#read(len, buf) does not expand buf until data is read actually,
but it still shortens if the original buf size is greater than len.
Is this an intended behavior?
Updated by Glass_saga (Masaki Matsushita) about 13 years ago
- Status changed from Open to Assigned
- Assignee set to nobu (Nobuyoshi Nakada)
Nakada-san, what do you think?
Updated by Glass_saga (Masaki Matsushita) over 12 years ago
- Assignee changed from nobu (Nobuyoshi Nakada) to Glass_saga (Masaki Matsushita)
Updated by nobu (Nobuyoshi Nakada) over 12 years ago
- Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED
- Description updated (diff)
Updated by nobu (Nobuyoshi Nakada) over 12 years ago
- % Done changed from 0 to 100
- Status changed from Assigned to Closed
Applied in changeset r46360.
io.c: not shorten buffer unless succeeded
- io.c (io_setstrbuf, io_read): should not shorten the given buffer until
read succeeds. [ruby-core:55951] [Bug #8625]
Updated by usa (Usaku NAKAMURA) over 12 years ago
- Status changed from Closed to Assigned
- Assignee changed from Glass_saga (Masaki Matsushita) to nobu (Nobuyoshi Nakada)
r46360 breaks some tests on mswin.
Updated by nobu (Nobuyoshi Nakada) over 12 years ago
- Status changed from Assigned to Closed
Applied in changeset r46372.
io.c: truncate before appending
- io.c (read_all): truncate the buffer before appending read data,
instead of truncating before reading.
[ruby-core:55951] [Bug #8625]
Updated by nagachika (Tomoyuki Chikanaga) about 12 years ago
- Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE
Backported into ruby_2_1 branch at r46629.
Updated by usa (Usaku NAKAMURA) about 12 years ago
backported into ruby_2_0_0 at r46738.
Updated by usa (Usaku NAKAMURA) about 12 years ago
- Backport changed from 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: DONE, 2.1: DONE
Actions