* file.c (rb_file_s_basename, rb_file_s_dirname): documentaion fix.

File.basename and File.dirname support File::ALT_SEPARATOR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2012-06-14 07:01:08 +00:00
parent 6648846e05
commit f927ec15c9
2 changed files with 11 additions and 5 deletions

View File

@ -1,3 +1,8 @@
Thu Jun 14 15:54:02 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* file.c (rb_file_s_basename, rb_file_s_dirname): documentaion fix.
File.basename and File.dirname support File::ALT_SEPARATOR.
Thu Jun 14 11:10:10 2012 Yuki Yugui Sonoda <yugui@google.com> Thu Jun 14 11:10:10 2012 Yuki Yugui Sonoda <yugui@google.com>
* nacl/pepper_maini.c: Applies the new embedding API to pepper_ruby. * nacl/pepper_maini.c: Applies the new embedding API to pepper_ruby.

11
file.c
View File

@ -3648,8 +3648,9 @@ ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encodin
* File.basename(file_name [, suffix] ) -> base_name * File.basename(file_name [, suffix] ) -> base_name
* *
* Returns the last component of the filename given in <i>file_name</i>, * Returns the last component of the filename given in <i>file_name</i>,
* which must be formed using forward slashes (``<code>/</code>'') * which can be formed using both <code>File::SEPARATOR</code> and
* regardless of the separator used on the local file system. If * <code>File::ALT_SEPARETOR</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>, * <i>suffix</i> is given and present at the end of <i>file_name</i>,
* it is removed. * it is removed.
* *
@ -3708,9 +3709,9 @@ rb_file_s_basename(int argc, VALUE *argv)
* File.dirname(file_name ) -> dir_name * File.dirname(file_name ) -> dir_name
* *
* Returns all components of the filename given in <i>file_name</i> * Returns all components of the filename given in <i>file_name</i>
* except the last one. The filename must be formed using forward * except the last one. The filename can be formed using both
* slashes (``<code>/</code>'') regardless of the separator used on the * <code>File::SEPARATOR</code> and <code>File::ALT_SEPARETOR</code> as the
* local file system. * separator when <code>File::ALT_SEPARATOR</code> is not <code>nil</code>.
* *
* File.dirname("/home/gumby/work/ruby.rb") #=> "/home/gumby/work" * File.dirname("/home/gumby/work/ruby.rb") #=> "/home/gumby/work"
*/ */