ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:91728] [Ruby trunk Bug#15649] Dir.glob regression with braces and Windows drive letters
       [not found] <redmine.issue-15649.20190309112919@ruby-lang.org>
@ 2019-03-09 11:30 ` daniel
  2019-03-14  7:30 ` [ruby-core:91828] " cfis
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: daniel @ 2019-03-09 11:30 UTC (permalink / raw)
  To: ruby-core

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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:91828] [Ruby trunk Bug#15649] Dir.glob regression with braces and Windows drive letters
       [not found] <redmine.issue-15649.20190309112919@ruby-lang.org>
  2019-03-09 11:30 ` [ruby-core:91728] [Ruby trunk Bug#15649] Dir.glob regression with braces and Windows drive letters daniel
@ 2019-03-14  7:30 ` cfis
  2019-03-20  1:35 ` [ruby-core:91888] " h.shirosaki
  2019-03-30 14:06 ` [ruby-core:92057] " naruse
  3 siblings, 0 replies; 4+ messages in thread
From: cfis @ 2019-03-14  7:30 UTC (permalink / raw)
  To: ruby-core

Issue #15649 has been updated by cfis (Charlie Savage).


Seeing the same here. Seems like its the braces that are broken on Windows in Ruby 2.6.  Rails autloading feature combines a number of glob patterns into a string for reason, instead of passing in an array.

https://github.com/rails/rails/blob/25620f91ca0ab261fbc883763040ec58d205514e/activesupport/lib/active_support/file_update_checker.rb#L143

----------------------------------------
Bug #15649: Dir.glob regression with braces and Windows drive letters
https://bugs.ruby-lang.org/issues/15649#change-77098

* 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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:91888] [Ruby trunk Bug#15649] Dir.glob regression with braces and Windows drive letters
       [not found] <redmine.issue-15649.20190309112919@ruby-lang.org>
  2019-03-09 11:30 ` [ruby-core:91728] [Ruby trunk Bug#15649] Dir.glob regression with braces and Windows drive letters daniel
  2019-03-14  7:30 ` [ruby-core:91828] " cfis
@ 2019-03-20  1:35 ` h.shirosaki
  2019-03-30 14:06 ` [ruby-core:92057] " naruse
  3 siblings, 0 replies; 4+ messages in thread
From: h.shirosaki @ 2019-03-20  1:35 UTC (permalink / raw)
  To: ruby-core

Issue #15649 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
File 0001-dir.c-fix-Dir.glob-starts-with-brace.patch added

I created a patch for the bug.

----------------------------------------
Bug #15649: Dir.glob regression with braces and Windows drive letters
https://bugs.ruby-lang.org/issues/15649#change-77211

* 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: DONTNEED, 2.5: DONTNEED, 2.6: REQUIRED
----------------------------------------
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]



---Files--------------------------------
0001-dir.c-fix-Dir.glob-starts-with-brace.patch (2.46 KB)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:92057] [Ruby trunk Bug#15649] Dir.glob regression with braces and Windows drive letters
       [not found] <redmine.issue-15649.20190309112919@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2019-03-20  1:35 ` [ruby-core:91888] " h.shirosaki
@ 2019-03-30 14:06 ` naruse
  3 siblings, 0 replies; 4+ messages in thread
From: naruse @ 2019-03-30 14:06 UTC (permalink / raw)
  To: ruby-core

Issue #15649 has been updated by naruse (Yui NARUSE).

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 r67353 merged revision(s) 67332.

----------------------------------------
Bug #15649: Dir.glob regression with braces and Windows drive letters
https://bugs.ruby-lang.org/issues/15649#change-77379

* Author: daniel-rikowski (Daniel Rikowski)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.1p33 (2019-01-30 revision 66950) [x64-mingw32]
* Backport: 2.4: DONTNEED, 2.5: DONTNEED, 2.6: DONE
----------------------------------------
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]



---Files--------------------------------
0001-dir.c-fix-Dir.glob-starts-with-brace.patch (2.46 KB)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-30 14:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-15649.20190309112919@ruby-lang.org>
2019-03-09 11:30 ` [ruby-core:91728] [Ruby trunk Bug#15649] Dir.glob regression with braces and Windows drive letters daniel
2019-03-14  7:30 ` [ruby-core:91828] " cfis
2019-03-20  1:35 ` [ruby-core:91888] " h.shirosaki
2019-03-30 14:06 ` [ruby-core:92057] " naruse

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).