* file.c (rb_file_s_extname): fix rdoc for an edge case.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-11-20 12:34:45 +00:00
Родитель c3da426d10
Коммит eabe74e034
1 изменённых файлов: 3 добавлений и 2 удалений

5
file.c
Просмотреть файл

@ -3853,8 +3853,8 @@ ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc)
* Returns the extension (the portion of file name in +path+ * Returns the extension (the portion of file name in +path+
* starting from the last period). * starting from the last period).
* *
* If +path+ is a dotfile, or starts with a period, then only an empty string * If +path+ is a dotfile, or starts with a period, then the starting
* will be returned. * dot is not dealt with the start of the extension.
* *
* An empty string will also be returned when the period is the last character * An empty string will also be returned when the period is the last character
* in +path+. * in +path+.
@ -3864,6 +3864,7 @@ ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc)
* File.extname("foo.") #=> "" * File.extname("foo.") #=> ""
* File.extname("test") #=> "" * File.extname("test") #=> ""
* File.extname(".profile") #=> "" * File.extname(".profile") #=> ""
* File.extname(".profile.sh") #=> ".sh"
* *
*/ */