Project

General

Profile

Actions

Bug #5645

closed

YAML.load_file prevents following File.delete

Added by gknowles (Glen Knowles) over 12 years ago. Updated over 12 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3p0 (2011-10-30) [i386-mingw32]
Backport:
[ruby-core:41088]

Description

In ruby 1.9.2 and earlier this works:
d = YAML::load_file(fname)
File.delete(fname)

In 1.9.3 the delete fails with permission denied.

The work around is to use:
d = File.open(fname) { |f| YAML::load(f) }
File.delete(fname)

Updated by tenderlovemaking (Aaron Patterson) over 12 years ago

  • Status changed from Open to Closed
  • Assignee set to tenderlovemaking (Aaron Patterson)
  • % Done changed from 0 to 100

This was fixed by r33775, but the ticket wasn't closed automatically. :-/

Closing now. Thanks for the bug report!

Actions

Also available in: Atom PDF

Like0
Like0