summaryrefslogtreecommitdiff
path: root/ext/pathname/pathname.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-09 11:28:00 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-09 11:28:00 +0000
commitafb5eef4e2a96934a188e1622c51636b5665fc8d (patch)
tree6815c8f24adc98f70161934d2d3aeda43bd72c4c /ext/pathname/pathname.c
parentbb1115a2d6b1ab37a1ae725bc26a965884f44029 (diff)
* 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
Diffstat (limited to 'ext/pathname/pathname.c')
-rw-r--r--ext/pathname/pathname.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c
index e1632c5..bde58a3 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 #<Pathname:.> and the parent
* directory #<Pathname:..>.
+ *
+ * If you don't want #<Pathname:.> and #<Pathname:..> and
+ * want directory, consider Pathname#children.
+ *
+ * pp Pathname.new('/usr/local').entries
+ * #=> [#<Pathname:share>,
+ * # #<Pathname:lib>,
+ * # #<Pathname:..>,
+ * # #<Pathname:include>,
+ * # #<Pathname:etc>,
+ * # #<Pathname:bin>,
+ * # #<Pathname:man>,
+ * # #<Pathname:games>,
+ * # #<Pathname:.>,
+ * # #<Pathname:sbin>,
+ * # #<Pathname:src>]
+ *
*/
static VALUE
path_entries(VALUE self)