summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-28 00:37:16 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-28 00:37:16 +0000
commitd89b64ddd7a5d0c1de5adf11a33cd13bec2dfd5d (patch)
treec52059161b00f65e1f50ce062ad98582256b0a90 /file.c
parent488b8befc2743b159e9f4e0ad12fa7c06c7ecd04 (diff)
* file.c: [DOC] Add more documentation for File.basename by @avdi [fix GH-550][ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/file.c b/file.c
index 602a8e527d..89e1694d56 100644
--- a/file.c
+++ b/file.c
@@ -3832,10 +3832,12 @@ ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encodin
* <code>File::ALT_SEPARATOR</code> as the separator when
* <code>File::ALT_SEPARATOR</code> is not <code>nil</code>. If
* <i>suffix</i> is given and present at the end of <i>file_name</i>,
- * it is removed.
+ * it is removed. If <i>suffix</i> is ".*", any extension will be
+ * removed.
*
* File.basename("/home/gumby/work/ruby.rb") #=> "ruby.rb"
* File.basename("/home/gumby/work/ruby.rb", ".rb") #=> "ruby"
+ * File.basename("/home/gumby/work/ruby.rb", ".*") #=> "ruby"
*/
static VALUE