how to convert string to ascii in ruby code example Example: convert to ascii ruby "string".each_byte do |c| puts c end