+ 1

What is the shortest way to convert this string to an array in Ruby? Thank you.

a = "\"[1, 2, 3]\"" #Expected output: # a =[1,2,3]

17th Nov 2017, 3:14 AM
Andy
Andy - avatar
1 Odpowiedź
+ 1
Thank you Gordie. Seems that I failed to find a better way from your code :).
17th Nov 2017, 5:52 AM
Andy
Andy - avatar