s = "A\nB" # Three ASCII characters on two liness.each_byte {|b| print b, " " } # Prints "65 10 66 "s.each_line {|l| print l.chomp} # Prints "AB"