I have an array of size 35K and want to convert it into hash. I was able to convert an array of size 12K with the following method.
a = []
12000.times { |i| a << i }
Hash[*a]
But, When I try arrays having size more than 12K, it raises SystemStackError: stack level too deep error.
Can anyone suggest? What is going wrong?
You can try this