diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-05 07:24:48 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-05 07:24:48 +0000 |
commit | 7debbe54312dbbb57757754432fa8f1f63a31304 (patch) | |
tree | d7f1a9bea8b6887ddc0c36b2934fc318a5453827 /lib | |
parent | 3b5974bf308bd6b26236e5bd0972823a8191d533 (diff) | |
download | ruby-7debbe54312dbbb57757754432fa8f1f63a31304.tar.gz ruby-7debbe54312dbbb57757754432fa8f1f63a31304.tar.xz ruby-7debbe54312dbbb57757754432fa8f1f63a31304.zip |
* lib/net/imap.rb (disconnect): do not refer SSL::SSLSocket for
environments without OpenSSL. fixed [ruby-dev:35755].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/imap.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/net/imap.rb b/lib/net/imap.rb index 4c63ddd32..64011e69c 100644 --- a/lib/net/imap.rb +++ b/lib/net/imap.rb @@ -287,9 +287,11 @@ module Net # Disconnects from the server. def disconnect - if SSL::SSLSocket === @sock + begin + # try to call SSL::SSLSocket#io. @sock.io.shutdown - else + rescue NoMethodError + # @sock is not an SSL::SSLSocket. @sock.shutdown end @receiver_thread.join |