method

chars

v1_9_3_392 - Show latest stable - Class: String
chars()
public

Passes each character in str to the given block, or returns an enumerator if no block is given.

"hello".each_char {|c| print c, ' ' }

produces:

h e l l o