I use a Windows software that uses the Ruby "glob" function to get files in a directory. This is baked in and I don't have access to the source code. On both Windows and OS X it gives sorted results but not on Linux. As already said I am not able to just call a Ruby sort function afterwards, because it is used like that internally under the assumption it would be sorted.
A little research showed that Ruby's glob function is based on the operating system's glob function, and glob returns no sorted results
- on Linux, running Ruby in Wine 1.5.26
- on Linux, running native (Linux) Ruby
- on Linux, running Windows Ruby in VirtualBox accessing files on a ext4 network drive (this could have to do with the VirtualBox driver)
It is unclear to me a) whether it is a bug and b) where to file the bug (is it in the system's glob, ext4, Ruby, Wine, VirtualBox?)
However it does cause problems when running Windows software that assumes Windows' glob is sorted.