From 2bcb0a1a353f6b1ce0e2f1be6eb11e5af69ae546 Mon Sep 17 00:00:00 2001 From: kazu Date: Thu, 19 Jun 2008 11:42:05 +0000 Subject: [PATCH] * lib/net/pop.rb (Net::POP3#set_all_uids): speed up. a patch from [ruby-list:45047] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 ++++++- lib/net/pop.rb | 5 ++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index accf2002a4..41cd161395 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Jun 19 20:37:00 2008 Kazuhiro NISHIYAMA + + * lib/net/pop.rb (Net::POP3#set_all_uids): speed + up. a patch from [ruby-list:45047] + Thu Jun 19 17:44:15 2008 Yukihiro Matsumoto * ext/etc/etc.c (Init_etc): define constant aliases Etc::Passwd @@ -8,7 +13,7 @@ Thu Jun 19 17:37:21 2008 Yukihiro Matsumoto * string.c (str_alloc): specify 'inline' modifier. * string.c (str_alloc): remove cSymbol hack that no longer - necessary. + necessary. * string.c (scan_once): avoid retrieving encoding info unless necessary. diff --git a/lib/net/pop.rb b/lib/net/pop.rb index 82cc9a747b..0f3aa0d878 100644 --- a/lib/net/pop.rb +++ b/lib/net/pop.rb @@ -683,9 +683,8 @@ module Net end def set_all_uids #:nodoc: internal use only (called from POPMail#uidl) - command().uidl.each do |num, uid| - @mails.find {|m| m.number == num }.uid = uid - end + uidl = command().uidl + @mails.each {|m| m.uid = uidl[m.number] } end def logging(msg)