[前][次][番号順一覧][スレッド一覧]

ruby-changes:5921

From: kazu <ko1@a...>
Date: Thu, 19 Jun 2008 20:42:23 +0900 (JST)
Subject: [ruby-changes:5921] Ruby:r17429 (trunk): * lib/net/pop.rb (Net::POP3#set_all_uids): speed

kazu	2008-06-19 20:42:05 +0900 (Thu, 19 Jun 2008)

  New Revision: 17429

  Modified files:
    trunk/ChangeLog
    trunk/lib/net/pop.rb

  Log:
    * lib/net/pop.rb (Net::POP3#set_all_uids): speed
      up. a patch from <m-sumi AT techfirm.co.jp> [ruby-list:45047]


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17429&r2=17428&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/net/pop.rb?r1=17429&r2=17428&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 17428)
+++ ChangeLog	(revision 17429)
@@ -1,3 +1,8 @@
+Thu Jun 19 20:37:00 2008  Kazuhiro NISHIYAMA  <zn@m...>
+
+	* lib/net/pop.rb (Net::POP3#set_all_uids): speed
+	  up. a patch from <m-sumi AT techfirm.co.jp> [ruby-list:45047]
+
 Thu Jun 19 17:44:15 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* ext/etc/etc.c (Init_etc): define constant aliases Etc::Passwd
@@ -8,7 +13,7 @@
 	* 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.
Index: lib/net/pop.rb
===================================================================
--- lib/net/pop.rb	(revision 17428)
+++ lib/net/pop.rb	(revision 17429)
@@ -683,9 +683,8 @@
     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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]