From: Chris White Date: 2011-09-10T02:10:18+09:00 Subject: Re: Creating a hash from two arrays > Date: Sat, 10 Sep 2011 02:05:15 +0900 > From: cwprogram@live.com > Subject: Re: Creating a hash from two arrays > To: ruby-talk@ruby-lang.org > > > > Hi. Can anyone help with this? I'd like to end with a hash like so: > > > > hash = {{"A" => 'alpha'}, {'B' => 'bravo'}} etc... > > > > > > > > I'm not sure whether I can use group_by and how to handle case > > insensitity. Cheers for any help. > > > > > > > > irb(main):001:0> s = ('A'..'Z').to_a > > => ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", > > "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] > > > > irb(main):003:0> t = %w(alpha bravo Charlie Zebra) > > => ["alpha", "bravo", "Charlie", "Zebra"] My message got garbled for some reason.... Here is the gist: https://gist.github.com/1206766