On Saturday 21 April 2007 16:25, Thomas Hafner wrote: > the file is run as standalone program or whether the file is used > indirectly by require or load, > *but* when the file is run standalone, a special piece of code within > the file shall be active in addition (a kind of main section). Perhaps you want: if __FILE__ == $0 (do something) end as was just mentioned in another thread: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/248563 -- Jesse Merriman jessemerriman / warpmail.net http://www.jessemerriman.com/