From: daniel@rikowski.info
To: ruby-core@ruby-lang.org
Subject: [ruby-core:91728] [Ruby trunk Bug#15649] Dir.glob regression with braces and Windows drive letters
Date: Sat, 09 Mar 2019 11:30:00 +0000 (UTC) [thread overview]
Message-ID: <redmine.issue-15649.20190309112919.5e3ee5cee1eab1be@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-15649.20190309112919@ruby-lang.org
Issue #15649 has been reported by daniel-rikowski (Daniel Rikowski).
----------------------------------------
Bug #15649: Dir.glob regression with braces and Windows drive letters
https://bugs.ruby-lang.org/issues/15649
* Author: daniel-rikowski (Daniel Rikowski)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.6.1p33 (2019-01-30 revision 66950) [x64-mingw32]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
I noticed that certain glob patterns involving braces and drive letters, which did work in Ruby 2.5.3, no longer work in Ruby 2.6.1.
Assume I have a directory `C:\Projects` and my current directory is `C:\Windows`. Using IRB I can observe the following results of `Dir.glob`:
Patterns working in 2.6.1 and 2.5.3:
```
Dir['c:'] => ['c:']
Dir['c:/'] => ['c:/']
Dir['c:/projects'] => ['c:/Projects']
```
Patterns broken in 2.6.1 (but working in 2.5.3)
```
Dir['{c:}'] => ['Windows']
Dir['{c:/}'] => ['Windows/']
Dir['{c:/projects}'] => []
```
Some background:
I noticed this problem first in Rails, where the file modification watcher tries to glob a pattern like `{c:/dir1/**/*.{rb},c:/dir2/**/*.{rb},c:/dir3/**/*.{rb}}`
Due to the bug above, the code reloading feature of Rails is broken using Ruby 2.6.1 on Windows. (Because the pattern is always resolved to an empty array)
Rubies tested:
* ruby 2.5.3p105 (2018-10-18 revision 65156) [x64-mingw32]
* ruby 2.6.1p33 (2019-01-30 revision 66950) [x64-mingw32]
--
https://bugs.ruby-lang.org/
next parent reply other threads:[~2019-03-09 11:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <redmine.issue-15649.20190309112919@ruby-lang.org>
2019-03-09 11:30 ` daniel [this message]
2019-03-14 7:30 ` [ruby-core:91828] [Ruby trunk Bug#15649] Dir.glob regression with braces and Windows drive letters cfis
2019-03-20 1:35 ` [ruby-core:91888] " h.shirosaki
2019-03-30 14:06 ` [ruby-core:92057] " naruse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.issue-15649.20190309112919.5e3ee5cee1eab1be@ruby-lang.org \
--to=ruby-core@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).