summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-13 10:11:09 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-13 10:11:09 +0000
commitb9522c168763806cf119c57acdd6293efe60fe0e (patch)
treedb4ea77487df61d9d208058f9ef9b2834055a038 /doc
parent14461ddae6530c5574e9899a42c92817b180d3d2 (diff)
* dir.c: FNM_PERIOD is obsoleted and FNM_DOTMATCH is introduced
instead, which has the opposite meaning of FNM_PERIOD. * dir.c: Dir::glob now accepts optional FNM_* flags via the second argument, whereas Dir::[] doesn't. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'doc')
-rw-r--r--doc/NEWS21
1 files changed, 10 insertions, 11 deletions
diff --git a/doc/NEWS b/doc/NEWS
index bd3e7fe..3c1fbb7 100644
--- a/doc/NEWS
+++ b/doc/NEWS
@@ -1,13 +1,9 @@
-: getopts.rb
+: Dir::glob
- Rewrote to fix some bugs and complete features.
- - Accept options with the colon in the first argument;
- getopts("a:bcd:") is equivalent to getopts("bc", "a:", "d:").
- - Do not discard the argument that caused an error.
- - Do not discard '-', which commonly stands for stdin or stdout.
- - Allow specifying a long option with a value using '='.
- (command --long-option=value)
- - Stop reading options when it meets a non-option argument.
+ Now accepts optional FNM_* flags via the second argument, whereas
+ Dir::[] doesn't.
+
+ Dir.glob("makefile", File::FNM_CASEFOLD) #=> ['Makefile', 'makefile']
: tsort module
@@ -210,10 +206,13 @@
Added. Refer to the fnmatch(3) manpage for details.
+ Localism is FNM_DOTMATCH which has the opposite meaning of the
+ commonly known FNM_PERIOD, which does not exist in Ruby.
+
e.g.
- # exclude files matching "*.bak".
- files.reject! {|fn| File.fnmatch?("*.bak", fn) }
+ # exclude files matching "*.bak" case-insensitively.
+ files.reject! {|fn| File.fnmatch?("*.bak", fn, File::FNM_CASEFOLD) }
: File.lchmod
: File.lchown