[#121215] [Ruby master Bug#21166] Fiber Scheduler is unable to be interrupted by `IO#close`. — "ioquatix (Samuel Williams) via ruby-core" <ruby-core@...>

Issue #21166 has been reported by ioquatix (Samuel Williams).

13 messages 2025/03/02

[#121222] [Ruby master Bug#21167] Visual Studio 2022 17.13.x couldn't build ruby.exe — "hsbt (Hiroshi SHIBATA) via ruby-core" <ruby-core@...>

Issue #21167 has been reported by hsbt (Hiroshi SHIBATA).

8 messages 2025/03/03

[#121234] [Ruby master Bug#21168] Prism doesn't require argument parentheses (in some cases) when a block is present but parse.y does — "Earlopain (Earlopain _) via ruby-core" <ruby-core@...>

Issue #21168 has been reported by Earlopain (Earlopain _).

8 messages 2025/03/04

[#121389] [Ruby Bug#21187] Strings concatenated with `\` getting frozen with literal hashes (PRISM only) — LocoDelAssembly via ruby-core <ruby-core@...>

Issue #21187 has been reported by LocoDelAssembly (Hern=E1n Pereira).

12 messages 2025/03/17

[#121413] [Ruby Bug#21193] Inherited callback returns `nil` for `Object.const_source_location` — "eileencodes (Eileen Uchitelle) via ruby-core" <ruby-core@...>

Issue #21193 has been reported by eileencodes (Eileen Uchitelle).

15 messages 2025/03/20

[#121451] [Ruby Bug#21201] Performance regression when defining methods inside `refine` blocks — "alpaca-tc (Hiroyuki Ishii) via ruby-core" <ruby-core@...>

Issue #21201 has been reported by alpaca-tc (Hiroyuki Ishii).

8 messages 2025/03/27

[ruby-core:121298] [Ruby master Bug#21177] Sometimes Ruby can create and delete long paths on Windows, but cannot traverse them

From: deivid via ruby-core <ruby-core@...>
Date: 2025-03-11 17:18:29 UTC
List: ruby-core #121298
Issue #21177 has been updated by deivid (David Rodr=EDguez).


Wow, thanks so much @nobu!

----------------------------------------
Bug #21177: Sometimes Ruby can create and delete long paths on Windows, but=
 cannot traverse them
https://bugs.ruby-lang.org/issues/21177#change-112262

* Author: deivid (David Rodr=EDguez)
* Status: Closed
* ruby -v:   ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +PRISM [x64-mingw-=
ucrt]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
In the GitHub Actions environment provided by `ruby/setup-ruby` with `os: w=
indows-2022`, one can create directories with long names with no issues. Si=
milarly, one can create files inside these directories, and delete these fi=
les and directories explicitly without issues. However, one cannot traverse=
 these directories (`Dir.children`), and as a result, one cannot delete the=
se directories recursively.

This is a small script to reproduce the problem:

```ruby
require "fileutils"

longest_possible_component =3D "b" * 255

# Can create directories with long names
FileUtils.mkdir_p "D:/a/#{longest_possible_component}"
puts "FileUtils.mkdir_p ok"

# Can create files inside them
FileUtils.touch "D:/a/#{longest_possible_component}/c"
puts "FileUtils.touch ok"

# Can delete files inside them
File.delete "D:/a/#{longest_possible_component}/c"
puts "File.delete ok"

# Can delete them
Dir.rmdir "D:/a/#{longest_possible_component}"
puts 'Dir.rmdir ok'

FileUtils.mkdir_p "D:/a/#{longest_possible_component}"
FileUtils.touch "D:/a/#{longest_possible_component}/c"

Dir.children "D:/a/#{longest_possible_component}"
# FileUtils.rm_r "D:/a" raises too
```

It fails with the following output:

```
$ ruby windows-bug.rb
 =20
<internal:dir>:184:in 'Dir.open': Filename too long @ dir_initialize - D:/a=
/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb=
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb=
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb=
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb (Errno::ENAMETOOLONG)
	from windows-bug.rb:24:in 'Dir.children'
	from windows-bug.rb:24:in '<main>'
FileUtils.mkdir_p ok
FileUtils.touch ok
File.delete ok
Dir.rmdir ok
```

Note that `FileUtils.rm_rf` does not raise here because it swallows errors =
(see https://bugs.ruby-lang.org/issues/18784) but fails to remove the direc=
tory too due to this bug.

Looking at sources, I wonder if the explicit raise of `ENAMETOOLONG` should=
 be removed from here: https://github.com/ruby/ruby/blob/e418ba0928ab96ac64=
5ab42d77af34806d74c20e/win32/win32.c#L1985-L2001, and let the system calls =
themselves raise it if really necessary?



--=20
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.rub=
y-lang.org/


In This Thread

Prev Next