Project

General

Profile

Actions

Bug #15244

closed

Method #extname return empty string if filename is dot ('.')

Added by TiSer (Sergey Ti) over 5 years ago. Updated about 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:89529]
Tags:

Description

Example 1:

Current behaviour:

File.extname('..jpg')
=> ""

Expected behaviour:

File.extname('..jpg')
=> ".jpg"

Example 2:

Current behaviour:

File.extname('....jpg')
=> ""

Expected behaviour:

=> ".jpg"

Files

dot-names.diff (891 Bytes) dot-names.diff rushsteve1 (Steven vanZyl), 08/02/2019 03:15 PM
multiple-leading-dot-basename-extname-15244.patch (1.94 KB) multiple-leading-dot-basename-extname-15244.patch jeremyevans0 (Jeremy Evans), 08/14/2019 01:08 AM

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #15267: File.basename + File.extname does not restore the original nameClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0