Skip to content
Browse files

Do not require Net::IMAP or Net::POP if they're already loaded

  • Loading branch information...
1 parent f19ffd4 commit cfe94b73bf76e6910b19f00258f8177c42c67b1e @bpot bpot committed Jun 5, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/mail/network/retriever_methods/imap.rb
  2. +1 −1 lib/mail/network/retriever_methods/pop3.rb
View
2 lib/mail/network/retriever_methods/imap.rb
@@ -36,7 +36,7 @@ module Mail
# #=> Returns the first 10 emails in ascending order
#
class IMAP < Retriever
- require 'net/imap'
+ require 'net/imap' unless defined?(Net::IMAP)
def initialize(values)
self.settings = { :address => "localhost",
View
2 lib/mail/network/retriever_methods/pop3.rb
@@ -32,7 +32,7 @@ module Mail
# #=> Returns the first 10 emails in ascending order
#
class POP3 < Retriever
- require 'net/pop'
+ require 'net/pop' unless defined?(Net::POP)
def initialize(values)
self.settings = { :address => "localhost",

0 comments on commit cfe94b7

Please sign in to comment.
Something went wrong with that request. Please try again.