> Contrary to my expectations, if I have some variable
> assignments in an external file, I can't simply call:
>
>     load rcfile

Load starts a new scope without reusing the local scope. Eval
starts a new scope with reusing the local scope. So, use eval
instead. But you should "define" the vars before loading them.

gegroet,
Erik V. - http://www.erikveen.dds.nl/

----------------------------------------------------------------

 $ cat test.rb
 a=nil
 b=nil

 eval(File.read("vars.rb"))

 # Or better: Thread.new{$SAFE=4 ; eval(File.read("vars.rb"),
Module.new.instance_eval{binding})}.join

 p a
 p b

----------------------------------------------------------------

 $ cat vars.rb
 a       = 7
 b       = 8

----------------------------------------------------------------

 $ ruby test.rb
 7
 8

----------------------------------------------------------------