From: Jacob Fugal Date: 2006-01-16T14:35:00+09:00 Subject: Re: Resetting ruby On 1/15/06, List Recv wrote: > Logan Capaldo wrote: > > Ok, so change the 'require's to 'load's and then stick it in a > > loop ;). In seriousness though, all the work involved with undefining > > everything, and you might as well just start a new ruby executable. > > Perhaps I'm not understanding you correctly, how would you do this > > with fork, and avoid the overhead of requiring things? > > fork would save the overhead of loading ruby itself However, with fork you'd need to be careful about open filehandles and the like which are shared between the processes. Getting consistent results between a stay alive process like this and a new process each time can be really tricky. Jacob Fugal