From 53fc60eb8834fdcfcbb0270eb9c4dfaf52c9ab72 Mon Sep 17 00:00:00 2001 From: Eric Bouchut Date: Sun, 28 Oct 2012 16:27:36 +0100 Subject: [PATCH] Fixes typo in Dir::glob pattern documentation Surround code samples with code tag. Escape backslash. --- dir.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dir.c b/dir.c index 1a375ea..11e3028 100644 --- a/dir.c +++ b/dir.c @@ -1782,7 +1782,7 @@ dir_s_aref(int argc, VALUE *argv, VALUE obj) * / .* /x 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 "{*,.*}". * **:: Matches directories recursively. * ?:: Matches any one character. Equivalent to * /.{1}/ 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. - * \ :: 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 + * \\ :: 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. * * Dir["config.?"] #=> ["config.h"] * Dir.glob("config.?") #=> ["config.h"] -- 1.7.11.2