IO#read(size, buf) causes can't set length of shared string in trunk (2.0.0dev)
RuntimeError: can't set length of shared string
559: def dump_file(io, dev)
560: buf = ''
=> 561: while !io.read(@chunk_size, buf).nil?
562: dev << buf
block in dump'each'
block in query'timeout'
block in do_request'protect_keep_alive_disconnected'
post'block in test_post_with_custom_multipart_and_file'
Updated by nahi (Hiroshi Nakamura) almost 8 years ago
On Sun, Jul 22, 2012 at 2:32 AM, naruse (Yui NARUSE) email@example.com wrote:
This report is not contain small reproducible program.
Why don't you introduce ruby-zip/zlib's case?
Indeed I should have tried. Let me try.
Here's one likely caused by the same bug:
Updated by nobu (Nobuyoshi Nakada) almost 8 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r36980.
Hiroshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- io.c (io_set_read_length): if the read length equals to the buffer string size then nothing to do. or ensure the string modifiable before setting the length only when the former is shorter. based on the patch in [ruby-core:47541] by Hiroshi Shirosaki. [ruby-core:46586] [Bug #6764]