From: ts Date: 2003-03-07T01:09:38+09:00 Subject: Re: Is there a way to 'unload' a script/module/class ? >>>>> "B" == Bennett, Patrick writes: B> That won't work since I need to instantiate a class within the loaded B> file and pass arguments to it. : I don't understand sorry, you don't want something like this ? pigeon% cat b.rb #!/usr/bin/ruby ["aaa", "bbb"].each do |mot| File.open("c.rb", "w") do |f| f.puts("class A; def aa() puts '#{mot}'; end; end") end load 'c.rb' A.new.aa end pigeon% pigeon% b.rb aaa bbb pigeon% Guy Decoux