s = "¥1000"s.each_char {|x| print "#{x} " } # Prints "¥ 1 0 0 0". Ruby 1.90.upto(s.size-1) {|i| print "#{s[i]} "} # Inefficient with multibyte chars