summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorHiroshi Shirosaki <h.shirosaki@gmail.com>2022-10-18 09:18:03 +0900
committerHiroshi Shirosaki <h.shirosaki@gmail.com>2022-10-18 09:18:03 +0900
commit329d5424a479bb08e75bd750c51a5382e382731c (patch)
tree63778980f4b7ef49446e2ac0d1b98eda0c85bb85 /dir.c
parent995bdd69de0ce0ab5cec93c5818cc28912657458 (diff)
downloadruby-329d5424a479bb08e75bd750c51a5382e382731c.tar.gz
[Bug #19042] Fix Dir.glob brace with '/'
Dir.glob brace pattern with '/' after '**' does not match paths in recursive expansion process. We expand braces with '/' before expanding a recursive. Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index a3ea5eea50..a35aace6f1 100644
--- a/dir.c
+++ b/dir.c
@@ -2305,7 +2305,7 @@ glob_helper(
#endif
break;
case BRACE:
- if (!recursive) {
+ if (!recursive || strchr(p->str, '/')) {
brace = 1;
}
break;