ruby-changes:50834
From: nobu <ko1@a...>
Date: Fri, 30 Mar 2018 22:48:23 +0900 (JST)
Subject: [ruby-changes:50834] nobu:r63041 (trunk): dir.c: Dir.glob example
nobu 2018-03-30 22:48:16 +0900 (Fri, 30 Mar 2018) New Revision: 63041 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63041 Log: dir.c: Dir.glob example * dir.c (dir_s_glob): [DOC] added an example of Dir.glob using pattern list. [ci skip] Modified files: trunk/dir.c Index: dir.c =================================================================== --- dir.c (revision 63040) +++ dir.c (revision 63041) @@ -2698,6 +2698,7 @@ dir_s_aref(int argc, VALUE *argv, VALUE https://github.com/ruby/ruby/blob/trunk/dir.c#L2698 * 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", -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/