Hello -- On Mon, 1 Apr 2002, Sean Chittenden wrote: > I have a class that will have many objects and each object has a > rather expensive regexp that I don't want to recompile every instance. > I was hoping to do something similar to: > > if @@httpd_combined_entry_re.nil? > @@httpd_combined_entry_re = Regexp.new('some regexp string') > end > > > Without using Modules#class_variables, there anyway to see if the > symbol for a class variable is populated? -sc Could you get by with the ||= assignment idiom? @@class_var ||= Regexp.new('...') David -- David Alan Black home: dblack / candle.superlink.net work: blackdav / shu.edu Web: http://pirate.shu.edu/~blackdav