From 9b97c2435c1d6fdbcdfab104cb1ac3359d40dff2 Mon Sep 17 00:00:00 2001 From: shugo Date: Fri, 23 Jul 2004 00:05:58 +0000 Subject: * lib/net/imap.rb (disconnected?): new method. (backported from HEAD) git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ lib/net/imap.rb | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 04d670438..ebc204032 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Jul 23 09:03:16 2004 Shugo Maeda + + * lib/net/imap.rb (disconnected?): new method. (backported from HEAD) + Thu Jul 22 00:02:21 2004 Masahiro Kitajima * process.c (rb_f_system): not need to call last_status_set() any diff --git a/lib/net/imap.rb b/lib/net/imap.rb index 7e8d574fb..705d54b0c 100644 --- a/lib/net/imap.rb +++ b/lib/net/imap.rb @@ -289,6 +289,11 @@ module Net @sock.close end + # Returns true if disconnected from the server. + def disconnected? + return @sock.closed? + end + # Sends a CAPABILITY command, and returns an array of # capabilities that the server supports. Each capability # is a string. See [IMAP] for a list of possible -- cgit