On Jan 5, 2009, at 14:43 , Gary Christopher wrote: > Should I create a hash of {1 => "one".....} and then iterate through > the > input, swapping digits that match a key with the key's value. yes but... gsub is much easier > >> numbers = { "1" => "one" } > => {"1"=>"one"} > >> 111.to_s.gsub(/\d/) { |n| numbers[n] } > => "oneoneone"