From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.4 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 167021F453 for ; Tue, 23 Oct 2018 12:20:01 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 0AD941217A3; Tue, 23 Oct 2018 21:19:58 +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 2DF90121767 for ; Tue, 23 Oct 2018 21:19:53 +0900 (JST) Received: by filter0185p3mdw1.sendgrid.net with SMTP id filter0185p3mdw1-31927-5BCF11E6-9 2018-10-23 12:19:50.14985649 +0000 UTC m=+400578.992151354 Received: from herokuapp.com (ec2-54-82-56-160.compute-1.amazonaws.com [54.82.56.160]) by ismtpd0005p1iad1.sendgrid.net (SG) with ESMTP id CUOE-8TSTFy_DJs1kOazNA Tue, 23 Oct 2018 12:19:50.129 +0000 (UTC) Date: Tue, 23 Oct 2018 12:19:50 +0000 (UTC) From: shevegen@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 64921 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15244 X-Redmine-Issue-Author: TiSer X-Redmine-Sender: shevegen 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: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS5Sni6RiZ2nnc9SkcmPcq5ga1YRs4r3K4wRtU cVNLK44ggEukFlGYoXa14FUhjr6s8w2sbkuw3X9v2WV1LUqNCWizZaw6SxFu+LBvR6rZxkgF73NiB1 tjNRpTQ1NWjnwQ4Aa1/2827PK1ODj2zj1KbDK+oVIQ8Dqamrn1En5spj/w== X-ML-Name: ruby-core X-Mail-Count: 89532 Subject: [ruby-core:89532] [Ruby trunk Bug#15244] Method #extname return empty string if filename is dot ('.') 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 #15244 has been updated by shevegen (Robert A. Heiler). Is this a real problem? How many people have had entries with more leading '.'? File.extname('foobar......jpg') # => ".jpg" File.extname('......jpg') # => "" It's not that I am not inclined to agree about it; I just think it's a bit strange to want to change that behaviour. Do people use lots of '.' for names to files or directories or symlinks? ---------------------------------------- Bug #15244: Method #extname return empty string if filename is dot ('.') https://bugs.ruby-lang.org/issues/15244#change-74583 * Author: TiSer (Sergey TiSer) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: 2.5.0p0 * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- ### Example 1: Current behaviour: ``` File.extname('..jpg') => "" ``` Expected behaviour: ``` File.extname('..jpg') => "." ``` ### Example 2: Current behaviour: ``` File.extname('....jpg') => "" ``` Expected behaviour: ``` => "..." ``` -- https://bugs.ruby-lang.org/