Project

General

Profile

Actions

Feature #8709

closed

Dir.glob should return sorted file list

Added by tommorris (Tom Morris) over 11 years ago. Updated almost 5 years ago.

Status:
Closed
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
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0