As Tom stated above, you appear to be asking an XY problem and could likely solve the fundamental/core problem in a much more efficient manner. More detail as to exactly what you're trying to accomplish and why you feel the need to convert a key:value
to a local variable would be helpful.
That being said, there are a lot of potential alternatives but most would require that you deal with your naming syntax first. As Tom stated above, you cannot include a dot in variable names. Once that issue was dealt with, the closest thing I can think of to what you're asking for would be to define a method
instead of a local variable. That might look something like this:
hash = {"string_1_0" => "1,0", "string_2_2" => "2,2"}
hash.each {|key, value| define_method (key) {value}}
string_1_0 #=> 1,0
string_2_2 #=> 2,2
Again, just beware that these are methods
and not local variables. As such, they will be accessible on a much more global scale which may or may not work for your application.