From: Brian Candler Date: 2003-04-05T21:41:18+09:00 Subject: Re: Strangeness in Find.find On Sat, Apr 05, 2003 at 09:03:25PM +0900, Kent Dahl wrote: > Brian Candler wrote: > > In that case though, I can't see why it is taking dup copies of the > > elements: it passes them to File.lstat, Dir.open and File.join, but I don't > > think any of those modify their string arguments. > > Perhaps not, but what about when it is used with a block, into which the > elements are yielded? The block might call modifying methods on the > strings or objects given. Yep, good point. It could have done yield file.dup but that would give unnecessary duplication where the filename was generated from a directory expansion. Thanks for the insight... Brian.