Chris Game <chrisgame / example.net> writes:

> Brian Schröäer wrote:
>
>> irb(main):001:0> eval(File.read('data.rb'))
>
> Thanks - that appears to do the trick. although I'm still not clear
> why 'load"filename" ' doesn't make the data available and eval(...)
> does.

Because it is exactly made for that:

------------------------------------------------------------ Kernel#load
     load(filename, wrap=false)   => true
------------------------------------------------------------------------
     Loads and executes the Ruby program in the file _filename_. If the
     filename does not resolve to an absolute path, the file is searched
     for in the library directories listed in +$:+. If the optional
     _wrap_ parameter is +true+, the loaded script will be executed
     under an anonymous module, protecting the calling program's global
>>>  namespace. In no circumstance will any local variables in the  <<<
>>>  loaded file be propagated to the loading environment.          <<<

> Chris Game
-- 
Christian Neukirchen  <chneukirchen / gmail.com>  http://chneukirchen.org