Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!talisker.lacave.net!lacave.net!not-for-mail From: jake kaiden Newsgroups: comp.lang.ruby Subject: Re: Get the real object in a Hash key Date: Sat, 16 Apr 2011 10:28:26 -0500 Organization: Service de news de lacave.net Lines: 27 Message-ID: References: NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: Quoted-printable X-Trace: talisker.lacave.net 1302968309 69191 65.111.164.187 (16 Apr 2011 15:38:29 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Sat, 16 Apr 2011 15:38:29 +0000 (UTC) In-Reply-To: X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 381701 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:3009 hi I=C3=B1aki, i may well not understand exactly what you need to do, and so be = oversimplifying, but could you do something similar to what Robert = suggested (but a bit simpler,) and just use an array as each key's = value? the header's original name could be added as the first element = of the array - something like this: request =3D Hash.new{|key, value| key[value] =3D []} request["FROM"] =3D ["fRoM", "sip:alice@xample.org"] p hash["FROM"][0] #=3D> "fRoM" - j -- = Posted via http://www.ruby-forum.com/.=