From: Ryan Davis Date: 2007-02-05T18:25:08+09:00 Subject: Re: :foo is the same as "foo" (but only sometimes!) (was Re: Hash#rekey) On Feb 3, 2007, at 12:46 PM, Logan Capaldo wrote: > Incidently, I'd like to point out why I think that's an especially bad > idea (only equivalent in hashes) > ["foo", :foo, 2].uniq #=> ["foo", 2] > [1, 1.0, 2].uniq #=> [1, 1.0, 2] > But; 1 == 1.0 and :foo != "foo" (at least if the equality _only_ > applies > in hashes, in #hash and #eql? IOW). Not anymore: % ./ruby-19 -v -e 'p ["foo", :foo, 2].uniq' ruby 1.9.0 (2007-02-05 patchlevel 0) [i686-darwin8.8.1] ["foo", :foo, 2]