Down 6.0.0, published to RubyGems on Nov. 22, changes what Ruby developers get back when they seek to a position in a streamed download. Fediwire compared the tagged implementations. In version 5.6.3, a successful seek ended by assigning and returning the new position. In 6.0.0, the method delegates the operation to its backing store and returns zero on success, matching Ruby’s native IO convention. [1] [2] [3] [4]
Where to get the byte position
Down wraps downloaded chunks in an object called `Down::ChunkedIO`, which lets callers read the stream in pieces. Code that used the return value of `seek` as a byte offset now needs to read `pos` after moving. The new implementation sends reading operations to an underlying store, using a temporary file for rewindable streams and a memory buffer when rewindability is disabled. Seeking still requires a rewindable stream. [2] [3] [4]
Read methods preserve the caller’s buffer encoding
A caller can give `read` or `readpartial` an existing string to hold the next bytes. For a length-limited read or a partial read with that buffer, Down 6.0 keeps the buffer’s existing encoding. The prior implementation forced the buffer to binary in these cases. Code that implicitly relied on the old encoding should now account for the encoding of the buffer it supplies. The release also adds RBS type signatures describing the interfaces of Down, its stream class and several HTTP backends. [2] [3] [5]
Two older download options go away
The release removes the deprecated wget backend. Code using `Down::NetHttp` must also pass request headers through the `headers` option. The previous support for putting headers directly among the method’s top-level options has been removed. RubyGems showed about 48.8 million cumulative downloads for Down across its releases when checked. That package total counts downloads and provides no count of individual users. [5] [6]