ruby-changes:33121
From: hsbt <ko1@a...>
Date: Fri, 28 Feb 2014 09:37:21 +0900 (JST)
Subject: [ruby-changes:33121] hsbt:r45200 (trunk): * file.c: [DOC] Add more documentation for File.basename by @avdi [fix GH-550][ci skip]
hsbt 2014-02-28 09:37:16 +0900 (Fri, 28 Feb 2014) New Revision: 45200 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45200 Log: * file.c: [DOC] Add more documentation for File.basename by @avdi [fix GH-550][ci skip] Modified files: trunk/file.c Index: file.c =================================================================== --- file.c (revision 45199) +++ file.c (revision 45200) @@ -3832,10 +3832,12 @@ ruby_enc_find_basename(const char *name, https://github.com/ruby/ruby/blob/trunk/file.c#L3832 * <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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/