In article <3FFA38DB.4040605 / NoSpam.com>,
Glenn Lewis  <NoSpam / NoSpam.com> wrote:
>What is the correct way to load a Ruby script into the
>top-level namespace?
>
>In other words, from within a script, I want to simulate
>the behavior of having called the script on the command-line,
>such as "ruby myscript.rb"...  From within another script,
>how do I load "myscript.rb" into the top-level namespace?
>
>Thanks!  (I couldn't find this by searching the RubyGarden
>or the RubyWiki... sorry if this is a FAQ.)
>

load should do what you want.

  load "myscript.rb"

Phil