From: Paul Brannan Date: 2002-04-26T01:19:22+09:00 Subject: Re: class variable & file reloading On Fri, Apr 26, 2002 at 12:23:52AM +0900, Jean-Hugues ROBERT wrote: > While debugging my code I often reload a ruby source file after a small > fix. This works great. However I have an issue with class variables. I > sometimes don't want then to be reinitialized when I reload. One solution > would be to use global variables created/initialized in some > MyClass::initClass() class method called once only. Is there a better way ? class Foo @x = 1 if not defined?(@x) end