summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-20 12:34:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-20 12:34:45 +0000
commiteabe74e0341ce1144d2a7521f88dcaf940a02380 (patch)
treee935e262a1a54f84c0d9f70e2a5e1bf64b103cac /file.c
parentc3da426d10a686dc24f86d000178a2d1eb852e17 (diff)
file.c: fix rdoc
* 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
Diffstat (limited to 'file.c')
-rw-r--r--file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/file.c b/file.c
index 7e2a8222fa..d4e7e36cc8 100644
--- a/file.c
+++ b/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+
* starting from the last period).
*
- * If +path+ is a dotfile, or starts with a period, then only an empty string
- * will be returned.
+ * If +path+ is a dotfile, or starts with a period, then the starting
+ * dot is not dealt with the start of the extension.
*
* An empty string will also be returned when the period is the last character
* in +path+.
@@ -3864,6 +3864,7 @@ ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc)
* File.extname("foo.") #=> ""
* File.extname("test") #=> ""
* File.extname(".profile") #=> ""
+ * File.extname(".profile.sh") #=> ".sh"
*
*/