Issue #15540 has been updated by h.shirosaki (Hiroshi Shirosaki).

Backport changed from 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN to 2.4: DONTNEED, 2.5: DONTNEED, 2.6: REQUIRED
ruby -v set to ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
File 0001-dir.c-fix-Dir.glob-with-braces-and-matching-dir.patch added

Thanks for report. I attached a patch for the issue.

----------------------------------------
Bug #15540: 2.6.0 Dir#glob regression
https://bugs.ruby-lang.org/issues/15540#change-76350

* Author: bughit (bug hit)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
* Backport: 2.4: DONTNEED, 2.5: DONTNEED, 2.6: REQUIRED
----------------------------------------
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--------------------------------
0001-dir.c-fix-Dir.glob-with-braces-and-matching-dir.patch (1.74 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>