About Newsroom
Monday, November 23, 2026 Today’s Paper
Primary-Sourced Edition About & sourcing →

Hacker News

Ruby Down 6.0 brings streamed downloads closer to native IO

The download library changes what a successful seek returns, preserves caller-supplied buffer encodings and drops two older options.

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]

Beyond the headline

The conversation

Bluesky
“Down::ChunkedIO now works like a real IO: read, gets, seek and encodings match Ruby's IO”

Maintainer Janko Marohnić spells out the stream methods affected by the change.

Read on Wildroot
Read more on this topicExplore on Wildroot

Sources & documents

Follow the numbered references to the reporting and original records.

  1. RubyGems Down 6.0.0 release metadatarubygems.org
  2. Down 5.6.3 tagged stream implementationraw.githubusercontent.com
  3. Down 6.0.0 tagged stream implementationraw.githubusercontent.com
  4. Ruby IO documentation on seek and positiondocs.ruby-lang.org
  5. Down 6.0.0 tagged release notesgithub.com
  6. RubyGems Down lifetime package statisticsrubygems.org