digital-fabric / polyphony

Fine-grained concurrency for Ruby
https://www.rubydoc.info/gems/polyphony
MIT License
661 stars 17 forks source link

Return empty string when reading length zero #96

Closed floriandejonckheere closed 1 year ago

floriandejonckheere commented 1 year ago

Ruby's read always returns an empty string on read with length zero, not nil. Polyphony should do this as well.

Discovered through rubyzip reading/writing zero-length comments, which failed and caused the zip entry to be overwritten.