From: Brian Candler Date: 2007-02-06T21:50:15+09:00 Subject: Re: Hash#rekey On Tue, Feb 06, 2007 at 09:34:02PM +0900, Martin DeMello wrote: > On 2/6/07, Yukihiro Matsumoto wrote: > >Hi, > > > >In message "Re: Hash#rekey" > > on Mon, 5 Feb 2007 07:34:49 +0900, "Trans" > > writes: > > > >|I used 'normalize_keys' for while, but how doesn't 'rekey' fit the > >|behavior? The hash is being rekey'd. > > > >For me, 'rekey' is meaningless. Coined word need guessing, which is > >considered harmful unless it is accepted by many. > > alter_key(s), perhaps # existing a = [:one, :two, :three] a.map! { |k| k.to_s } puts a.inspect # by analogy h = [:one=>1, :two=>2, :three=>3] h.map_keys! { |k| k.to_s } puts h.inspect