On Ruby 1.9.3 (win7(64))

Because code says more the thousand words:
##################
 open("test.txt","r").each do end  # doesn't close file
 FileUtils.rm "test.txt"           # will fail: Permission denied
##################
(it doesn't matter if the "do end" is filled or omitted)

Bug, 'Feature' or my mistake?

-- 
Posted via http://www.ruby-forum.com/.