summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-30 13:48:16 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-30 13:48:16 (GMT)
commit5dfd225c6438fe82b54eae541be42687aa91bbb2 (patch)
tree83cd4ac0524c3bb7d1b492ae149d0a0981b0a3f8 /dir.c
parent484cc6b3bc828a0bb62aebefd7fdc2c86cab4f57 (diff)
dir.c: Dir.glob example
* dir.c (dir_s_glob): [DOC] added an example of Dir.glob using pattern list. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/dir.c b/dir.c
index 6d2bedf..2260b97 100644
--- a/dir.c
+++ b/dir.c
@@ -2698,6 +2698,7 @@ dir_s_aref(int argc, VALUE *argv, VALUE obj)
* Dir.glob("*.{rb,h}") #=> ["main.rb", "config.h"]
* Dir.glob("*") #=> ["config.h", "main.rb"]
* Dir.glob("*", File::FNM_DOTMATCH) #=> [".", "..", "config.h", "main.rb"]
+ * Dir.glob(["*.rb", "*.h"]) #=> ["main.rb", "config.h"]
*
* rbfiles = File.join("**", "*.rb")
* Dir.glob(rbfiles) #=> ["main.rb",