From: ptkwt@... (Phil Tomson) Date: 2004-01-06T14:06:43+09:00 Subject: Re: Loading a script in the top-level namespace? In article <3FFA38DB.4040605@NoSpam.com>, Glenn Lewis 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