I just wrote this piece of code but I'm not quite happy about it.
data = {}
options.each{ |k,v| data.merge!({k.to_s => v}) }
Basically I have:
{:a => "something", :b => "something else", :c => "blah"}
... and I want ...
{"a" => "something", "b" => "something else", "c" => "blah"}
... in order to send it to a gem that do not handle symbols for some reason. In the code I wrote options is the original hash and data is the updated one, but if I could only use 1 variable it'd be even better.
How would you guys refactor my code?