From: "H.Yamamoto" Date: 2004-03-12T13:18:00+09:00 Subject: Re: RDoc proporsal Sorry, it didn't work... ... seems only work in the line which starts after 2 speces. File.fnmatch(...) is in
 block, and  is treated as ordinary characters.

Thank you,

Yamamoto.

////////////////////////////////////////////
// RDoc

/*
 *  call-seq:
 *     File.fnmatch( pattern, path, [flags] ) => (true or false)
 *     File.fnmatch?( pattern, path, [flags] ) => (true or false)
 *
 *  Returns true if path matches against pattern The
 *  pattern is not a regular expression; instead it follows rules
 *  similar to shell filename globbing. It may contain the following
 *  metacharacters:
 *
 *  flags is a bitwise OR of the FNM_xxx parameters.
 *  The same glob pattern and flags are used by Dir::glob.
 *
 *     File.fnmatch('cat',       'cat')        #=> true
 *     File.fnmatch('cat',       'category')   #=> false
 *     File.fnmatch('c{at,ub}s', 'cats')       #=> false
 *     File.fnmatch('c{at,ub}s', 'cubs')       #=> false
 *     File.fnmatch('c{at,ub}s', 'cat')        #=> false
 *
 *     File.fnmatch('c?t',    'cat')                       #=> true
 *     File.fnmatch('c\?t',   'cat')                       #=> false
 *     File.fnmatch('c??t',   'cat')                       #=> false
 *     File.fnmatch('c*',     'cats')                      #=> true
 *     File.fnmatch('c/*/t', 'c/a/b/c/t')                 #=> true
 *     File.fnmatch('c*t',    'cat')                       #=> true
 *     File.fnmatch('c\at',   'cat')                       #=> true
 *     File.fnmatch('c\at',   'cat', File::FNM_NOESCAPE)   #=> false
 *     File.fnmatch('a?b',    'a/b')                       #=> true
 *     File.fnmatch('a?b',    'a/b', File::FNM_PATHNAME)   #=> false
 *
 *     File.fnmatch('*',   '.profile')                            #=> false
 *     File.fnmatch('*',   '.profile', File::FNM_DOTMATCH)        #=> true
 *     File.fnmatch('*',   'dave/.profile')                       #=> true
 *     File.fnmatch('*',   'dave/.profile', File::FNM_DOTMATCH)   #=> true
 *     File.fnmatch('*',   'dave/.profile', File::FNM_PATHNAME)   #=> false
 *     File.fnmatch('*/*', 'dave/.profile', File::FNM_PATHNAME)   #=> false
 *     STRICT = File::FNM_PATHNAME | File::FNM_DOTMATCH
 *     File.fnmatch('*/*', 'dave/.profile', STRICT)               #=> true
 */


////////////////////////////////////////////
// Generated HTML

				
			
				

Returns true if path matches against pattern The pattern is not a regular expression; instead it follows rules similar to shell filename globbing. It may contain the following metacharacters:

flags is a bitwise OR of the FNM_xxx parameters. The same glob pattern and flags are used by Dir::glob.

   File.fnmatch('cat',       'cat')        #=> true
   File.fnmatch('cat',       'category')   #=> false
   File.fnmatch('c{at,ub}s', 'cats')       #=> false
   File.fnmatch('c{at,ub}s', 'cubs')       #=> false
   File.fnmatch('c{at,ub}s', 'cat')        #=> false

hoge

   File.fnmatch('c?t',    'cat')                       #=> true
   File.fnmatch('c\?t',   'cat')                       #=> false
   File.fnmatch('c??t',   'cat')                       #=> false
   File.fnmatch('c*',     'cats')                      #=> true
   File.fnmatch('c/*<i></i>/t', 'c/a/b/c/t')                 #=> true
   File.fnmatch('c*t',    'cat')                       #=> true
   File.fnmatch('c\at',   'cat')                       #=> true
   File.fnmatch('c\at',   'cat', File::FNM_NOESCAPE)   #=> false
   File.fnmatch('a?b',    'a/b')                       #=> true
   File.fnmatch('a?b',    'a/b', File::FNM_PATHNAME)   #=> false

   File.fnmatch('*',   '.profile')                            #=> false
   File.fnmatch('*',   '.profile', File::FNM_DOTMATCH)        #=> true
   File.fnmatch('*',   'dave/.profile')                       #=> true
   File.fnmatch('*',   'dave/.profile', File::FNM_DOTMATCH)   #=> true
   File.fnmatch('*',   'dave/.profile', File::FNM_PATHNAME)   #=> false
   File.fnmatch('*<i></i>/*', 'dave/.profile', File::FNM_PATHNAME)   #=> false
   STRICT = File::FNM_PATHNAME | File::FNM_DOTMATCH
   File.fnmatch('*<i></i>/*', 'dave/.profile', STRICT)               #=> true