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 --- ChangeLog | 5 +++++ ext/pathname/pathname.c | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7862f89d7d..f8b893fe29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jan 9 20:26:33 2012 Tanaka Akira + + * ext/pathname/pathname.c (path_entries): add document suggested by + the thread [ruby-core:41959] [Bug #5859]. + Mon Jan 9 20:14:13 2012 Tanaka Akira * ext/socket/lib/socket.rb (family_addrinfo): don't require protocol 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