From: Charles Oliver Nutter Date: 2009-02-15T03:43:34+09:00 Subject: [ruby-core:22089] Re: Dir.glob and duplicates? Tanaka Akira wrote: > In article <49967EC7.6080105@sun.com>, > Charles Oliver Nutter writes: > >> In the JRuby dupe case it's 'a/**/b/**/e'. > > It has no braces. So the result should not have dupes. > >> Either way though, since one would have to filter out dupes when >> globbing, specifying that some globs may produce dupes seems like >> over-specifying. > > The usual explanation is that Dir.glob emurates shells. I would argue that since glob can be implemented in different ways, that if one impl has dupes for one place, another can have dupes for other places. The detail of which globs may return dupes should not be specified in glob's behavior; glob should either be "may return dupes" or "never returns dupes". If any case in MRI returns dupes, then glob "may return dupes", and we should fix the specs to uniq the result. Agreed? - Charlie