* 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
This commit is contained in:
nobu 2018-03-30 13:48:16 +00:00
Родитель 484cc6b3bc
Коммит 5dfd225c64
1 изменённых файлов: 1 добавлений и 0 удалений

1
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("*.{rb,h}") #=> ["main.rb", "config.h"]
* Dir.glob("*") #=> ["config.h", "main.rb"] * Dir.glob("*") #=> ["config.h", "main.rb"]
* Dir.glob("*", File::FNM_DOTMATCH) #=> [".", "..", "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") * rbfiles = File.join("**", "*.rb")
* Dir.glob(rbfiles) #=> ["main.rb", * Dir.glob(rbfiles) #=> ["main.rb",