From: Brian Candler Date: 2003-06-03T03:22:46+09:00 Subject: Re: Advantages of Symbols over constants On Mon, Jun 02, 2003 at 10:23:16AM +0900, Jim Weirich wrote: > Well, yes ... but I imagine that in the cases we are talking about the > actual value of the constant is irrelevant. In fact, if I were to use > constants, I would consider doing ... > > UP = Object.new > DOWN = Object.new > > Now I can't accidently use :up or :down in my code. I _must_ use the > constant. I have also found fake classes to be a useful way of doing this: class Myclass class UP; end class DOWN; end def foo(option) # useful stuff end end a = Myclass.new a.foo(Myclass::UP) Just another option... Regards, Brian.