Getting rid of double quotes inside array without turing array into a string [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I have an array x=["1", "2", "3", ":*", ":+", "4", "5", ":-", ":/"] I'm trying to get rid of the double quotation inside of the array. I know I can use: x.to_s.gsub('"','') and it will output a string: "[1, 2, 3, :*, :+, 4, 5, :-, :/]" The desired output I want is an array not a string: [1, 2, 3, :*, :+, 4, 5, :