* lib/net/pop.rb: def m( arg ) -> def m(arg).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0cf429ce82
commit
b81df5d837
@ -1,3 +1,7 @@
|
|||||||
|
Sun Mar 28 14:23:02 2004 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
|
* lib/net/pop.rb: def m( arg ) -> def m(arg).
|
||||||
|
|
||||||
Sun Mar 28 14:09:13 2004 Minero Aoki <aamine@loveruby.net>
|
Sun Mar 28 14:09:13 2004 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
* lib/net/pop.rb (auth): failed when account/password include "%".
|
* lib/net/pop.rb (auth): failed when account/password include "%".
|
||||||
|
@ -410,7 +410,6 @@ module Net
|
|||||||
# This method raises a POPAuthenticationError if authentication fails.
|
# This method raises a POPAuthenticationError if authentication fails.
|
||||||
def start(account, password) # :yield: pop
|
def start(account, password) # :yield: pop
|
||||||
raise IOError, 'POP session already started' if @started
|
raise IOError, 'POP session already started' if @started
|
||||||
|
|
||||||
if block_given?
|
if block_given?
|
||||||
begin
|
begin
|
||||||
do_start account, password
|
do_start account, password
|
||||||
@ -621,6 +620,8 @@ module Net
|
|||||||
# +dest+ argument will be prepended to the returned String; this
|
# +dest+ argument will be prepended to the returned String; this
|
||||||
# argument is essentially obsolete.
|
# argument is essentially obsolete.
|
||||||
#
|
#
|
||||||
|
# This method raises a POPError if an error occurs.
|
||||||
|
#
|
||||||
# # Example without block
|
# # Example without block
|
||||||
# POP3.start('pop.example.com', 110,
|
# POP3.start('pop.example.com', 110,
|
||||||
# 'YourAccount, 'YourPassword') {|pop|
|
# 'YourAccount, 'YourPassword') {|pop|
|
||||||
@ -648,7 +649,6 @@ module Net
|
|||||||
# end
|
# end
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# This method raises a POPError if an error occurs.
|
|
||||||
def pop(dest = '', &block) # :yield: message_chunk
|
def pop(dest = '', &block) # :yield: message_chunk
|
||||||
if block_given?
|
if block_given?
|
||||||
@command.retr(@number, &block)
|
@command.retr(@number, &block)
|
||||||
@ -726,7 +726,7 @@ module Net
|
|||||||
|
|
||||||
alias uidl unique_id
|
alias uidl unique_id
|
||||||
|
|
||||||
def uid=( uid ) #:nodoc: internal use only (used from POP3#set_all_uids)
|
def uid=(uid) #:nodoc: internal use only
|
||||||
@uid = uid
|
@uid = uid
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -784,7 +784,7 @@ module Net
|
|||||||
end
|
end
|
||||||
|
|
||||||
def rset
|
def rset
|
||||||
check_response(critical { get_response 'RSET' })
|
check_response(critical { get_response('RSET') })
|
||||||
end
|
end
|
||||||
|
|
||||||
def top(num, lines = 0, &block)
|
def top(num, lines = 0, &block)
|
||||||
@ -843,12 +843,12 @@ module Net
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_response(res)
|
def check_response(res)
|
||||||
raise POPError, res unless /\A\+OK/i === res
|
raise POPError, res unless /\A\+OK/i =~ res
|
||||||
res
|
res
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_response_auth(res)
|
def check_response_auth(res)
|
||||||
raise POPAuthenticationError, res unless /\A\+OK/i === res
|
raise POPAuthenticationError, res unless /\A\+OK/i =~ res
|
||||||
res
|
res
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -865,4 +865,3 @@ module Net
|
|||||||
end # class POP3Command
|
end # class POP3Command
|
||||||
|
|
||||||
end # module Net
|
end # module Net
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user