From d89b64ddd7a5d0c1de5adf11a33cd13bec2dfd5d Mon Sep 17 00:00:00 2001 From: hsbt Date: Fri, 28 Feb 2014 00:37:16 +0000 Subject: * 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 --- file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 * File::ALT_SEPARATOR as the separator when * File::ALT_SEPARATOR is not nil. If * suffix is given and present at the end of file_name, - * it is removed. + * it is removed. If suffix 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 -- cgit v1.2.3