[ruby-cvs:67104] naruse:r59926 (trunk): Find.find -> Use Dir.children instead of Dir.entries

naruse at ruby-lang.org naruse at ruby-lang.org
Sat Sep 16 02:00:49 JST 2017


naruse	2017-09-16 02:00:49 +0900 (Sat, 16 Sep 2017)

  New Revision: 59926

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59926

  Log:
    Find.find -> Use Dir.children instead of Dir.entries
    
    Dir.children is available since Feature #11302.
    Find.find can use of the new list (having no '.' neither '..' entries),
    making now superflous an if statement.
    
    This change can improve the performance of Find.find when the path
    has lots of entries (thousands?).
    
    https://bugs.ruby-lang.org/issues/11302
    patched by Espartaco Palma <esparta at gmail.com>
    https://github.com/ruby/ruby/pull/1697 fix GH-1697
    [Feature #13896]

  Modified files:
    trunk/lib/find.rb


More information about the ruby-cvs mailing list