aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--dir.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a53c0f991..6218bd0b8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Apr 11 09:27:04 2013 Konstantin Haase <me@rkh.im>
+
+ * dir.c (file_s_fnmatch): Document File::FNM_EXTGLOB flag.
+
Thu Apr 11 09:17:00 2013 Zachary Scott <zachary@zacharyscott.net>
* README: Fix typo by Benjamin Winkler [Fixes GH-281]
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