Bugs: Browse | Submit New | Admin

[#9470] TempFile fails to delete the file if inside a Dir.chdir block

Date:
2007-03-22 14:28
Priority:
3
Submitted By:
Niko Vuokko (vulpes)
Assigned To:
Akinori MUSHA (knu)
Category:
Files / Dirs / IO
State:
Open
Platform:
 
Summary:
TempFile fails to delete the file if inside a Dir.chdir block

Detailed description
Latest Cygwin with Ruby 1.8.5-3 on Win XP Pro SP 2.

TempFile fails to delete the temporary file it creates, if working inside a Dir.chdir block:

# Doesn't work

Dir.chdir("./dir") do
   Tempfile.open("johndoe", ".") {}
end


# These work fine

Tempfile.open("./dir/johndoe", ".") {}

Tempfile.open("dir/johndoe", ".") {}

Tempfile.open("johndoe", "dir") {}

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
assigned_tonone2007-06-12 01:22zenspider
category_idMisc / Other Standard Library2007-05-29 20:57zenspider