summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-12 02:19:17 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-12 02:19:17 +0000
commit58935eb8bdad1a42ce35efd0e0b0a9d7d43df299 (patch)
tree6ed3b721abc358f6c14274dc288c25aeba31ac35 /lib
parentd9421e1376f533e44d91d0cbfeaf054ef612e7d1 (diff)
lib/net/protocol.rb: preserve backtrace information
BufferedIO#rbuf_fill should preserve backtrace information when raising EOFError. Otherwise, users get confused when EOFError is leaked out from Net::SMTP etc. [ruby-core:78550] [Bug #13018] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/net/protocol.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb
index 1ea7f6bfc3..518b92c4ab 100644
--- a/lib/net/protocol.rb
+++ b/lib/net/protocol.rb
@@ -181,8 +181,7 @@ module Net # :nodoc:
@io.to_io.wait_writable(@read_timeout) or raise Net::ReadTimeout
# continue looping
when nil
- # callers do not care about backtrace, so avoid allocating for it
- raise EOFError, 'end of file reached', []
+ raise EOFError, 'end of file reached'
end while true
end