On Fri, Dec 9, 2011 at 11:22 AM, Mayank Kohaley
<mayank.kohaley / gmail.com> wrote:

> Thanks for the enlightenment!!! Learned something about hashes today. :)

You're welcome.  I just had one spelling error:

irb(main):012:0> h = Hash.new {|ha,k| h[k] = ""}

should have been

irb(main):012:0> h = Hash.new {|ha,k| ha[k] = ""}

It does not make a difference in this case (since ha == h) but the
corrected version is more robust (i.e. if someone reassigns h).

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/