From: James Edward Gray II Date: 2009-12-23T00:00:12+09:00 Subject: Re: Symbols vs. constants? On Dec 22, 2009, at 8:49 AM, Marnen Laibow-Koser wrote: > James Edward Gray II wrote: >> On Dec 22, 2009, at 12:01 AM, Marnen Laibow-Koser wrote: >> >>> well-written code because someone decided that a warning should be >>> generated. >> >> I hear this quite a bit but have only ever been shown one example I >> agree with, based on a new 1.9 warning. Do you have an example you >> could share? > > Rick already provided a very good one. The only example I can find from Rick in this thread that throws a warning is constant reassignment. That can be done without a warning: >> A = :one => :one >> A = :two (irb):2: warning: already initialized constant A => :two >> Object.send(:remove_const, :A) => :two >> A = :three => :three Given that it's pretty easily avoided and it makes it move obvious that you are trying to do something unusual, I don't consider that a good example. Or were you referring to something else? James Edward Gray II