From: Joel VanderWerf Date: 2004-02-16T16:43:22+09:00 Subject: Re: accessing constants from class methods daz wrote: > ## The next test made me wonder if I can believe anything, any more. > > for i in 0..1 > puts defined? Z > const_set Z, 1 > puts defined? Z > puts '-' * 10 > end The first argument to #const_set should be a symbol or string, and the receiver of #const_set should be a module. for i in 0..1 puts defined? Z Object::const_set :Z, 1 puts defined? Z puts '-' * 10 end #-> nil #-> constant #-> ---------- #-> constant #-> constant #-> ---------- Keep believing...