diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-10-17 19:42:25 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-10-17 19:43:10 +0900 |
commit | 4f13927f1fe06a5fe23e25448d9adc80031e0bad (patch) | |
tree | bc34888e3b3419483efb70541ca95fc8148145a5 | |
parent | e169ad93f44e1944ecf7bb65133fd34e8b868ea8 (diff) | |
download | ruby-4f13927f1fe06a5fe23e25448d9adc80031e0bad.tar.gz |
[DOC] no change on Windows [Bug #15267] [ci skip]
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | file.c | 5 |
2 files changed, 6 insertions, 3 deletions
@@ -194,8 +194,8 @@ Fiber:: 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.") #=> "." @@ -4789,10 +4789,13 @@ ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc) * 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" |