I am a new Ruby programmer, and a co-worker of mine to help me get started wrote the following code which ran fine in his environment. However, when I try to run it in my own e
By the way, HashWithIndifferentAccess is really powerful as long as you use it with caution.
For example:
h = HashWithIndifferentAccess.new() some_array.each do |a| h["#{a}"] = "anything you want" end
I use it all the time when working with slices of data in metrics.