ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "charliesome (Charlie Somerville)" <charliesome@ruby-lang.org>
To: ruby-core@ruby-lang.org
Subject: [ruby-core:56275] [ruby-trunk - Bug #8709][Rejected] Dir.glob should return sorted file list
Date: Wed, 31 Jul 2013 02:49:28 +0900	[thread overview]
Message-ID: <redmine.journal-40767.20130731024927@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-8709.20130731012405@ruby-lang.org


Issue #8709 has been updated by charliesome (Charlie Somerville).

Status changed from Open to Rejected

=begin
Dir.glob is documented to return filenames in filesystem order:

> Note that case sensitivity depends on your system, ((*as does the order in which the results are returned.*))
=end

----------------------------------------
Bug #8709: Dir.glob should return sorted file list
https://bugs.ruby-lang.org/issues/8709#change-40767

Author: tommorris (Tom Morris)
Status: Rejected
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.3p429 (2013-05-15) [x86_64-linux] Brightbox
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


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.


-- 
http://bugs.ruby-lang.org/

  reply	other threads:[~2013-07-30 18:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-30 16:24 [ruby-core:56274] [ruby-trunk - Bug #8709][Open] Dir.glob should return sorted file list tommorris (Tom Morris)
2013-07-30 17:49 ` charliesome (Charlie Somerville) [this message]
2020-01-11  6:28 ` [ruby-core:96776] [Ruby master Bug#8709] " rubybugsbmw
2020-01-11 11:18 ` [ruby-core:96779] " hsbt
2020-01-11 11:27 ` [ruby-core:96780] [Ruby master Feature#8709] " eregontp
2020-01-11 11:32 ` [ruby-core:96781] " hsbt
2020-01-11 11:33 ` [ruby-core:96782] " eregontp
2020-01-11 11:35 ` [ruby-core:96785] " eregontp
2020-01-11 20:48 ` [ruby-core:96792] " rubybugsbmw
2020-01-13  9:28 ` [ruby-core:96823] " jean.boussier
2020-01-13 10:04 ` [ruby-core:96824] " deivid.rodriguez
2020-01-13 18:49 ` [ruby-core:96828] " john
2020-01-14  6:27 ` [ruby-core:96836] " naruse
2020-01-14  7:27 ` [ruby-core:96840] " mame
2020-01-14 10:40 ` [ruby-core:96850] " eregontp
2020-01-14 10:44 ` [ruby-core:96851] " eregontp
2020-01-16  5:22 ` [ruby-core:96882] " nobu
2020-01-16  6:03 ` [ruby-core:96888] " matz
2020-01-16 15:12 ` [ruby-core:96911] " daniel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-40767.20130731024927@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).