Actions
Bug #15540
closed2.6.0 Dir#glob regression
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
Description
in an empty base folder create the following structure
.
└── c
├── d
│ └── a
│ ├── a.file
│ └── b
│ ├── b.file
│ └── c
│ └── c.file
└── e
└── a
├── a.file
└── b
├── b.file
└── c
└── c.file
execute the following in the base folder: ruby -v -e 'pp Dir["c/{d,e}/a/**/"]'
before 2.6
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
["c/d/a/", "c/d/a/b/", "c/d/a/b/c/", "c/e/a/", "c/e/a/b/", "c/e/a/b/c/"]
2.6
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
["c/d/a/a.file", "c/d/a/b", "c/e/a/a.file", "c/e/a/b"]
Files
Updated by h.shirosaki (Hiroshi Shirosaki) almost 6 years ago
- File 0001-dir.c-fix-Dir.glob-with-braces-and-matching-dir.patch 0001-dir.c-fix-Dir.glob-with-braces-and-matching-dir.patch added
- ruby -v set to ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
- Backport changed from 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN to 2.4: DONTNEED, 2.5: DONTNEED, 2.6: REQUIRED
Thanks for report. I attached a patch for the issue.
Updated by Anonymous almost 6 years ago
- Status changed from Open to Closed
Applied in changeset trunk|r66838.
dir.c: fix Dir.glob with braces and matching dir
-
dir.c (join_path_from_pattern): add the last slash for directory
matching. -
test/ruby/test_dir.rb (test_glob_recursive_directory): add a test
for above.
[ruby-core:91110] [Bug #15540]
Updated by naruse (Yui NARUSE) almost 6 years ago
- Backport changed from 2.4: DONTNEED, 2.5: DONTNEED, 2.6: REQUIRED to 2.4: DONTNEED, 2.5: DONTNEED, 2.6: DONE
ruby_2_6 r66848 merged revision(s) 66838.
Actions
Like0
Like0Like0Like0