httprb / http

HTTP (The Gem! a.k.a. http.rb) - a fast Ruby HTTP client with a chainable API, streaming support, and timeouts
MIT License
3.01k stars 321 forks source link

Incorrect method documentation? #732

Closed joevandyk closed 1 year ago

joevandyk commented 1 year ago

https://github.com/httprb/http/blob/13ce3c2710bc27b467dda68f908149a2f69643cc/lib/http/connection.rb#L89

It says the method can return nil there's no more data - however, it looks like it would return an empty string when that happens?

tarcieri commented 1 year ago

Have a look at this line: https://github.com/httprb/http/blob/13ce3c2710bc27b467dda68f908149a2f69643cc/lib/http/connection.rb#L91

joevandyk commented 1 year ago

well i feel dumb now ;) thanks.