summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/dir.c b/dir.c
index c709b9446f..adefbdac55 100644
--- a/dir.c
+++ b/dir.c
@@ -592,10 +592,13 @@ dir_read(VALUE dir)
/*
* call-seq:
* dir.each { |filename| block } => dir
+ * dir.each => an_enumerator
*
* Calls the block once for each entry in this directory, passing the
* filename of each entry as a parameter to the block.
*
+ * If no block is given, an enumerator is returned instead.
+ *
* d = Dir.new("testdir")
* d.each {|x| puts "Got #{x}" }
*
@@ -1820,10 +1823,13 @@ dir_open_dir(int argc, VALUE *argv)
/*
* call-seq:
* Dir.foreach( dirname ) {| filename | block } => nil
+ * Dir.foreach( dirname ) => an_enumerator
*
* Calls the block once for each entry in the named directory, passing
* the filename of each entry as a parameter to the block.
*
+ * If no block is given, an enumerator is returned instead.
+ *
* Dir.foreach("testdir") {|x| puts "Got #{x}" }
*
* <em>produces:</em>