Issue #5645 has been reported by Glen Knowles.

----------------------------------------
Bug #5645: YAML.load_file prevents following File.delete
http://redmine.ruby-lang.org/issues/5645

Author: Glen Knowles
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.3p0 (2011-10-30) [i386-mingw32]


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)



-- 
http://redmine.ruby-lang.org