Project

General

Profile

Feature #8709

Dir.glob should return sorted file list

Added by tommorris (Tom Morris) about 7 years ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:56274]

Description

On OS X, Dir.glob and Dir[] return an ordered list of files.

On Ubuntu Linux, they do not and one must manually sort them.

Returning a list of files that isn't in order fails the Principle of Least Astonishment.

I attach a unit test to demonstrate ideal behaviour.


Files

globtest.rb (454 Bytes) globtest.rb tommorris (Tom Morris), 07/31/2013 01:24 AM

Also available in: Atom PDF