I tried to pass array of string to use puts in ruby print it value with math operator. But get the wrong result. I thingk it need to convert to object to achieve this as follow.
my_string_array = ["100*(4+1)"]
my_string = my_string_array.join(' ') # => "100*(4+1)"
my_ruby_valuation = my_string.to_i # => 100 (Wrong)
What I expected is
puts my_ruby_valuation #=> 500
eval, but there are security concerns to look for.