Ruby docs don't mention this.
Does Dir.glob("*")
g开发者_如何学Gouarantee the order of the files it returns, or do I need to sort them myself to be certain?
No. Not if you're moving across OSes: http://rubyforge.org/tracker/index.php?func=detail&aid=12795&group_id=426&atid=1698
If the docs don't say it, then there is no guarantee, and you need to sort it for yourself. Even if it works in your current ruby, it may not in your next.
精彩评论