From: Toby Rodwell Date: 2010-01-31T08:47:48+09:00 Subject: Re: Pass arguments to 'require' Robert, Xavier, many thanks - not only is my problem solved but (perhaps more importantly) my knowledge and appreciation of Ruby have grown. For the benfit of others, here is what I now have:- def with_argv(*args) backup = ARGV.dup begin ARGV.replace(args) yield ensure ARGV.replace(backup) end end with_argv(*ARGV) do require '/opt/ruby/script1.rb' require '/opt/ruby/script2.rb' end -- Posted via http://www.ruby-forum.com/.