Closed arjenlentz closed 9 years ago
Indeed, so it seems - as per the docs below (last paragraph, last sentence), and of course we mustn't depend on platform-specific behaviour.
http://docs.ruby-lang.org/en/2.1.0/Dir.html
glob( pattern, [flags] ) → matches glob( pattern, [flags] ) { |filename| block } → nil
Expands pattern, which is an Array of patterns or a pattern String, and returns the results as matches or as arguments given to the block.
Note that this pattern is not a regexp, it's closer to a shell glob. See File.fnmatch for the meaning of the flags parameter. Note that case sensitivity depends on your system (so File::FNM_CASEFOLD is ignored), as does the order in which the results are returned.
Odd, the file list comes out sorted on my machine, but maybe it's a platform thing. If it fixed it for you though, I'm happy to merge