From: Ara.T.Howard@... Date: 2005-05-10T05:24:25+09:00 Subject: Re: An idiom I like... modifiable defaults On Tue, 10 May 2005, Glenn Parker wrote: > Hal Fulton wrote: >> >> Sometimes objects are created with certain defaults. >> One way to override them is with default values in >> the constructor (and often corresponding writer methods). >> >> But sometimes I "don't like" the default and want to >> change it (for this program/session). >> >> Often I use class-level accessors for that purpose. > > Not very thread-safe, at least not in your example's implementation. even this is not: class C attr_accessor :x end unless you make it. FYI. -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | renunciation is not getting rid of the things of this world, but accepting | that they pass away. --aitken roshi ===============================================================================