From: "Iñaki Baz Castillo" Date: 2008-04-16T01:31:04+09:00 Subject: Hash or bidimensional Array when key is case insensitive? Hi, I've to take a decission about using an bidimensional Array or a Hash to store parameters. Of course I prefer Hash since the order doesn't matter and I know the param name I'll need. The problem is that the param name is case insensitive. Example: tag = qweqweqwe Method = INVITE NAT=yes is the same as: Tag = qweqweqwe METHOD = INVITE Nat=yes If I use an bidimensional Array and need to get "method" param I willl need to do: method = params_array.find { |param| param[0] =~ /^method$/i }[1] And if I use a Hash I'll do the same: method = params_hash.find { |param| param[0] =~ /^method$/i }[1] Is there any advantage using Array or Hash in my case (key is case insensitive)? Thanks a lot for any suggestion. -- Iñaki Baz Castillo