I am trying to print a ruby hash:
opts = {
'one' => '1',
'two' => '1',
'three' => '0'
}
I want the output to be
one=1
two=1
three=0
This works fine with this code on one machine which runs ruby 1.8.7
print opts.map{|k,v| k + '=' + v + "\n"}.to_s
But on a different machine which runs ruby 1.9, it prints
["one=1\n", "two=1\n", "three=0\n"]
What is going wrong?