From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 4A2381F466 for ; Thu, 16 Jan 2020 05:22:12 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 3AE59120AAF; Thu, 16 Jan 2020 14:21:56 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id 6EF9C120AAE for ; Thu, 16 Jan 2020 14:21:54 +0900 (JST) Received: by filterdrecv-p3iad2-57f487d66-mdzq2 with SMTP id filterdrecv-p3iad2-57f487d66-mdzq2-17-5E1FF2FA-1C 2020-01-16 05:22:02.339356477 +0000 UTC m=+2608523.473093002 Received: from herokuapp.com (unknown [54.158.130.18]) by ismtpd0052p1iad1.sendgrid.net (SG) with ESMTP id S8tpAWyFTIq3nxT0XfewFQ for ; Thu, 16 Jan 2020 05:22:02.228 +0000 (UTC) Date: Thu, 16 Jan 2020 05:22:02 +0000 (UTC) From: nobu@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 72544 X-Redmine-Project: ruby-master X-Redmine-Issue-Id: 8709 X-Redmine-Issue-Author: tommorris X-Redmine-Sender: nobu X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?q8Dly+pU2+3ektTtZVXgZtbJPXwqo7p86jCsvYTW4BzYBkwEesmHucHvFeRBvf?= =?us-ascii?Q?z9nyL4nQUwmHLzgMpjsMhWVu0kU+qIPw5q3P6BI?= =?us-ascii?Q?LlzIUQP9oGrSJoC659Dsw4EaIe9X2u=2Fdm=2FqDGJP?= =?us-ascii?Q?90Sj0qitFBZ7htXk=2FwwY5av+IV7Eaw9x8duaxHt?= =?us-ascii?Q?7PlzycyM0OGtqkQQKiUNuov3clunzZz12VrrqnO?= =?us-ascii?Q?x9nJ5R9AxdAPybxEs=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 96882 Subject: [ruby-core:96882] [Ruby master Feature#8709] Dir.glob should return sorted file list X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #8709 has been updated by nobu (Nobuyoshi Nakada). I'm for adding `NOSORT` option to the second argument. ---------------------------------------- Feature #8709: Dir.glob should return sorted file list https://bugs.ruby-lang.org/issues/8709#change-83894 * Author: tommorris (Tom Morris) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- 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) -- https://bugs.ruby-lang.org/