ruby-changes:58293
From: Nobuyoshi <ko1@a...>
Date: Thu, 17 Oct 2019 19:43:40 +0900 (JST)
Subject: [ruby-changes:58293] 4f13927f1f (master): [DOC] no change on Windows [Bug #15267] [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=4f13927f1f From 4f13927f1fe06a5fe23e25448d9adc80031e0bad Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 17 Oct 2019 19:42:25 +0900 Subject: [DOC] no change on Windows [Bug #15267] [ci skip] diff --git a/NEWS b/NEWS index e8fdfe0..aadb122 100644 --- a/NEWS +++ b/NEWS @@ -194,8 +194,8 @@ Fiber:: https://github.com/ruby/ruby/blob/trunk/NEWS#L194 File:: Modified method:: - * File.extname now returns a dot string at a name ending with a - dot. [Bug #15267] + * File.extname now returns a dot string at a name ending with a dot on + non-Windows platforms. [Bug #15267] File.extname("foo.") #=> "." diff --git a/file.c b/file.c index d10aeaa..17881c0 100644 --- a/file.c +++ b/file.c @@ -4789,10 +4789,13 @@ ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc) https://github.com/ruby/ruby/blob/trunk/file.c#L4789 * An empty string will also be returned when the period is the last character * in +path+. * + * On Windows, trailing dots are truncated. + * * File.extname("test.rb") #=> ".rb" * File.extname("a/b/d/test.rb") #=> ".rb" * File.extname(".a/b/d/test.rb") #=> ".rb" - * File.extname("foo.") #=> "." + * File.extname("foo.") #=> "" on Windows + * File.extname("foo.") #=> "." on non-Windows * File.extname("test") #=> "" * File.extname(".profile") #=> "" * File.extname(".profile.sh") #=> ".sh" -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/