ruby-changes:6852
From: shugo <ko1@a...>
Date: Tue, 5 Aug 2008 16:35:16 +0900 (JST)
Subject: [ruby-changes:6852] Ruby:r18368 (ruby_1_8): * lib/net/imap.rb (disconnect): do not refer SSL::SSLSocket for
shugo 2008-08-05 16:34:59 +0900 (Tue, 05 Aug 2008) New Revision: 18368 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18368 Log: * lib/net/imap.rb (disconnect): do not refer SSL::SSLSocket for environments without OpenSSL. backported from trunk. fixed [ruby-dev:35755]. Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/lib/net/imap.rb Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 18367) +++ ruby_1_8/ChangeLog (revision 18368) @@ -1,3 +1,9 @@ +Tue Aug 5 16:33:20 2008 Shugo Maeda <shugo@r...> + + * lib/net/imap.rb (disconnect): do not refer SSL::SSLSocket for + environments without OpenSSL. backported from trunk. + fixed [ruby-dev:35755]. + Tue Aug 5 14:19:22 2008 Nobuyoshi Nakada <nobu@r...> * file.c (rb_stat_mode): generalized st_mode mask. Index: ruby_1_8/lib/net/imap.rb =================================================================== --- ruby_1_8/lib/net/imap.rb (revision 18367) +++ ruby_1_8/lib/net/imap.rb (revision 18368) @@ -284,9 +284,11 @@ # 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/