berkesokhan / rubydotnetcompiler

Automatically exported from code.google.com/p/rubydotnetcompiler
1 stars 0 forks source link

'require' doesn't release loaded file #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Here is a reproducible script.

File.open('file.rb', 'w') do |f|
  f.puts '$a = 1'
end
require 'file'
puts $a
File.delete('file.rb')

What is the expected output? What do you see instead?

expected:
prints 1, and deletes the file and exits quietly.

instead: Unhandled Exception.
(Original message is Japanese, so the message below is not identical in 
English version, because I've translated it into English)

Unhandled Exception: System.IO.IOException: can't access 'C:\home\arton\p
rojects\rubydotnetcompiler\tests\file.rb' because another process opens it.
   at Ruby.Compiler.AST.SOURCEFILE.ExecuteMain(Assembly Assembly, String[] 
args)

   at Ruby.Compiler.AST.SOURCEFILE.ExecuteMain(PEFile Assembly, String[] 
args)
   at Ruby.Compiler.RubyEntry.Process(String[] args)
  --snip--

Please use labels and text to provide additional information.

Original issue reported on code.google.com by art...@gmail.com on 23 Aug 2007 at 4:17

GoogleCodeExporter commented 9 years ago
File.load_file: 
Because of the function is not complete yet. It still needs to implement DATA 
section handler.

Original comment by art...@gmail.com on 23 Aug 2007 at 4:44