diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-09 10:24:32 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-09 10:24:32 +0000 |
commit | f67887c18e3cec3d912bef65852aa6caa1e7682e (patch) | |
tree | ea118019027f3916e7406797b1b9ff827687d29c /lib | |
parent | 182f7e163f3943ab45fe63f7c732b3bfb1a26d3b (diff) |
merge revision(s) 18368:
* lib/net/imap.rb (disconnect): do not refer SSL::SSLSocket for
environments without OpenSSL. backported from trunk.
fixed [ruby-dev:35755].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@21409 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 f8c0d3be4c..6162ffa0d0 100644 --- a/lib/net/imap.rb +++ b/lib/net/imap.rb @@ -284,9 +284,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 |