When I try to shorten an array with '' the output from all other variables is changing too
message = "bot.start"
seperator = message
command = seperator
command[0..3] = ''
message #=> "start"
The output should be "bot.start". Ruby should have a problem separating variables from each other. What is wrong?
=means that you're referring to the same object. If that's the case,command = seperatormakescommandliterally the same object asseperator. You'll likely need to make a copy ofseperatorbefore assigning if you want them to act separately."bot.start"?messageis a string, not an array.