From: Stefan Rusterholz Date: 2007-07-17T04:41:34+09:00 Subject: Re: clean nice way (hash) Florian Aßmann wrote: > hash.update(hash) { |key, o_val, n_val| Hash['name' => o_val] } Hash[foo => bar] is a needless method call. foo => bar is already a hash literal, Hash::[] creates a new hash from that hash (suprised me a bit tbh, as I don't really see a reason for it to do that), though. But since that's useless work and method calls weigh heavy in ruby, I'd not do that. You can try it if you want: x = {:a => :b} Hash[x].equal?(x) # => false Regards Stefan -- Posted via http://www.ruby-forum.com/.