mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
merge revision(s) 2ecfb88ee5
: [Backport #16918]
Correctly remove temporary directory if path yielded is mutated Another approach would be to freeze the string, but that could cause backwards compatibility issues. Fixes [Bug #16918]
This commit is contained in:
parent
cc39480cf9
commit
13d2ab0d88
3 changed files with 13 additions and 2 deletions
|
@ -86,7 +86,7 @@ class Dir
|
|||
}
|
||||
if block_given?
|
||||
begin
|
||||
yield path
|
||||
yield path.dup
|
||||
ensure
|
||||
unless base
|
||||
stat = File.stat(File.dirname(path))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue