ruby-core

Mailing list archive

[#78633] ruby/spec needs help from CRuby committers — Benoit Daloze <eregontp@...>

Currently, ruby/spec is maintained mostly by individuals and enjoys the

13 messages 2016/12/13

[ruby-core:78498] [Ruby trunk Bug#13008] File::basename fails if extension contains a colon

From: merch-redmine@...
Date: 2016-12-05 14:59:09 UTC
List: ruby-core #78498
Issue #13008 has been updated by Jeremy Evans.


I don't think this is a bug. `:` is the file stream separator in NTFS (https://blogs.technet.microsoft.com/askcore/2013/03/24/alternate-data-streams-in-ntfs/).  On *nix systems, you do get `c.d:12`.

----------------------------------------
Bug #13008: File::basename fails if extension contains a colon
https://bugs.ruby-lang.org/issues/13008#change-61876

* Author: Ronald Fischer
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-cygwin]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
~~~
 File.basename('a/b/c.d:12')
~~~

returns 

~~~
c.d
~~~

but should return

~~~
c.d:12
~~~



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

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next