From: "Brian Schröder" Date: 2005-08-02T04:36:12+09:00 Subject: Re: require each time new On 01/08/05, manveru wrote: > hi to all, > > i�m trying to build a irc-bot in ruby, and i�ve no problem with that so far. > but i�m trying to minimize the need for a restart, and want to require > some external code at runtime. > i know there is require "external.rb", but this seems to work only once, > if i require a script twice while running the program and change it > meanwhile, it doesn�t seem to use the changed code, and also i don�t > know how i get rid of the last required code. > > that�s yet another typical noob-question, i beg your pardon :) > btw, in case you didn�t really understood what i need - the same thing > works in php with include("somescript.php") and that�s exactly how i > want it to become. > > thx in advance > Michael Fellinger > > Use load instead of require. Load needs the path to the file, but will reload everytime, require is built to load everything only once. regards, Brian -- http://ruby.brian-schroeder.de/ Stringed instrument chords: http://chordlist.brian-schroeder.de/