Project

General

Profile

Actions

Backport #1168

closed

wrong result of File.extname for path contains a space just before the extension

Added by nobu (Nobuyoshi Nakada) about 15 years ago. Updated almost 13 years ago.


Description

=begin
http://pc11.2ch.net/test/read.cgi/tech/1233686068/380

ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-mswin32]
irb(main):007:0> File.extname("a.txt")
=> ".txt"
irb(main):008:0> File.extname("a .txt")
=> ""
irb(main):009:0> File.extname("a.txt .txt")
=> ".txt .txt"
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0