From: Alan Davies Date: 2003-09-19T00:14:39+09:00 Subject: Re: Dir.foreach not with patterns? Weirich, James wrote: >> I like the Dir[] form (or its "glob" alternative). I used to write >> recursive functions to search a directory tree. Then I discovered >> Dir['**/*.rb']. Not only is it easier, it's also faster. I'm not so sure. I timed my recursive "Filescan" class against Dir[] on a large fileserver. Dir[] took 92 seconds, and my Filescan class only took 72 seconds. I also prefer the ordering of the output of my Filescan class.