From afb5eef4e2a96934a188e1622c51636b5665fc8d Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 9 Jan 2012 11:28:00 +0000 Subject: * ext/pathname/pathname.c (path_entries): add document suggested by the thread [ruby-core:41959] [Bug #5859]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/pathname/pathname.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'ext/pathname/pathname.c') diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c index e1632c524b..bde58a3e21 100644 --- a/ext/pathname/pathname.c +++ b/ext/pathname/pathname.c @@ -861,8 +861,27 @@ path_s_getwd(VALUE klass) * Return the entries (files and subdirectories) in the directory, each as a * Pathname object. * + * The result contains just a filename which has no directory. + * * The result may contain the current directory # and the parent * directory #. + * + * If you don't want # and # and + * want directory, consider Pathname#children. + * + * pp Pathname.new('/usr/local').entries + * #=> [#, + * # #, + * # #, + * # #, + * # #, + * # #, + * # #, + * # #, + * # #, + * # #, + * # #] + * */ static VALUE path_entries(VALUE self) -- cgit v1.2.3