On Fri, Sep 9, 2011 at 9:51 AM, simon harrison
<simonharrison.uk / gmail.com>wrote:

> 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"]
>
> --
> Posted via http://www.ruby-forum.com/.
>
>
Funny, I just looked this up yesterday:

http://rosettacode.org/wiki/Hash_from_two_arrays#Ruby