summaryrefslogtreecommitdiff
path: root/lib/net/pop.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/pop.rb')
-rw-r--r--lib/net/pop.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/net/pop.rb b/lib/net/pop.rb
index 65cd498f55..046763e0a8 100644
--- a/lib/net/pop.rb
+++ b/lib/net/pop.rb
@@ -329,11 +329,11 @@ Net::POP3
def initialize( sock )
rep = super( sock )
- /<[^@]+@[^@>]+>/o === rep.msg
- @stamp = $&
- unless @stamp then
+ m = /<.+>/.match( rep.msg )
+ unless m then
raise ProtoAuthError, "This is not APOP server: can't login"
end
+ @stamp = m[0]
end