explicitly casting as string with to_s before doing greedy string substitution with gsub