I get a string inputted in my program, which I convert to a hash-like
sql = ‘“table_alias” => ,“original_string” => “select * from table”’
The string has the form of a hash, now I would like to convert this
string to an actual hash. I tried it like:
but I get the following error:
test2.rb:2:in `’: odd number of arguments for Hash (ArgumentError)
When I do it like,
test = Hash.new
test = sql
test becomes a String and is no longer a Hash.
Is there an easy way to convert my hash-like string to an actual hash?
Thanks for any help.