Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise EOFError in Socket#readline instead of TypeError #740

Merged
merged 1 commit into from Mar 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/excon/socket.rb
Expand Up @@ -60,7 +60,7 @@ def read(max_length = nil)
def readline
return legacy_readline if RUBY_VERSION.to_f <= 1.8_7
buffer = String.new
buffer << read_nonblock(1) while buffer[-1] != "\n"
buffer << (read_nonblock(1) || raise(EOFError)) while buffer[-1] != "\n"
buffer
end

Expand Down