Documentation for pattern section, backslash subsection
  Patch by Eric Bouchut
  [ruby-core#48528] [Bug #7230]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
zzak 2012-11-03 04:47:49 +00:00
Родитель bdbc8c5b74
Коммит c420f8449e
2 изменённых файлов: 13 добавлений и 5 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Sat Nov 3 13:26:00 2012 Zachary Scott <zachary@zacharyscott.net>
* dir.c (Dir#glob):
Documentation for pattern section, backslash subsection
Patch by Eric Bouchut
[ruby-core#48528] [Bug #7230]
Sat Nov 3 13:26:00 2012 Zachary Scott <zachary@zacharyscott.net>
* io.c (IO#new):

11
dir.c
Просмотреть файл

@ -1782,7 +1782,7 @@ dir_s_aref(int argc, VALUE *argv, VALUE obj)
* <code>/ .* /x</code> in regexp. Note, this
* will not match Unix-like hidden files (dotfiles).
* In order to include those in the match results,
* you must use something like "{*,.*}".
* you must use something like <code>"{*,.*}"</code>.
* <code>**</code>:: Matches directories recursively.
* <code>?</code>:: Matches any one character. Equivalent to
* <code>/.{1}/</code> in regexp.
@ -1796,10 +1796,11 @@ dir_s_aref(int argc, VALUE *argv, VALUE obj)
* More than two literals may be specified.
* Equivalent to pattern alternation in
* regexp.
* <code> \ </code>:: Escapes the next metacharacter.
* Note that this means you cannot use backslash in windows
* as part of a glob, i.e. Dir["c:\\foo*"] will not work
* use Dir["c:/foo*"] instead
* <code> \\ </code>:: Escapes the next metacharacter.
* Note that this means you cannot use backslash
* in windows as part of a glob,
* i.e. <code>Dir["c:\\foo*"]</code> will not work,
* use <code>Dir["c:/foo*"]</code> instead.
*
* Dir["config.?"] #=> ["config.h"]
* Dir.glob("config.?") #=> ["config.h"]