aboutsummaryrefslogtreecommitdiffstats
path: root/dir.c
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-11 00:27:39 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-11 00:27:39 +0000
commit0daf538ab48070d42be999b0fdb5344fcf6eb840 (patch)
tree8a00c009ff01a1e9a0551fc0d0f636bc6d223416 /dir.c
parentaf869274867dcdf7199279449357462eb3c8cb22 (diff)
downloadruby-0daf538ab48070d42be999b0fdb5344fcf6eb840.tar.gz
* dir.c (file_s_fnmatch): Document File::FNM_EXTGLOB flag.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 4322344e6b..01c38f1cd7 100644
--- a/dir.c
+++ b/dir.c
@@ -2030,6 +2030,9 @@ fnmatch_brace(const char *pattern, VALUE val, void *enc)
* Regexp, including set negation
* (<code>[^a-z]</code>).
* <code> \ </code>:: Escapes the next metacharacter.
+ * <code>{a,b}</code>:: Matches pattern a and pattern b if
+ * <code>File::FNM_PATHNAME</code> flag is enabled.
+ * Behaves like a Regexp union (<code>(?:a|b)</code>).
*
* <i>flags</i> is a bitwise OR of the <code>FNM_xxx</code>
* parameters. The same glob pattern and flags are used by
@@ -2037,7 +2040,9 @@ fnmatch_brace(const char *pattern, VALUE val, void *enc)
*
* File.fnmatch('cat', 'cat') #=> true # match entire string
* File.fnmatch('cat', 'category') #=> false # only match partial string
- * File.fnmatch('c{at,ub}s', 'cats') #=> false # { } isn't supported
+ *
+ * File.fnmatch('c{at,ub}s', 'cats') #=> false # { } isn't supported by default
+ * File.fnmatch('c{at,ub}s', 'cats', File::FNM_EXTGLOB) #=> false # { } is supported on FNM_EXTGLOB
*
* File.fnmatch('c?t', 'cat') #=> true # '?' match only 1 character
* File.fnmatch('c??t', 'cat') #=> false # ditto