From: Bertram Scharpf Date: 2005-01-31T06:47:43+09:00 Subject: Restoring global variables? Hi, do I have any possibiliy to save and restore global and instance variables? I think of something like: user@host$ cat l.rb class C ; @@i = 0 ; end $g = "" cache_globals { load 'm.rb' } assert $g == "" and C.instance_eval { @@i.zero? } user@host$ cat m.rb C.instance_eval { @@i += 99 } $g << "foo" user@host$ There are several workarounds, for example starting another process. What is the smartest way to do it? Thanks in advance. Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de