From: Julian Snitow Date: 2003-06-02T09:21:53+09:00 Subject: Re: Advantages of Symbols over constants On Mon, 02 Jun 2003 00:13:21 +0900, John Johnson wrote: > One of my concerns with symbols is they spring into exsistence on their own, > ie. > > def foo(op) > case op > when :Bar > puts "Bar" > else > puts "a bug!" > end > end > > foo(:bar) def foo(op) case op when :Bar puts "Bar" else fail "Unrecognized symbol :#{op}" end end foo(:Bar) foo(:bar) Voila! It is now a non-issue. Cheers, Julian