aboutsummaryrefslogtreecommitdiffstats
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
commit70777b3fa87d6c0aefb0f072b68e7b792a9e63f3 (patch)
tree6ed3b721abc358f6c14274dc288c25aeba31ac35 /lib
parent58c654a06eb9f77c91486adc208c5e738bc4a934 (diff)
downloadruby-70777b3fa87d6c0aefb0f072b68e7b792a9e63f3.tar.gz
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